Modulo:Bio: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
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({ "
self:_addCategory("Voci con template Bio senza AnnoMorte ma con data di morte su Wikidata")
end
if mWikidata._instanceOf({ "
-- Per Speciale:LinkPermanente/66620402#Add_this_text_to_Template:Bio
if args["Nazionalità"] then
self:_addCategoryWikidata("
end
-- Per Speciale:LinkPermanente/80165551#Wikidata_d:Property:P21
if not args.Sesso or args.Sesso == "M" then
self:_addCategoryWikidata("
elseif args.Sesso == "F" then
self:_addCategoryWikidata("
end
-- Per Speciale:LinkPermanente/80254035#Wikidata_properties_P19.2C_P20.2C_P569.2C_P570
if args.LuogoNascita and not args.LuogoNascitaLink then
self:_addCategoryWikidata("
end
if args.LuogoNascitaLink then
self:_addCategoryWikidata("
end
if args.LuogoMorte and not args.LuogoMorteLink then
self:_addCategoryWikidata("
end
if args.LuogoMorteLink then
self:_addCategoryWikidata("
end
if args.AnnoNascita then
self:_addCategoryWikidata("
end
if args.AnnoMorte and args.AnnoMorte ~= "?" then
self:_addCategoryWikidata("
end
if args.Immagine and not titleExists("File:" .. args.Immagine) then
self:_addCategoryWikidata("
end
-- Per Speciale:LinkPermanente/80336084#
-- 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("
cittadRegno = true
end
if ((annoNascita or 0) > 1946 or (annoMorte or 0) > 1946) then
self:_addCategoryWikidata("
cittadRepubblica = true
end
if not (cittadRegno or cittadRepubblica) then
self:_addCategoryWikidata("
end
elseif args["Nazionalità"] == "statunitense" and
((annoNascita or 0) > 1776 or (annoMorte or 0) > 1776) then
self:_addCategoryWikidata("
elseif args["Nazionalità"] == "francese" and
((annoNascita or 0) > 1799 or (annoMorte or 0) > 1799) then
self:_addCategoryWikidata("
end
-- Per Speciale:LinkPermanente/80431600#Wikidata_properties_P106
if argsSearch(attivitaParams, { "calciatore", "ex calciatore", "calciatrice" }) then
self:_addCategoryWikidata("
end
if argsSearch(attivitaParams, { "attore", "attrice" }) then
self:_addCategoryWikidata("
end
if argsSearch(attivitaParams, { "politico", "politica" }) then
self:_addCategoryWikidata("
end
end
|