62 737
modifications
mAucun résumé des modifications |
Ajout du bandeau jeu |
||
Ligne 29 : | Ligne 29 : | ||
.. ' · ([[Aide:Inclusion|Qu\'est ce que c\'est ?]])' | .. ' · ([[Aide:Inclusion|Qu\'est ce que c\'est ?]])' | ||
end | end | ||
}, | |||
["jeu"] = { | |||
warning = false, | |||
text = function(args) | |||
local abbModule = require( "Module:Abréviation" ) | |||
-- Il doit y avoir un moins un jeu reconnu, dans le cas | |||
-- contraire, on ne retourne rien | |||
-- Le lien est par défaut le nom de la page mais il peut | |||
-- être surchargé | |||
local abb = args[1] | |||
local link = args["lien"] or mw.title.getCurrentTitle().text | |||
if not abb then return "" end | |||
local game = abbModule.name(abb) | |||
if not game then return "" end | |||
-- Au pluriel si plusieurs jeux | |||
local text = '' | |||
if args[2] then | |||
text = "Articles associés aux jeux : " | |||
else | |||
text = "Article associé au jeu : " | |||
end | |||
text = text .. "[[" .. link .. " (" .. game .. ")|''" .. game .. "'']]" | |||
-- On ajoute les jeux 2 à 10 mais on s'arrête si le | |||
-- n-ième est absent. | |||
for i = 2, 10 do | |||
abb = args[i] | |||
if abb then | |||
game = abbModule.name(abb) | |||
if game then | |||
local linkAbb = args["lien" .. i] or link | |||
text = text .. ", [[" .. linkAbb .. " (" .. game .. ")|''" .. game .. "'']]" | |||
end | |||
else | |||
break | |||
end | |||
end | |||
return text | |||
end | |||
}, | }, | ||
["principal"] = { | ["principal"] = { |
modifications