Module:Distinguish
Aller à la navigation
Aller à la recherche
Documentation
[purge]
Ceci est un module d'aide pour Modèle:Distinguish.
return {
distinguish = function ( frame )
local template = frame.args[1]
local args = frame:getParent().args
local noDlcIcon = args.noDlcIcon or ''
local links = {}
for _, value in ipairs( args ) do
local text = mw.text.trim( value )
if #text > 0 then
links[#links + 1] = frame:expandTemplate{
title = template,
args = { text, noDlcIcon = noDlcIcon }
}
end
end
if args[2] ~= nil and args[3] == nil then
return mw.text.listToText( links, ', ', ' ou ' )
else
return mw.text.listToText( links, ', ', ', ou ' )
end
end
}