Diferencia entre revisiones de «Módulo:Wikidata»
Sin resumen de edición |
Sin resumen de edición |
||
| Línea 55: | Línea 55: | ||
--Format statement and concat them cleanly | --Format statement and concat them cleanly | ||
local propiedad = {} | |||
if options.property == 'latitud' or 'longitud' then | |||
propiedad = 'p625' | |||
else | |||
propiedad = options.property | |||
end | |||
local formattedStatements = {} | local formattedStatements = {} | ||
for i, statement in pairs( entity.claims[string.lower( | for i, statement in pairs( entity.claims[string.lower(propiedad)] ) do | ||
table.insert( formattedStatements, formatStatement( statement, options ) ) | table.insert( formattedStatements, formatStatement( statement, options ) ) | ||
end | end | ||