Modulo:DTGenerico: differenze tra le versioni
Vai alla navigazione
Vai alla ricerca
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 115: | Riga 115: | ||
end | end | ||
function p.Incipit(frame) | function p.Incipit(frame) | ||
if not mw.wikibase.getDescription() then | |||
if not mw.wikibase.getEntity().claims['P20'] then | |||
if not mw.wikibase.getDescription() | |||
return "'''" .. mw.title.getCurrentTitle().text .. "''' è un " .. mw.wikibase.getLabelByLang(p.QFromP('P14'), 'it') .. string.char(10) | return "'''" .. mw.title.getCurrentTitle().text .. "''' è un " .. mw.wikibase.getLabelByLang(p.QFromP('P14'), 'it') .. string.char(10) | ||
else | else | ||
return "'''" .. mw.title.getCurrentTitle().text .. "''' è " .. mw.wikibase.getEntity().claims['P20'][1].mainsnak.datavalue['value'] .. string.char(10) | return "'''" .. mw.title.getCurrentTitle().text .. "''' è " .. mw.wikibase.getEntity().claims['P20'][1].mainsnak.datavalue['value'] .. string.char(10) | ||
end | end | ||
else | |||
return "'''''" .. mw.title.getCurrentTitle().text .. "'''''" .. " è " .. mw.wikibase.getDescription() .. string.char(10) | |||
end | end | ||
end | end |