66 557
contributi
(Copiato da memoryg2) |
Nessun oggetto della modifica |
||
Riga 20: | Riga 20: | ||
return "[[Has type::" .. Type .. "|''" .. Type .. "'']]" | return "[[Has type::" .. Type .. "|''" .. Type .. "'']]" | ||
end | end | ||
end | |||
function p.DescrFromDT(frame) | |||
-- ** [[Has property description::DataTrek ID@en]] | |||
-- ** [[Has property description::Identificativo DataTrek@it]] | |||
local Item | |||
local AllLabels | |||
Item = mw.wikibase.getEntity() | |||
if not Item then | |||
Item = mw.wikibase.getEntity(frame.args['Item']) | |||
end | |||
if not Item then | |||
Item = mw.wikibase.getEntity('Q1') | |||
end | |||
local Labels = Item.labels | |||
for _, Label in pairs(Labels) do | |||
if not AllLabels then | |||
AllLabels = "** " .. Label.language | |||
else | |||
AllLabels = AllLabels .. string.char(10) .. "* " .. Label.language | |||
end | |||
end | |||
return string.char(10) .. AllLabels | |||
end | end | ||
return p | return p |