Modul:Doplnit
Dokumentaci tohoto modulu lze vytvořit na stránce Nápověda:Modul:Doplnit
local _module = {}
local Language = require( "Module:Language" )
local Maintenance = require( "Module:Maintenance" )
function _module.print( frame )
local output = ""
local parentFrame = frame:getParent()
local templateArgs = parentFrame.args
local titleObject = mw.title.getCurrentTitle()
local missing = mw.text.trim( templateArgs[1] or "" )
local maintenance = Maintenance( "Doplnit " .. missing )
local lang = mw.text.trim( templateArgs[2] or "" )
local langName = Language:getName( lang )
local category = "Doplnit " .. missing
if titleObject:inNamespace( 0 ) then
output = output .. maintenance:setCategory( category .. "/(vše)", true ):getCategory()
if langName then
output = output .. maintenance:setCategory( category .. "/" .. langName, true ):getCategory()
else
output = output .. maintenance:valueUnknown({ name = 2, desc = "kód jazyka" }):getText()
end
end
output = frame:preprocess( output )
return output
end
return _module