Module:Correction syntaxique
local p = {}
function p.verifierLesArguments(frame)
local passed_args = frame:getParent().args
local modele_args = frame.args
local rv = ""
local nombre = 0
for a,b in pairs(passed_args) do
if (modele_args[a] == nil and b ~= "") then
nombre = nombre + 1
rv = rv .. '
"
end
end
if (nombre > 0) then
local categorie
if (modele_args["_catégorie"] and modele_args["_catégorie"] ~= "") then
categorie = tostring(mw.title.new(modele_args["_catégorie"], "Catégorie"))
else
categorie = "Catégorie:Page appelant un modèle avec un paramètre inconnu"
end
local cle_tri
if (nombre > 10) then
cle_tri = "+" .. nombre
else
cle_tri = nombre
end
rv = rv .. "" .. cle_tri .. ""
end
return rv
end
return p