Difference between revisions of "Module:Documentation"

use translated config
>Tacsipacsi
(don’t preprocess the result—everything should already have been preprocessed by that point, and the yet another preprocessing makes the section edit links point to this module instead of the respective documentation subpage)
>Shirayuki
(use translated config)
Line 21: Line 21:


local function message(cfgKey, valArray, expectType)
local function message(cfgKey, valArray, expectType)
local frame = mw.getCurrentFrame()
local userlanguage = frame:callParserFunction{ name = 'int', args = {'lang'} }
if mw.title.new('Module:Documentation/config/' .. userlanguage).exists then
cfg = mw.loadData('Module:Documentation/config/' .. userlanguage)
end
--[[
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- Gets a message from the cfg table and formats it if appropriate.
Anonymous user