Anonimo

Modulo:DTBase: differenze tra le versioni

Da Wikitrek.
ListReferences
m (Added description for DE language)
(ListReferences)
Riga 368: Riga 368:
return table.concat("* " .. AllP, string.char(10))
return table.concat("* " .. AllP, string.char(10))
end
function ListReferences(frame)
local AllReferences = {}
local Item = mw.wikibase.getEntity()
if not Item then
Item = mw.wikibase.getEntity('Q1')
end
if Item['claims']['P58'] then
local statements = mw.wikibase.getAllStatements(item, 'P58')
for _, statement in pairs(statements) do
local Reference = mw.wikibase.getSitelink(statement.mainsnak.datavalue.value.id)
if frame.args['AddSemantic'] then
Reference = "Riferimento::" .. Reference
end
AllReferences[AllReferences + 1] = "* " .. Reference
end
return table.concat(AllReferences, string.char(10))
else
return "Nessun riferimento trovato"
end
end
end
return p
return p