Diferencia entre revisiones de «Módulo:Wikidata»
Sin resumen de edición |
Upper and lower case properties |
||
| Línea 50: | Línea 50: | ||
end | end | ||
if (entity.claims == nil) or (not entity.claims[options.property]) then | if (entity.claims == nil) or (not entity.claims[string.lower(options.property)]) then | ||
return '' --TODO error? | return '' --TODO error? | ||
end | end | ||
| Línea 56: | Línea 56: | ||
--Format statement and concat them cleanly | --Format statement and concat them cleanly | ||
local formattedStatements = {} | local formattedStatements = {} | ||
for i, statement in pairs( entity.claims[options.property] ) do | for i, statement in pairs( entity.claims[string.lower(options.property)] ) do | ||
table.insert( formattedStatements, formatStatement( statement, options ) ) | table.insert( formattedStatements, formatStatement( statement, options ) ) | ||
end | end | ||