2 354
contributi
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 254: | Riga 254: | ||
function CategoryManager:_addCategoriesWikidata() | function CategoryManager:_addCategoriesWikidata() | ||
-- Per Speciale:LinkPermanente/80165551#Proposta_categoria_di_servizio_biografie_con_data_di_morte_su_Wikidata | -- Per Speciale:LinkPermanente/80165551#Proposta_categoria_di_servizio_biografie_con_data_di_morte_su_Wikidata | ||
if not args.AnnoMorte and mWikidata._getProperty({ " | if not args.AnnoMorte and mWikidata._getProperty({ "P4723" }) then | ||
self:_addCategory("Voci con template Bio senza AnnoMorte ma con data di morte su Wikidata") | self:_addCategory("Voci con template Bio senza AnnoMorte ma con data di morte su Wikidata") | ||
end | end | ||
if mWikidata._instanceOf({ " | if mWikidata._instanceOf({ "Q13121" }) then | ||
-- Per Speciale:LinkPermanente/66620402#Add_this_text_to_Template:Bio | -- Per Speciale:LinkPermanente/66620402#Add_this_text_to_Template:Bio | ||
if args["Nazionalità"] then | if args["Nazionalità"] then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P1617", "Voci con template Bio e nazionalità assente su Wikidata") | ||
end | end | ||
-- Per Speciale:LinkPermanente/80165551#Wikidata_d:Property:P21 | -- Per Speciale:LinkPermanente/80165551#Wikidata_d:Property:P21 | ||
if not args.Sesso or args.Sesso == "M" then | if not args.Sesso or args.Sesso == "M" then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P1018", "Voci con template Bio e sesso (M) assente su Wikidata") | ||
elseif args.Sesso == "F" then | elseif args.Sesso == "F" then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P1018", "Voci con template Bio e sesso (F) assente su Wikidata") | ||
end | end | ||
-- Per Speciale:LinkPermanente/80254035#Wikidata_properties_P19.2C_P20.2C_P569.2C_P570 | -- Per Speciale:LinkPermanente/80254035#Wikidata_properties_P19.2C_P20.2C_P569.2C_P570 | ||
if args.LuogoNascita and not args.LuogoNascitaLink then | if args.LuogoNascita and not args.LuogoNascitaLink then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P818", "Voci con template Bio e LuogoNascita assente su Wikidata") | ||
end | end | ||
if args.LuogoNascitaLink then | if args.LuogoNascitaLink then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P818", "Voci con template Bio e LuogoNascitaLink assente su Wikidata") | ||
end | end | ||
if args.LuogoMorte and not args.LuogoMorteLink then | if args.LuogoMorte and not args.LuogoMorteLink then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P915", "Voci con template Bio e LuogoMorte assente su Wikidata") | ||
end | end | ||
if args.LuogoMorteLink then | if args.LuogoMorteLink then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P915", "Voci con template Bio e LuogoMorteLink assente su Wikidata") | ||
end | end | ||
if args.AnnoNascita then | if args.AnnoNascita then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P4712", "Voci con template Bio e AnnoNascita assente su Wikidata") | ||
end | end | ||
if args.AnnoMorte and args.AnnoMorte ~= "?" then | if args.AnnoMorte and args.AnnoMorte ~= "?" then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P4723", "Voci con template Bio e AnnoMorte assente su Wikidata") | ||
end | end | ||
if args.Immagine and not titleExists("File:" .. args.Immagine) then | if args.Immagine and not titleExists("File:" .. args.Immagine) then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P725", "Voci con template Bio e Immagine assente su Wikidata") | ||
end | end | ||
-- Per Speciale:LinkPermanente/80336084# | -- Per Speciale:LinkPermanente/80336084#Wikidata_properties_P1617 | ||
-- e Speciale:LinkPermanente/105389666#Year_in_line_278_(for_Wikidata_category) | -- e Speciale:LinkPermanente/105389666#Year_in_line_278_(for_Wikidata_category) | ||
local annoNascita = tonumber(args.AnnoNascita) | local annoNascita = tonumber(args.AnnoNascita) | ||
Riga 300: | Riga 300: | ||
local cittadRepubblica = false | local cittadRepubblica = false | ||
if ((annoNascita ~= nil and annoNascita < 1946) or (annoMorte ~= nil and annoMorte < 1946)) then | if ((annoNascita ~= nil and annoNascita < 1946) or (annoMorte ~= nil and annoMorte < 1946)) then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P1617", "Voci con template Bio e cittadinanza Regno d'Italia assente su Wikidata") | ||
cittadRegno = true | cittadRegno = true | ||
end | end | ||
if ((annoNascita or 0) > 1946 or (annoMorte or 0) > 1946) then | if ((annoNascita or 0) > 1946 or (annoMorte or 0) > 1946) then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P1617", "Voci con template Bio e cittadinanza Italia assente su Wikidata") | ||
cittadRepubblica = true | cittadRepubblica = true | ||
end | end | ||
if not (cittadRegno or cittadRepubblica) then | if not (cittadRegno or cittadRepubblica) then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P1617", "Voci con template Bio e Nazionalità italiana assente su Wikidata") | ||
end | end | ||
elseif args["Nazionalità"] == "statunitense" and | elseif args["Nazionalità"] == "statunitense" and | ||
((annoNascita or 0) > 1776 or (annoMorte or 0) > 1776) then | ((annoNascita or 0) > 1776 or (annoMorte or 0) > 1776) then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P1617", "Voci con template Bio e Nazionalità statunitense assente su Wikidata") | ||
elseif args["Nazionalità"] == "francese" and | elseif args["Nazionalità"] == "francese" and | ||
((annoNascita or 0) > 1799 or (annoMorte or 0) > 1799) then | ((annoNascita or 0) > 1799 or (annoMorte or 0) > 1799) then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P1617", "Voci con template Bio e Nazionalità francese assente su Wikidata") | ||
end | end | ||
-- Per Speciale:LinkPermanente/80431600#Wikidata_properties_P106 | -- Per Speciale:LinkPermanente/80431600#Wikidata_properties_P106 | ||
if argsSearch(attivitaParams, { "calciatore", "ex calciatore", "calciatrice" }) then | if argsSearch(attivitaParams, { "calciatore", "ex calciatore", "calciatrice" }) then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P63", "Voci con template Bio e Attività assente su Wikidata (calciatore)") | ||
end | end | ||
if argsSearch(attivitaParams, { "attore", "attrice" }) then | if argsSearch(attivitaParams, { "attore", "attrice" }) then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P63", "Voci con template Bio e Attività assente su Wikidata (attore)") | ||
end | end | ||
if argsSearch(attivitaParams, { "politico", "politica" }) then | if argsSearch(attivitaParams, { "politico", "politica" }) then | ||
self:_addCategoryWikidata(" | self:_addCategoryWikidata("P63", "Voci con template Bio e Attività assente su Wikidata (politico)") | ||
end | end | ||
end | end |
contributi