Differenze tra le versioni di "Modulo:Wikidata"

preparo nuove caratteristiche dell'estensione
m (new fix)
(preparo nuove caratteristiche dell'estensione)
-- Entry-point per {{#invoke:Wikidata|N}}
function p.N(frame)
local entity, property, count, entity, entityId
 
property = frame.args[1] and string.upper(frame.args[1])
end
 
entityId = frame.args.entityId and string.upper(frame.args.entityId)
entity = mw.wikibase.getEntityObjectgetEntity(entityId)
if entity and entity.claims and entity.claims[property] then
count = #entity.claims[property]
-- Entry-point per {{#invoke:Wikidata|checkStatements}}
function p.checkStatements(frame)
local entity, property, value, checkvalue, entity, entityId
 
property = frame.args.property and string.upper(frame.args.property)
value = frame.args.value
 
if not property then
end
 
value = frame.args.value
entity = mw.wikibase.getEntityObject()
entityId = frame.args.entityId and string.upper(frame.args.entityId)
entity = mw.wikibase.getEntityObjectgetEntity(entityId)
if entity and entity.claims and entity.claims[property] then
local claims = entity.claims[property]
5 786

contributi