Modulo:StagioniTV/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
mNessun oggetto della modifica
Riga 142:
 
---- evitando il corsivo per il titolo del template se il titolo della serie usa caratteri speciali/non latini
local titolotemplate, charval, len, pos
local len = mw.ustring.len(etichetta)
local pos = 1
if etichetta ~= nil then
local len = mw.ustring.len(etichetta)
while ( pos <= len ) do
local pos = 1
charval = mw.ustring.codepoint(mw.ustring.sub(etichetta, pos))
while ( pos <= len ) do
if charval>=370 and charval<2000 then
charval = mw.ustring.codepoint(mw.ustring.sub(etichetta, pos))
titolotemplate = string.format("[[%s|<span style=\"color:white;\">%s</span>]]", sitelink, etichetta)
elseif if charval>=2100370 and charval~=8364<2000 then
titolotemplate = string.format("[[%s|<span style=\"color:white;\">%s</span>]]", sitelink, etichetta) else
elseif charval>=2100 and charval~=8364 then
titolotemplate = string.format("[[%s|<span style=\"color:white;\">''%s''</span>]]", sitelink, etichetta) else
titolotemplate = string.format("[[%s|<span style=\"color:white;\">''%s''</span>]]", sitelink, etichetta)
end
pos end = pos + 1;
pos = pos + 1;
end
end
end