Diferencia entre revisiones de «Módulo:Enlaces»

Contenido eliminado Contenido añadido
p629
Sin resumen de edición
Línea 1:
-- The sister project linking module
local p = {}
local Wikidata = require('Módulo:Wikidata')
local function getsize(tab)
count=0
Línea 131 ⟶ 130:
end
end
elseif propiedad('p629')Entidad["claims"]["P629"] then
mw.logObject( Entidad )
mw.log('has P629')
newEntidad = mw.wikibase.getEntityObject(propiedad('p629',{Entidad['uno'"claims"]["P629"]["mainsnak"]["datavalue"]["value"]["id"]='sí'}))
for k, v in pairs(newEntidad["sitelinks"]) do
if relevants[k] then
Línea 161 ⟶ 160:
return frame:preprocess( output )
end
function propiedad(idPropiedad,opciones)
if Entidad and Entidad.claims then --and Entidad.claims[idPropiedad] then
if not opciones then
opciones = {}
end
opciones['propiedad'] = idPropiedad
 
valorPropiedad = Wikidata.getPropiedad(opciones,Entidad.claims[idPropiedad])
if not valorPropiedad or valorPropiedad == '' then
return ''
end
return valorPropiedad
else return ''
end
end
return p