Modul:Wikidata utilities: Unterschied zwischen den Versionen

KKeine Bearbeitungszusammenfassung
KKeine Bearbeitungszusammenfassung
Zeile 175: Zeile 175:
local t = datavalue.type
local t = datavalue.type
if type( v ) == 'table' then
if type( v ) == 'table' then
-- items which can be reduced to a string
if t == 'wikibase-entityid' then v = v.id
if t == 'wikibase-entityid' then v = v.id
elseif t == 'time' then v = v.time
elseif t == 'time' then v = v.time
elseif t == 'globecoordinate' then v = v.latitude .. ',' .. v.longitude
elseif t == 'quantity' then v = v.amount .. ',' .. v.unit
elseif t == 'monolingualtext' then v = v.text .. ',' .. v.language
end
end
end
end