Modulo:Wikidata: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
fix formatSnak con options.qualifier
riportato fix di Dega180 in formatStatements
Riga 65:
end
function formatStatements( options )
local statement
 
if not options.property then
return formatError( 'property-param-not-provided' )
Riga 104 ⟶ 106:
-- "+ 1" perché entity.claims[property] è una sequence ma inizia da 0
if n and n <= #entity.claims[property] + 1 then
local statement =if options.rank andthen
statement = getStatementByRank( entity.claims[property], n, options.rank ) or
else
statement = entity.claims[property][n - 1]
end
if statement then
table.insert( formattedStatements, formatStatement( statement, options ) )
Riga 113 ⟶ 117:
else
for i = 0, #entity.claims[property] do
local statement = entity.claims[property][i]
if not options.rank or statement.rank == options.rank then
table.insert( formattedStatements, formatStatement( statement, options ) )