Modulo:StagioniTV/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
test |
||
Riga 8:
local p = {}
local function
return mw.getCurrentFrame():expandTemplate {▼
title = 'Ordinale femminile',▼
args = { num }▼
}▼
end▼
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 = 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 })
▲end
▲ return mw.getCurrentFrame():expandTemplate {
▲ title = 'Ordinale femminile',
▲ args = { num }
▲ }
▲end
▲function p.prova(args)
▲ local template, sfondo, categoria, target, stagioneoedizione, title, preposizione
local tbl = {}
local lang = mw.language.getContentLanguage()
|