Modulo:Wikidata: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Aggiunto supporto per il tipo time. Inoltre pattern funziona per le proprietà, i qualifier e per ogni tipo.
semplifico funzione N
Riga 198:
function p.N(frame)
local count = 0
 
property = string.lower(frame.args[1])
entity = mw.wikibase.getEntity()
if not entity thenand returnentity.claims 0and endentity.claims[property] then
if not for _ in pairs(entity.claims[property]) do count = thencount return+ 01 end
end
if not entity.claims[property] then return 0 end
 
local count = 0
for _ in pairs(entity.claims[property]) do count = count + 1 end
return count
end