Modulo:Bio/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
aggiornato alla versione corrente |
categorie di servizio per Wikidata |
||
Riga 16:
local cfg = mw.loadData("Modulo:Bio/Configurazione")
local mString = require("Modulo:String")
local mWikidata = require("Modulo:Wikidata")
-------------------------------------------------------------------------------
Riga 224 ⟶ 225:
function CategoryManager:_addCategory(cat)
table.insert(self.categories, string.format("[[Categoria:%s]]", cat))
-- Aggiunge la categoria se l'item non esiste, è senza proprieta o non ha la proprietà indicata
function CategoryManager:_addCategoryWikidata(property, cat)
self:_addCategory(cat)
end
end
Riga 240 ⟶ 248:
end
end
if mWikidata._instanceOf( { 'Q5' } ) then
if not args.Sesso or args.Sesso == "M" then▼
if not
self:
self:_addCategoryWikidata("P21", "Voci con template Bio e sesso (F) assente su Wikidata")
end
-- Per Speciale:LinkPermanente/80254035#Wikidata_properties_P19.2C_P20.2C_P569.2C_P570
if args.LuogoNascita and not args.LuogoNascitaLink then
▲ if not entity or (entity.claims and not entity.claims.P21 and not entity.claims.P527) then
self:
end
if args.LuogoNascitaLink then
▲ end
self:_addCategoryWikidata("P19", "Voci con template Bio e LuogoNascitaLink assente su Wikidata")
end
if args.LuogoMorte and not args.LuogoMorteLink then
self:_addCategoryWikidata("P20", "Voci con template Bio e LuogoMorte assente su Wikidata")
end
if args.LuogoMorteLink then
self:_addCategoryWikidata("P20", "Voci con template Bio e LuogoMorteLink assente su Wikidata")
end
if args.AnnoNascita then
self:_addCategoryWikidata("P569", "Voci con template Bio e DataNascita assente su Wikidata")
end
if args.AnnoMorte then
self:_addCategoryWikidata("P570", "Voci con template Bio e DataMorte assente su Wikidata")
end
end
end
|