Modulo:Bio/sandbox: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
ok sono soddisfatto e aggiorno
aggiorno
 
(7 versioni intermedie di uno stesso utente non sono mostrate)
Riga 429:
-- Aggiunge le categorie: Attività nazionalità [del XYZ secolo]
function CategoryManager:_addAttivita(plurals)
local catname, epoca1, epoca2, added, addatt, addnaz, add1, addbase
addatt = {}
addnaz = {}
Riga 462:
else
self:_addCategory(catname)
addbase = true
end
end
Line 478 ⟶ 479:
if plurals[nazionalita] and not addnaz[nazionalita] then
add1 = self:_addCatSecolo(plurals[nazionalita], epoca1, epoca2) or add1
for k, v in ipairs({"cecoslovacchi", "jugoslavi", "sovietici"}) do
if plurals[nazionalita] == v and not add1 and not addbase then
self:_addCategory(plurals[nazionalita])
add1 = true
end
end
end
end
if not add1 and not addbase then
self:_addCatSecolo("Persone", epoca1, epoca2)
end
Line 760 ⟶ 767:
end
self:_addText(", pseudonimo di ")
end
 
local soprannomecognome = args.Soprannome
if args.Soprannome and args.Cognome then
soprannomecognome = args.Soprannome .. " " .. args.Cognome
end
 
if soprannomecognome and currentTitleEquals(soprannomecognome) then
self:_addText("'''", soprannomecognome, "'''")
if args.PostSoprannome then
if self:_needSpace(args.PostSoprannome) then
self:_addText(" ")
end
self:_addText(args.PostSoprannome)
end
self:_addText(", vero nome ")
end
 
Line 810 ⟶ 801:
end
 
if args.Soprannome and args.Cognome then
if soprannomecognome and not currentTitleEquals(soprannomecognome) then
self:_addText(", ", (not args.Sesso or args.Sesso == "M") and "detto" or "detta",
" ", "'''", args.Soprannome, "'''")
Line 836 ⟶ 827:
-- si apre la parentesi
self:_addText(" (")
 
if args.PreData then
self:_addText(args.PreData, "; ")
end
local datimancanti = not (args.LuogoNascita or args.GiornoMeseNascita or args.NoteNascita or args.LuogoMorte or args.GiornoMeseMorte)
local floruit = args.AnnoMorte == "?" and (args.Floruit or cfg.epoche[args.Epoca])
 
if args.LuogoNascita then
Line 867 ⟶ 861:
self:_addText(args.AnnoNascita)
end
elseif not floruit or not datimancanti then
else
self:_addText("...")
end
 
if args.NoteNascita then
if self:_needSpace(args.NoteNascita) then
Line 878 ⟶ 872:
end
 
if args.AnnoMorte and (not floruit or not datimancanti) then
self:_addText(" – ")
if args.LuogoMorte then
Line 915 ⟶ 909:
-- se date ignote, usa Floruit o lo ricava da Epoca
if not args.AnnoNascita and args.AnnoMorte == "?" then
local fl = args.Floruit
if not fl and cfg.epoche[args.Epoca] then
fl = mw.ustring.gsub(cfg.epoche[args.Epoca], "^del ?l?'?", "")
Line 930 ⟶ 924:
fl = "[[" .. fl .. "]]"
end
if not datimancanti then
self:_addText("; [[floruit|fl.]] ", fl)
self:_addText("; ")
end
self:_addText(args"[[floruit|fl.PostSoprannome]] ", fl)
end
end
 
if args.NoteMorte then
if self:_needSpace(args.NoteMorte) then
self:_addText(" ")
end
self:_addText(args.NoteMorte)
end
 
-- si chiude la parentesi
self:_addText(")")
end