Modulo:DTSem: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
SMW Description
(Copiato da memoryg2)
 
(SMW Description)
(3 versioni intermedie di uno stesso utente non sono mostrate)
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 Value
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
Value = "** " .. "[[Has property description::" .. Label.value .. "@" .. Label.language .. "]]"
if not AllLabels then
AllLabels = Value
else
AllLabels = AllLabels .. string.char(10) .. Value
end
end
return string.char(10) .. AllLabels
end
end
return p
return p

Menu di navigazione