Modul:Minimum
Skočit na navigaci
Skočit na vyhledávání
Dokumentaci tohoto modulu lze vytvořit na stránce Nápověda:Modul:Minimum
-- @brief
-- Backend for {{Minimum}}.
--
-- @details
-- Categorizes the minimal entries.
--
-- @author
-- [[meta:User:Danny B.]]
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 maintenance = Maintenance( "Minimum" )
local langTag = mw.text.trim( templateArgs[1] or "" )
local langName = Language:getName( langTag )
local category = "Deminimalizovat"
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 = 1, desc = "kód jazyka" }):getText()
end
end
output = frame:preprocess( output )
return output
end
----------------------------------------
return _module