Modulo:Codice statistico: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m commento
nomi categorie Wikidata ottenuti automaticamente
Riga 83:
local statCodes = {
AUT = {
default = { prop = 'P964', catprefix = 'Codice municipale austriaco', format = formatP964 }
},
BEL = {
default = { prop = 'P1567', catprefix = 'Codice INS' }
},
BRA = {
default = { prop = 'P1585', catprefix = 'Codice municipale IBGE', format = formatP1585 }
},
CHE = {
default = { prop = 'P771', catprefix = 'Codice OFS', compare = compareP771 }
},
CZE = {
default = { prop = 'P782', catprefix = 'Codice LAU' }
},
DEU = {
["1"] = {}, -- disabilitato
["3"] = { prop = 'P440', catprefix = 'Codice dei distretti tedesco', format = formatP440 },
default = { prop = 'P439', catprefix = 'Codice municipale tedesco', format = formatP439 }
},
DNK = {
default = { prop = 'P1168', catprefix = 'Codice municipale danese' }
},
ESP = {
default = { prop = 'P772', catprefix = 'Codice INE' }
},
FRA = {
["1"] = { prop = 'P2585', catprefix = 'Codice regione INSEE' },
["2"] = { prop = 'P2586', catprefix = 'Codice dipartimento INSEE' },
["3"] = { prop = 'P3423', catprefix = 'Codice arrondissement INSEE' },
["4"] = { prop = 'P2506', catprefix = 'Codice cantone INSEE' },
default = { prop = 'P374', catprefix = 'Codice INSEE', format = formatP374 }
},
HUN = {
default = { prop = 'P939', catprefix = 'Codice KSH', format = formatP939 }
},
ITA = {
default = { prop = 'P635', catprefix = 'Codice ISTAT' }
},
NLD = {
default = { prop = 'P382', catprefix = 'Codice municipale CBS' }
},
NOR = {
default = { prop = 'P2504', catprefix = 'Codice municipale norvegese' }
},
UKR = {
default = { prop = 'P1077', catprefix = 'Codice KOATUU' }
}
}
Riga 146:
if userval then
if not wdval then
cat = string.format('%s assente su Wikidata', code.catprefixprop)
elseif comparefunc(wdval, userval) then
cat = string.format('%s uguale asu Wikidata', code.catprefixprop)
else
cat = string.format('%s differente dasu Wikidata', code.catprefixprop)
end
elseif wdval then
cat = string.format('%s lettoletta da Wikidata', code.catprefixprop)
end
 
Riga 201:
for key, value in pairs(codes) do
if value.prop then
local catLetto = value.catprefixprop .. ' lettoletta da Wikidata'
local pagesInCat = mw.site.stats.pagesInCategory(catLetto, 'pages')
tableNode
:tag('tr')
:tag('td')
:wikitext(mw.wikibase.label(value.catprefixprop))
:done()
:tag('td')