Modulo:StagioniTV/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica
test
Riga 8:
local p = {}
 
local function dataordinalefemminile(argsnum)
return mw.getCurrentFrame():expandTemplate {
title = 'Ordinale femminile',
args = { num }
}
end
 
function p.prova(argsframe)
local args = getArgs(frame)
return p._prova(args)
end
 
function p._prova(args)
local template, sfondo, categoria, target, stagioneoedizione, title, preposizione
local id, tipo, titolo, etichetta, sitelink, stagioni
local pageTitle = args[1] or args.titolo
id = wikidata.getId(args)
id = mw.wikibase.getEntityIdForTitle( pageTitle )
if wikidata._instanceOf({ 'Q581714', from = id }) then tipo = 'animata'
elseif wikidata._instanceOf({ 'Q5398426', from = id }) then tipo = 'serie TV'
Riga 19 ⟶ 34:
sitelink = mw.wikibase.sitelink( id )
stagioni = wikidata._getProperty({ 'P2437', n = 1, from = id })
return id, tipo, titolo, etichetta, sitelink, stagioni
end
 
local function ordinalefemminile(num)
return mw.getCurrentFrame():expandTemplate {
title = 'Ordinale femminile',
args = { num }
}
end
 
function p.prova(args)
local template, sfondo, categoria, target, stagioneoedizione, title, preposizione
local id, tipo, titolo, etichetta, sitelink, stagioni = data(args)
local tbl = {}
local lang = mw.language.getContentLanguage()