Modulo:Interprogetto/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m fix
m aggiorno alla versione attuale
Riga 124:
if self.entity.claims and
self.entity.claims[property_id] and
self.entity.claims[property_id][1].mainsnak.datavalue and
self.entity.claims[property_id][1].mainsnak.datavalue.type == 'string' then
return self.entity.claims[property_id][1].mainsnak.datavalue.value
Line 134 ⟶ 135:
local interwiki = { project }
if property_language and self.entity.claims and self.entity.claims[property_language] then
project = project:sub(3)
for _, claim in ipairs(self.entity.claims[property_language]) do
if claim.mainsnak.datavalue.type == 'wikibase-entityid' then
Line 141 ⟶ 143:
local language_code = claims[1] and claims[1].mainsnak.datavalue.value
if language_code then
if project == project:gsub('^%a%awikisource', and language_code) == 'grc' then
language_code = 'el'
table.insert(interwiki, project)
end
self.lingua[project] = language_code
table.insert(interwiki, language_code .. project)
self.lingua[language_code .. project] = language_code
end
end
Line 215 ⟶ 219:
if self.entity.claims and self.entity.claims[propertyId] then
for _, claim in ipairs(self.entity.claims[propertyId]) do
if claim.mainsnak.datavalue and claim.mainsnak.datavalue.value then
local datavalue = claim.mainsnak.datavalue
if datavalue.type == 'wikibase-entityid' and
Line 281 ⟶ 285:
self.testo_dopo = ' <small>' .. args.data .. '</small>'
end
local lingua = key_progetto == 's_el' and 'lingua greca' or
entity.lingua[key_progetto] and require('Modulo:Linguaggi').get_voce(entity.lingua[key_progetto]) or
args[key_progetto .. '_lingua'] and 'lingua ' .. args[key_progetto .. '_lingua']
if default_progetto.lingua and lingua then