Modulo:Bio: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m una versione importata
Nessun oggetto della modifica
 
(2 versioni intermedie di uno stesso utente non sono mostrate)
Riga 254:
function CategoryManager:_addCategoriesWikidata()
-- Per Speciale:LinkPermanente/80165551#Proposta_categoria_di_servizio_biografie_con_data_di_morte_su_Wikidata
if not args.AnnoMorte and mWikidata._getProperty({ "P570P4723" }) then
self:_addCategory("Voci con template Bio senza AnnoMorte ma con data di morte su Wikidata")
end
if mWikidata._instanceOf({ "Q5Q13121" }) then
-- Per Speciale:LinkPermanente/66620402#Add_this_text_to_Template:Bio
if args["Nazionalità"] then
self:_addCategoryWikidata("P27P1617", "Voci con template Bio e nazionalità assente su Wikidata")
end
-- Per Speciale:LinkPermanente/80165551#Wikidata_d:Property:P21
if not args.Sesso or args.Sesso == "M" then
self:_addCategoryWikidata("P21P1018", "Voci con template Bio e sesso (M) assente su Wikidata")
elseif args.Sesso == "F" then
self:_addCategoryWikidata("P21P1018", "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
self:_addCategoryWikidata("P19P818", "Voci con template Bio e LuogoNascita assente su Wikidata")
end
if args.LuogoNascitaLink then
self:_addCategoryWikidata("P19P818", "Voci con template Bio e LuogoNascitaLink assente su Wikidata")
end
if args.LuogoMorte and not args.LuogoMorteLink then
self:_addCategoryWikidata("P20P915", "Voci con template Bio e LuogoMorte assente su Wikidata")
end
if args.LuogoMorteLink then
self:_addCategoryWikidata("P20P915", "Voci con template Bio e LuogoMorteLink assente su Wikidata")
end
if args.AnnoNascita then
self:_addCategoryWikidata("P569P4712", "Voci con template Bio e AnnoNascita assente su Wikidata")
end
if args.AnnoMorte and args.AnnoMorte ~= "?" then
self:_addCategoryWikidata("P570P4723", "Voci con template Bio e AnnoMorte assente su Wikidata")
end
if args.Immagine and not titleExists("File:" .. args.Immagine) then
self:_addCategoryWikidata("P18P725", "Voci con template Bio e Immagine assente su Wikidata")
end
-- Per Speciale:LinkPermanente/80336084#Wikidata_properties_P27Wikidata_properties_P1617
-- e Speciale:LinkPermanente/105389666#Year_in_line_278_(for_Wikidata_category)
local annoNascita = tonumber(args.AnnoNascita)
Riga 300:
local cittadRepubblica = false
if ((annoNascita ~= nil and annoNascita < 1946) or (annoMorte ~= nil and annoMorte < 1946)) then
self:_addCategoryWikidata("P27P1617", "Voci con template Bio e cittadinanza Regno d'Italia assente su Wikidata")
cittadRegno = true
end
if ((annoNascita or 0) > 1946 or (annoMorte or 0) > 1946) then
self:_addCategoryWikidata("P27P1617", "Voci con template Bio e cittadinanza Italia assente su Wikidata")
cittadRepubblica = true
end
if not (cittadRegno or cittadRepubblica) then
self:_addCategoryWikidata("P27P1617", "Voci con template Bio e Nazionalità italiana assente su Wikidata")
end
elseif args["Nazionalità"] == "statunitense" and
((annoNascita or 0) > 1776 or (annoMorte or 0) > 1776) then
self:_addCategoryWikidata("P27P1617", "Voci con template Bio e Nazionalità statunitense assente su Wikidata")
elseif args["Nazionalità"] == "francese" and
((annoNascita or 0) > 1799 or (annoMorte or 0) > 1799) then
self:_addCategoryWikidata("P27P1617", "Voci con template Bio e Nazionalità francese assente su Wikidata")
end
-- Per Speciale:LinkPermanente/80431600#Wikidata_properties_P106
if argsSearch(attivitaParams, { "calciatore", "ex calciatore", "calciatrice" }) then
self:_addCategoryWikidata("P106P63", "Voci con template Bio e Attività assente su Wikidata (calciatore)")
end
if argsSearch(attivitaParams, { "attore", "attrice" }) then
self:_addCategoryWikidata("P106P63", "Voci con template Bio e Attività assente su Wikidata (attore)")
end
if argsSearch(attivitaParams, { "politico", "politica" }) then
self:_addCategoryWikidata("P106P63", "Voci con template Bio e Attività assente su Wikidata (politico)")
end
end
Riga 628:
 
if target and label then
self:_addText("[[w:it:", target, "|", label, "]]")
else
self:_addText("[[w:it:", target or label, "|", target or label, "]]")
end
end