Aller au contenu

« Module:Bandeau de rubrique » : différence entre les versions

aucun résumé des modifications
Kharmitch (discussion | contributions)
Aucun résumé des modifications
Balise : Révoqué
Aucun résumé des modifications
 
(5 versions intermédiaires par un autre utilisateur non affichées)
Ligne 112 : Ligne 112 :
text    = function(args)
text    = function(args)
local link = args[1]
local link = args[1]
local display = args['t1'] or link
if not link then return "Lien ?" end
if not link then return '' end
local text
if args[2] then
text = '[[' .. link .. '|' .. display .. ']]'
text = "Articles principaux : "
local many = false
for i = 2, 5 do
local link = args[i]
local display = args['t' .. i] or link
if link then
many = true
text = text .. ', [[' .. link .. '|' .. display .. ']]'
else
break
end
end
if many then
text = 'Articles principaux : ' .. text
else
else
text = 'Article principal : ' .. text
text = "Article principal : "
end
end
return text
local linkText = args["t1"] or link
end
text = text .. "[[:" .. link .. "|" .. linkText .. "]]"
},
["utile"] = {
warning  = false,
text     = function(args)
local link = args[1]
if not link then return '' end
text = link
local many = false
for i = 2, 5 do
for i = 2, 5 do
local link = args[i]
link = args[i]
if link then
if link then
many = true
linkText = args["t" .. i] or link
text = text .. ', ' .. link
text = text .. ", [[:" .. link .. "|" .. linkText .. "]]"
else
else
break
break
end
end
end
if many then
text = 'Liens utiles : ' .. text
else
text = 'Lien utile : ' .. text
end
end
Ligne 171 : Ligne 140 :
warning  = true,
warning  = true,
image    = 'Portail participation.png',
image    = 'Portail participation.png',
category = 'Sections vides ou incomplètes',
category = 'Rubrique vide ou incomplète',
text    = function(args)
text    = function(args)
local text = 'Cette rubrique est vide, insuffisamment détaillée ou incomplète. ['
local text = 'Cette rubrique est vide, insuffisamment détaillée ou incomplète. ['
Ligne 208 : Ligne 177 :
if category and mw.title.getCurrentTitle().namespace == 0 then
if category and mw.title.getCurrentTitle().namespace == 0 then
local game = args['jeu']
local game = args['jeu'] or args[1]  -- FIXME: args[1] conflit
if game ~= '' then
if game ~= '' then
game = require( 'Module:Abréviation' ).name(game) or ''
game = require( 'Module:Abréviation' ).name(game) or ''