Modulo:Sandbox/Sakretsu: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
fix
test
Riga 1:
local p = {}
 
local cat = '[[Categoria:Pubblicazioni antecedenti al 2009 con template FIMI da spostare]]'
 
function p.main(frame)
local retyear = tonumber(frame:getParent().args[1] or ''.anno)
if not year or year > 2008 then return end
local i = {}
local content = mw.title.getCurrentTitle():getContent()
for var in string.gmatch(ret, '%$%d+') do
local awards = { "d'oro", "di platino", "di diamante" }
i[var] = (i[var] or 0) + 1
for _, v in ipairs(awards) do
ret = string.gsub(ret, var, i[var], 1)
if string.match(content, '|%s*numero dischi ' .. v .. '%s*=[^|}]*{{%s*FIMI%s*|') then
return retcat
end
end
return ret
end