Modulo:StagioniTV/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mNessun oggetto della modifica
t-1
Riga 65:
 
if tipo == 'programma' then
preposizione = mw.title.new(string.format('Categoria:Edizioni de %s', nome)).exists and 'de' or 'di'
if string.find(mw.title.getCurrentTitle().text, '^.+%(%a+edizione%)$') then
if args[2] ~= 'elenco' and args[3] ~= 'elenco' and args[4] ~= 'elenco' then
nome = string.match(mw.title.getCurrentTitle().text, '^(.+) %(%a+edizione%)$')
if string.find(mw.title.getCurrentTitle().text, '^.+%(%a+edizione%)$') then
nome = string.match(mw.title.getCurrentTitle().text, '^(.+) %(%a+edizione%)$')
end
elseif mw.title.new(string.format('%s (prima edizione)', sitelink)).exists then
nome = sitelink else
Riga 75 ⟶ 78:
if string.find(mw.title.getCurrentTitle().text, '^Episodi d[ei].+stagione%)$') then
nome = string.match(mw.title.getCurrentTitle().text, '^Episodi d[ei] (.+) %(%a+ stagione%)$')
preposizione = string.findmatch(mw.title.getCurrentTitle().text, '^Episodi de(d[ei])') and 'de' or 'di'
elseif string.find(mw.title.getCurrentTitle().text, '^Episodi d[ei].+$') then
nome = string.match(mw.title.getCurrentTitle().text, '^Episodi d[ei] (.+)$')
ifpreposizione = string.findmatch(mw.title.getCurrentTitle().text, '^Episodi (d[ei])') then
end
elseif mw.title.new(string.format('Episodi di %s (prima stagione)', sitelink)).exists or mw.title.new(string.format('Episodi de %s (prima stagione)', sitelinketichetta)).exists then
nome = sitelink else
nome = etichetta
end
end
 
if tipo == 'programma' then
preposizione = mw.title.new(string.format('Categoria:Edizioni de %s', nome)).exists and 'de' or 'di'
elseif tipo == 'serie TV' or tipo == 'animata' then
if args[2] ~= 'elenco' and args[3] ~= 'elenco' and args[4] ~= 'elenco' then
if string.find(mw.title.getCurrentTitle().text, '^Episodi d[ei]') then
preposizione = string.find(mw.title.getCurrentTitle().text, '^Episodi de') and 'de' or 'di'
end
elseif mw.title.new(string.format('Episodi de %s (prima stagione)', nome)).exists or mw.title.new(string.format('Episodi de %s', nome)).exists then
preposizione = 'de' else
preposizione = 'di'
elseif mw.title.new(string.format('Episodi de %s (prima stagione)', nome)).exists or mw.title.new(string.format('Episodi de %s', nomeetichetta)).exists then
nome = etichetta
preposizione = 'de' else
else nome = sitelink else
preposizione = mw.title.new(string.format('Episodi de %s (prima stagione)', sitelink)).exists and 'de' or 'di'
end
end