Modulo:Wikidata: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m list con un solo elemento, ret
m getEntity, getEntityIdForCurrentPage, langCode
Riga 396:
-- get entity
entity = mw.wikibase.getEntityObjectgetEntity(args.from)
if not entity then
return nil
Riga 627:
-- parametri posizionali
local entityId = args[1] and string.upper(args[1]) or nil
local langCode = args[2]
if not entityId then
 
error(i18n.errors['entityid-param-not-provided'], 2)
local entity = mw.wikibase.getEntity(entityId)
if not entityIdentity then
error(i18n.errors['entityid-paramentity-not-providedfound'], 2)
end
 
return mw.wikibase.labelentity:getLabel(entityIdlangCode)
end
 
Riga 655 ⟶ 658:
end
 
entity = mw.wikibase.getEntityObjectgetEntity(property)
if not entity then
error(i18n.errors['entity-not-found'], 2)
Riga 691 ⟶ 694:
 
-- Ritorna l'ID dell'item Wikidata collegato alla pagina corrente.
function p._getId()
local entity =return mw.wikibase.getEntityObjectgetEntityIdForCurrentPage()
return entity and entity.id or nil
end