Modulo:Fr-conj/Sandbox

Da Wikizionario, il dizionario a contenuto aperto.

La documentazione per questo modulo può essere creata in Modulo:Fr-conj/Sandbox/man

-- Questo modulo contiene il codice per il template:Fr-conj, che genera la coniugazione di tutti i verbi francesi
-- La funzione frconj genera la tabella di coniugazione utilizzando i parametri passati dal template

p = {}

local function categorizza(cat, titolo)
local NS = tostring(mw.title.getCurrentTitle().namespace);

	if NS == '100' then
		return string.format('[[%s:%s|%s]]', mw.site.namespaces[14].name, cat, titolo)
	else
		return ''
	end
end

function p.nodiacritic(x)
-- funzione che rimuove gli eventuali accenti dal suo argomento: déraciner -> deraciner. Serve per le categorizzazioni in corretto ordine alfabetico, ed è utilizzata nella stringa 'sottopagina' un po' più sotto
	local dp={
	['à']='a',['á']='a',['â']='a',
	['è']='e',['é']='e',['ê']='e',
	['ì']='i',['í']='i',['î']='i',
	['ò']='o',['ó']='o',['ô']='o',
	['ù']='u',['ú']='u',['û']='u',
	};
	return (mw.ustring.gsub(x, '.', dp))
	end

function p.frconj(frame)
    pframe = frame:getParent()
    config = frame.args
    args = pframe.args
    sottopagina = p.nodiacritic(mw.title.getCurrentTitle().subpageText) --il titolo della sottopagina, senza "Appendice:Coniugazioni/Francese/" e SENZA ACCENTI. Viene richiamato solo nella stringa 'titolo' subito sotto

--genera il titolo (da inserire dopo il pipe | nelle categorie) prendendo la stringa 'sottopagina' definita qui sopra ma togliendo di mezzo gli eventuali pronomi riflessivi: se manger -> manger, s'appeler -> appeler (altrimenti i riflessivi finiscono tutti sotto la "s" nelle categorie!)
    if mw.ustring.find(sottopagina, "se ") then
    	titolo = mw.ustring.gsub(sottopagina, "se ", "", 1)
    elseif mw.ustring.find(mw.title.getCurrentTitle().subpageText, "s'") then
    	titolo = mw.ustring.gsub(sottopagina, "s'", "", 1)
    else
    	titolo = sottopagina 
    end
    
-- Argomenti passati dal template
    stem = args[1]
    aus = config["ausiliare"] or " "
-- Inizializzazione di tutte le variabili interne, che potrebbero altrimenti risultare nulle
	descr = ""; conjdescr = ""; conjcat = ""; reg_irreg = ""; irregolare = ""; irregolarecat = ""; irregolaredescr = ""
	pron = ""; refl_exist = ""; refl_link = ""; refl_conjlink = ""
    ausiliare = ""
    stem2 = "" --radice per le desinenze in -e, -es e -en, per il futuro e il condizionale (serve in caso di variazioni di accento)
    inf = ""; ger = ""; par= ""; pp = ""; pplur = ""
    pres1s = ""; pres1s2 = ""; pres2s=""; pres3s = ""; pres1p = ""; pres2p = ""; pres3p = ""
    imperf1s = ""; imperf2s=""; imperf3s = ""; imperf1p = ""; imperf2p = ""; imperf3p = ""
    prem1s = ""; prem1s2 = ""; prem2s = ""; prem3s = ""; prem3s2 = ""; prem1p = ""; prem2p = ""; prem3p = ""; prem3p2 = ""
    fut1s = ""; fut2s=""; fut3s = ""; fut1p =" "; fut2p = ""; fut3p = ""
    cond1s = ""; cond2s=""; cond3s = ""; cond1p = ""; cond2p = ""; cond3p = ""
    cong1s = ""; cong2s = ""; cong3s = ""; cong1p = ""; cong2p = ""; cong3p = ""
    congimp1s = ""; congimp2s = ""; congimp3s = ""; congimp1p = ""; congimp2p = ""; congimp3p = ""
    imp2s=""; imp2s2 = ""; imp2s3 = ""; imp3s = ""; imp1p = ""; imp2p = ""; imp3p = ""
    mi = ""; ti = ""; si = ""; ci = ""; vi = ""
    paspros = ""; trappros = ""; traprem = ""; futant = ""; condpas = ""; congpas = ""; congtrap = ""
    paspros1s = ""; paspros2s=""; paspros3s = ""; paspros1p = ""; paspros2p = ""; paspros3p = ""
    trappros1s = ""; trappros2s=""; trappros3s = ""; trappros1p = ""; trappros2p = ""; trappros3p = ""
    traprem1s = ""; traprem2s=""; traprem3s = ""; traprem1p = ""; traprem2p = ""; traprem3p = ""
    futant1s = ""; futant2s=""; futant3s = ""; futant1p = ""; futant2p = ""; futant3p = ""
    condpas1s = ""; condpas2s=""; condpas3s = ""; condpas1p = ""; condpas2p = ""; condpas3p = ""
    congpas1s = ""; congpas2s=""; congpas3s = ""; congpas1p = ""; congpas2p = ""; congpas3p = ""
    congtrap1s = ""; congtrap2s=""; congtrap3s = ""; congtrap1p = ""; congtrap2p = ""; congtrap3p = ""
--per gli accenti dei verbi in e*er o é*er
    if mw.ustring.find(stem, "e", -2) or mw.ustring.find(stem, "é", -2) then stem2 = mw.ustring.sub(stem, 1, -3).. "è".. mw.ustring.sub(stem, -1)
    else stem2 = stem end
-- A partire dalla coniugazione, genera le forme coniugate standard per ciascuna tipologia di verbo
    type = config["type"]
    if type == nil then
        inf = p.wiki(args["inf"])
    elseif (type == "er") or (type == "er-se") then
    	inf = p.wiki(stem .. "er")
    	par = p.wiki(stem .. "ant"); pp = p.wiki(stem .. "é"); pplur = p.plurale(-2, pp, "s]]")
        pres1s = p.wiki(stem2 .. "e");  pres2s = p.wiki(stem2 .. "es");  pres3s = p.wiki(stem2 .. "e")
        pres1p = p.wiki(stem .. "ons");  pres2p = p.wiki(stem .. "ez");  pres3p = p.wiki(stem2 .. "ent")        
        imperf1s = p.wiki(stem .. "ais");  imperf2s = p.wiki(stem .. "ais");  imperf3s = p.wiki(stem .. "ait")
        imperf1p = p.wiki(stem .. "ions");  imperf2p = p.wiki(stem .. "iez");  imperf3p = p.wiki(stem .. "aient") 
        prem1s = p.wiki(stem .. "ai");  prem2s = p.wiki(stem .. "as");  prem3s = p.wiki(stem .. "a")
        prem1p = p.wiki(stem .. "âmes");  prem2p = p.wiki(stem .. "âtes");  prem3p = p.wiki(stem .. "èrent") 
        fut1s = p.wiki(stem2 .. "erai");  fut2s = p.wiki(stem2 .. "eras");  fut3s = p.wiki(stem2 .. "era")
        fut1p = p.wiki(stem2 .. "erons");  fut2p = p.wiki(stem2 .. "erez");  fut3p = p.wiki(stem2 .. "eront") 
        cond1s = p.wiki(stem2 .. "erais");  cond2s = p.wiki(stem2 .. "erais");  cond3s = p.wiki(stem2 .. "erait")
        cond1p = p.wiki(stem2 .. "erions");  cond2p = p.wiki(stem2 .. "eriez");  cond3p = p.wiki(stem2 .. "eraient") 
        cong1s = p.wiki(stem2 .. "e"); cong2s=p.wiki(stem2 .. "es"); cong3s = p.wiki(stem2 .. "e")
        cong1p = p.wiki(stem .. "ions");  cong2p = p.wiki(stem .. "iez");  cong3p = p.wiki(stem2 .. "ent")
        congimp1s = p.wiki(stem .. "asse"); congimp2s = p.wiki(stem.. "asses");  congimp3s = p.wiki(stem .. "ât")
        congimp1p = p.wiki(stem .. "assions");  congimp2p = p.wiki(stem .. "assiez");  congimp3p = p.wiki(stem .. "assent")
        imp2s = p.wiki(stem2 .. "e");  imp3s = ""
        imp1p = p.wiki(stem .. "ons");  imp2p = p.wiki(stem .. "ez");  imp3p = ""  
    elseif (type == "cer") or (type == "cer-se") then
		inf = p.wiki(stem .. "er")
		par = p.wiki(stem.sub(stem, 1, -2) .. "çant"); pp = p.wiki(stem .. "é"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem2.. "e");  pres2s = p.wiki(stem2 .. "es");  pres3s = p.wiki(stem2 .. "e")
		pres1p = p.wiki(stem.sub(stem, 1, -2) .. "çons");  pres2p = p.wiki(stem .. "ez");  pres3p = p.wiki(stem2 .. "ent")        
		imperf1s = p.wiki(stem.sub(stem, 1, -2) .. "çais");  imperf2s = p.wiki(stem.sub(stem, 1, -2) .. "çais");  imperf3s = p.wiki(stem.sub(stem, 1, -2) .. "çait")
		imperf1p = p.wiki(stem .. "ions");  imperf2p = p.wiki(stem .. "iez");  imperf3p = p.wiki(stem.sub(stem, 1, -2) .. "çaient") 
		prem1s = p.wiki(stem.sub(stem, 1, -2) .. "çai");  prem2s = p.wiki(stem.sub(stem, 1, -2) .. "ças");  prem3s = p.wiki(stem.sub(stem, 1, -2) .. "ça")
		prem1p = p.wiki(stem.sub(stem, 1, -2) .. "çâmes");  prem2p = p.wiki(stem.sub(stem, 1, -2) .. "çâtes");  prem3p = p.wiki(stem .. "èrent") 
		fut1s = p.wiki(stem2.. "erai");  fut2s = p.wiki(stem2 .. "eras");  fut3s = p.wiki(stem2 .. "era")
		fut1p = p.wiki(stem2 .. "erons");  fut2p = p.wiki(stem2 .. "erez");  fut3p = p.wiki(stem2 .. "eront") 
		cond1s = p.wiki(stem2 .. "erais");  cond2s = p.wiki(stem2 .. "erais");  cond3s = p.wiki(stem2 .. "erait")
		cond1p = p.wiki(stem2 .. "erions");  cond2p = p.wiki(stem2 .. "eriez");  cond3p = p.wiki(stem2 .. "eraient") 
		cong1s = p.wiki(stem2 .. "e"); cong2s=p.wiki(stem2 .. "es"); cong3s = p.wiki(stem2 .. "e")
		cong1p = p.wiki(stem .. "ions");  cong2p = p.wiki(stem .. "iez");  cong3p = p.wiki(stem2 .. "ent")
		congimp1s = p.wiki(stem.sub(stem, 1, -2) .. "çasse"); congimp2s = p.wiki(stem.sub(stem, 1, -2) .. "çasses");  congimp3s = p.wiki(stem.sub(stem, 1, -2) .. "çât")
		congimp1p = p.wiki(stem.sub(stem, 1, -2) .. "çassions");  congimp2p = p.wiki(stem.sub(stem, 1, -2) .. "çassiez");  congimp3p = p.wiki(stem.sub(stem, 1, -2) .. "çassent")
		imp2s = p.wiki(stem2 .. "e");  imp3s = ""
		imp1p = p.wiki(stem.sub(stem, 1, -2) .. "çons");  imp2p = p.wiki(stem .. "ez");  imp3p = ""
    elseif (type == "ger") or (type == "ger-se") then
		inf = p.wiki(stem .. "er")
		par = p.wiki(stem .. "eant"); pp = p.wiki(stem .. "é"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem2 .. "e");  pres2s = p.wiki(stem2 .. "es");  pres3s = p.wiki(stem2 .. "e")
		pres1p = p.wiki(stem .. "eons");  pres2p = p.wiki(stem .. "ez");  pres3p = p.wiki(stem2 .. "ent")        
		imperf1s = p.wiki(stem .. "eais");  imperf2s = p.wiki(stem .. "eais");  imperf3s = p.wiki(stem .. "eait")
		imperf1p = p.wiki(stem .. "ions");  imperf2p = p.wiki(stem .. "iez");  imperf3p = p.wiki(stem .. "eaient") 
		prem1s = p.wiki(stem .. "eai");  prem2s = p.wiki(stem .. "eas");  prem3s = p.wiki(stem .. "ea")
		prem1p = p.wiki(stem .. "eâmes");  prem2p = p.wiki(stem .. "eâtes");  prem3p = p.wiki(stem .. "èrent") 
		fut1s = p.wiki(stem2 .. "erai");  fut2s = p.wiki(stem2 .. "eras");  fut3s = p.wiki(stem2 .. "era")
		fut1p = p.wiki(stem2 .. "erons");  fut2p = p.wiki(stem2 .. "erez");  fut3p = p.wiki(stem2 .. "eront") 
		cond1s = p.wiki(stem2 .. "erais");  cond2s = p.wiki(stem2 .. "erais");  cond3s = p.wiki(stem2 .. "erait")
		cond1p = p.wiki(stem2 .. "erions");  cond2p = p.wiki(stem2 .. "eriez");  cond3p = p.wiki(stem2 .. "eraient") 
		cong1s = p.wiki(stem2 .. "e"); cong2s=p.wiki(stem2 .. "es"); cong3s = p.wiki(stem2 .. "e")
		cong1p = p.wiki(stem .. "ions");  cong2p = p.wiki(stem .. "iez");  cong3p = p.wiki(stem2 .. "ent")
		congimp1s = p.wiki(stem .. "easse"); congimp2s = p.wiki(stem.. "easses");  congimp3s = p.wiki(stem .. "eât")
		congimp1p = p.wiki(stem .. "eassions");  congimp2p = p.wiki(stem .. "eassiez");  congimp3p = p.wiki(stem .. "eassent")
		imp2s = p.wiki(stem2 .. "e");  imp3s = ""
		imp1p = p.wiki(stem .. "eons");  imp2p = p.wiki(stem .. "ez");  imp3p = "" 
    elseif (type == "éer") then
		inf = p.wiki(stem .. "éer")
		par = p.wiki(stem .. "éant"); pp = p.wiki(stem .. "éé"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem .. "ée");  pres2s = p.wiki(stem .. "ées");  pres3s = p.wiki(stem .. "ée")
		pres1p = p.wiki(stem .. "éons");  pres2p = p.wiki(stem .. "éez");  pres3p = p.wiki(stem .. "éent")        
		imperf1s = p.wiki(stem .. "éais");  imperf2s = p.wiki(stem .. "éais");  imperf3s = p.wiki(stem .. "éait")
		imperf1p = p.wiki(stem .. "éions");  imperf2p = p.wiki(stem .. "éiez");  imperf3p = p.wiki(stem .. "éaient") 
		prem1s = p.wiki(stem .. "éai");  prem2s = p.wiki(stem .. "éas");  prem3s = p.wiki(stem .. "éa")
		prem1p = p.wiki(stem .. "éâmes");  prem2p = p.wiki(stem .. "éâtes");  prem3p = p.wiki(stem .. "éèrent") 
		fut1s = p.wiki(stem .. "éerai");  fut2s = p.wiki(stem .. "éeras");  fut3s = p.wiki(stem .. "éera")
		fut1p = p.wiki(stem .. "éerons");  fut2p = p.wiki(stem .. "éerez");  fut3p = p.wiki(stem .. "éeront") 
		cond1s = p.wiki(stem .. "éerais");  cond2s = p.wiki(stem .. "éerais");  cond3s = p.wiki(stem .. "éerait")
		cond1p = p.wiki(stem .. "éerions");  cond2p = p.wiki(stem .. "éeriez");  cond3p = p.wiki(stem .. "éeraient") 
		cong1s = p.wiki(stem .. "ée"); cong2s=p.wiki(stem .. "ées"); cong3s = p.wiki(stem .. "ée")
		cong1p = p.wiki(stem .. "éions");  cong2p = p.wiki(stem .. "éiez");  cong3p = p.wiki(stem .. "éent")
		congimp1s = p.wiki(stem .. "éasse"); congimp2s = p.wiki(stem.. "éasses");  congimp3s = p.wiki(stem .. "éât")
		congimp1p = p.wiki(stem .. "éassions");  congimp2p = p.wiki(stem .. "éassiez");  congimp3p = p.wiki(stem .. "éassent")
		imp2s = p.wiki(stem .. "ée");  imp3s = ""
		imp1p = p.wiki(stem .. "éons");  imp2p = p.wiki(stem .. "éez");  imp3p = ""
    elseif (type == "oyer") or (type == "uyer") or (type == "oyer-se") or (type == "uyer-se") then
		inf = p.wiki(stem .. "er")
		par = p.wiki(stem .. "ant"); pp = p.wiki(stem .. "é"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem.sub(stem, 1, -2) .. "ie");  pres2s = p.wiki(stem.sub(stem, 1, -2) .. "ies");  pres3s = p.wiki(stem.sub(stem, 1, -2) .. "ie")
		pres1p = p.wiki(stem .. "ons");  pres2p = p.wiki(stem .. "ez");  pres3p = p.wiki(stem.sub(stem, 1, -2) .. "ient")        
		imperf1s = p.wiki(stem .. "ais");  imperf2s = p.wiki(stem .. "ais");  imperf3s = p.wiki(stem .. "ait")
		imperf1p = p.wiki(stem .. "ions");  imperf2p = p.wiki(stem .. "iez");  imperf3p = p.wiki(stem .. "aient") 
		prem1s = p.wiki(stem .. "ai");  prem2s = p.wiki(stem .. "as");  prem3s = p.wiki(stem .. "a")
		prem1p = p.wiki(stem .. "âmes");  prem2p = p.wiki(stem .. "âtes");  prem3p = p.wiki(stem .. "èrent") 
		fut1s = p.wiki(stem.sub(stem, 1, -2) .. "ierai");  fut2s = p.wiki(stem.sub(stem, 1, -2) .. "ieras");  fut3s = p.wiki(stem.sub(stem, 1, -2) .. "iera")
		fut1p = p.wiki(stem.sub(stem, 1, -2) .. "ierons");  fut2p = p.wiki(stem.sub(stem, 1, -2) .. "ierez");  fut3p = p.wiki(stem.sub(stem, 1, -2) .. "ieront") 
		cond1s = p.wiki(stem.sub(stem, 1, -2) .. "ierais");  cond2s = p.wiki(stem.sub(stem, 1, -2) .. "ierais");  cond3s = p.wiki(stem.sub(stem, 1, -2) .. "ierait")
		cond1p = p.wiki(stem.sub(stem, 1, -2) .. "ierions");  cond2p = p.wiki(stem.sub(stem, 1, -2) .. "ieriez");  cond3p = p.wiki(stem.sub(stem, 1, -2) .. "ieraient") 
		cong1s = p.wiki(stem.sub(stem, 1, -2) .. "ie"); cong2s=p.wiki(stem.sub(stem, 1, -2) .. "ies"); cong3s = p.wiki(stem.sub(stem, 1, -2) .. "ie")
		cong1p = p.wiki(stem .. "ions");  cong2p = p.wiki(stem .. "iez");  cong3p = p.wiki(stem.sub(stem, 1, -2) .. "ient")
		congimp1s = p.wiki(stem .. "asse"); congimp2s = p.wiki(stem.. "asses");  congimp3s = p.wiki(stem .. "ât")
		congimp1p = p.wiki(stem .. "assions");  congimp2p = p.wiki(stem .. "assiez");  congimp3p = p.wiki(stem .. "assent")
		imp2s = p.wiki(stem.sub(stem, 1, -2) .. "ie");  imp3s = ""
		imp1p = p.wiki(stem .. "ons");  imp2p = p.wiki(stem .. "ez");  imp3p = ""  
    elseif (type == "ayer") or (type == "ayer-se") then
		inf = p.wiki(stem .. "er")
		par = p.wiki(stem .. "ant"); pp = p.wiki(stem .. "é"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem.sub(stem, 1, -2) .. "ie"); pres1s2 = p.wiki(stem.. "e");  pres2s = p.wiki(stem.sub(stem, 1, -2) .. "ies"); pres2s2 = p.wiki(stem.. "es");  pres3s = p.wiki(stem.sub(stem, 1, -2) .. "ie"); pres3s2 = p.wiki(stem.. "e")
		pres1p = p.wiki(stem .. "ons");  pres2p = p.wiki(stem .. "ez");  pres3p = p.wiki(stem.sub(stem, 1, -2) .. "ient"); pres3p2 = p.wiki(stem.. "ent");        
		imperf1s = p.wiki(stem .. "ais");  imperf2s = p.wiki(stem .. "ais");  imperf3s = p.wiki(stem .. "ait")
		imperf1p = p.wiki(stem .. "ions");  imperf2p = p.wiki(stem .. "iez");  imperf3p = p.wiki(stem .. "aient") 
		prem1s = p.wiki(stem .. "ai");  prem2s = p.wiki(stem .. "as");  prem3s = p.wiki(stem .. "a")
		prem1p = p.wiki(stem .. "âmes");  prem2p = p.wiki(stem .. "âtes");  prem3p = p.wiki(stem .. "èrent") 
		fut1s = p.wiki(stem.sub(stem, 1, -2) .. "ierai"); fut1s2 = p.wiki(stem.. "erai");  fut2s = p.wiki(stem.sub(stem, 1, -2) .. "ieras"); fut2s2 = p.wiki(stem.. "eras");  fut3s = p.wiki(stem.sub(stem, 1, -2) .. "iera"); fut3s2 = p.wiki(stem.. "era")
		fut1p = p.wiki(stem.sub(stem, 1, -2) .. "ierons"); fut1p2 = p.wiki(stem.. "erons");  fut2p = p.wiki(stem.sub(stem, 1, -2) .. "ierez"); fut2p2 = p.wiki(stem.. "erez");  fut3p = p.wiki(stem.sub(stem, 1, -2) .. "ieront"); fut3p2 = p.wiki(stem.. "eront") 
		cond1s = p.wiki(stem.sub(stem, 1, -2) .. "ierais"); cond1s2 = p.wiki(stem.. "erais");  cond2s = p.wiki(stem.sub(stem, 1, -2) .. "ierais"); cond2s2 = p.wiki(stem.. "erais"); cond3s = p.wiki(stem.sub(stem, 1, -2) .. "ierait"); cond3s2 = p.wiki(stem.. "erait")
		cond1p = p.wiki(stem.sub(stem, 1, -2) .. "ierions"); cond1p2 = p.wiki(stem.. "erions"); cond2p = p.wiki(stem.sub(stem, 1, -2) .. "ieriez"); cond2p2 = p.wiki(stem.. "eriez"); cond3p = p.wiki(stem.sub(stem, 1, -2) .. "ieraient"); cond3p2 = p.wiki(stem.. "eraient")
		cong1s = p.wiki(stem.sub(stem, 1, -2) .. "ie"); cong1s2 = p.wiki(stem.. "e"); cong2s = p.wiki(stem.sub(stem, 1, -2) .. "ies"); cong2s2 = p.wiki(stem.. "es"); cong3s = p.wiki(stem.sub(stem, 1, -2) .. "ie"); cong3s2 = p.wiki(stem.. "e")
		cong1p = p.wiki(stem .. "ions");  cong2p = p.wiki(stem .. "iez");  cong3p = p.wiki(stem.sub(stem, 1, -2) .. "ient"); cong3p2 = p.wiki(stem.. "ent")
		congimp1s = p.wiki(stem .. "asse"); congimp2s = p.wiki(stem.. "asses");  congimp3s = p.wiki(stem .. "ât")
		congimp1p = p.wiki(stem .. "assions");  congimp2p = p.wiki(stem .. "assiez");  congimp3p = p.wiki(stem .. "assent")
		imp2s = p.wiki(stem.sub(stem, 1, -2) .. "ie"); imp2s2 = p.wiki(stem.. "e");  imp3s = ""
		imp1p = p.wiki(stem .. "ons");  imp2p = p.wiki(stem .. "ez");  imp3p = "" 
    elseif (type == "eyer") or (type == "eyer-se") then
		inf = p.wiki(stem .. "er")
		par = p.wiki(stem .. "ant"); pp = p.wiki(stem .. "é"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem .. "e");  pres2s = p.wiki(stem .. "es");  pres3s = p.wiki(stem .. "e")
		pres1p = p.wiki(stem .. "ons");  pres2p = p.wiki(stem .. "ez");  pres3p = p.wiki(stem .. "ent")        
		imperf1s = p.wiki(stem .. "ais");  imperf2s = p.wiki(stem .. "ais");  imperf3s = p.wiki(stem .. "ait")
		imperf1p = p.wiki(stem .. "ions");  imperf2p = p.wiki(stem .. "iez");  imperf3p = p.wiki(stem .. "aient") 
		prem1s = p.wiki(stem .. "ai");  prem2s = p.wiki(stem .. "as");  prem3s = p.wiki(stem .. "a")
		prem1p = p.wiki(stem .. "âmes");  prem2p = p.wiki(stem .. "âtes");  prem3p = p.wiki(stem .. "èrent") 
		fut1s = p.wiki(stem .. "erai");  fut2s = p.wiki(stem .. "eras");  fut3s = p.wiki(stem .. "era")
		fut1p = p.wiki(stem .. "erons");  fut2p = p.wiki(stem .. "erez");  fut3p = p.wiki(stem .. "eront") 
		cond1s = p.wiki(stem .. "erais");  cond2s = p.wiki(stem .. "erais");  cond3s = p.wiki(stem .. "erait")
		cond1p = p.wiki(stem .. "erions");  cond2p = p.wiki(stem .. "eriez");  cond3p = p.wiki(stem .. "eraient") 
		cong1s = p.wiki(stem .. "e"); cong2s=p.wiki(stem .. "es"); cong3s = p.wiki(stem .. "e")
		cong1p = p.wiki(stem .. "ions");  cong2p = p.wiki(stem .. "iez");  cong3p = p.wiki(stem .. "ent")
		congimp1s = p.wiki(stem .. "asse"); congimp2s = p.wiki(stem.. "asses");  congimp3s = p.wiki(stem .. "ât")
		congimp1p = p.wiki(stem .. "assions");  congimp2p = p.wiki(stem .. "assiez");  congimp3p = p.wiki(stem .. "assent")
		imp2s = p.wiki(stem .. "e");  imp3s = ""
		imp1p = p.wiki(stem .. "ons");  imp2p = p.wiki(stem .. "ez");  imp3p = ""  
    elseif (type == "eler") or (type == "eter") or (type == "eler-se") or (type == "eter-se") then
		inf = p.wiki(stem .. "er")
		par = p.wiki(stem .. "ant"); pp = p.wiki(stem .. "é"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem .. stem.sub(stem, -1) .. "e");  pres2s = p.wiki(stem .. stem.sub(stem, -1) .. "es");  pres3s = p.wiki(stem .. stem.sub(stem, -1) .. "e")
		pres1p = p.wiki(stem .. "ons");  pres2p = p.wiki(stem .. "ez");  pres3p = p.wiki(stem .. stem.sub(stem, -1) .. "ent")        
		imperf1s = p.wiki(stem .. "ais");  imperf2s = p.wiki(stem .. "ais");  imperf3s = p.wiki(stem .. "ait")
		imperf1p = p.wiki(stem .. "ions");  imperf2p = p.wiki(stem .. "iez");  imperf3p = p.wiki(stem .. "aient") 
		prem1s = p.wiki(stem .. "ai");  prem2s = p.wiki(stem .. "as");  prem3s = p.wiki(stem .. "a")
		prem1p = p.wiki(stem .. "âmes");  prem2p = p.wiki(stem .. "âtes");  prem3p = p.wiki(stem .. "èrent") 
		fut1s = p.wiki(stem .. stem.sub(stem, -1) .. "erai");  fut2s = p.wiki(stem .. stem.sub(stem, -1) .. "eras");  fut3s = p.wiki(stem .. stem.sub(stem, -1) .. "era")
		fut1p = p.wiki(stem .. stem.sub(stem, -1) .. "erons");  fut2p = p.wiki(stem .. stem.sub(stem, -1) .. "erez");  fut3p = p.wiki(stem .. stem.sub(stem, -1) .. "eront") 
		cond1s = p.wiki(stem .. stem.sub(stem, -1) .. "erais");  cond2s = p.wiki(stem .. stem.sub(stem, -1) .. "erais");  cond3s = p.wiki(stem .. stem.sub(stem, -1) .. "erait")
		cond1p = p.wiki(stem .. stem.sub(stem, -1) .. "erions");  cond2p = p.wiki(stem .. stem.sub(stem, -1) .. "eriez");  cond3p = p.wiki(stem .. stem.sub(stem, -1) .. "eraient") 
		cong1s = p.wiki(stem .. stem.sub(stem, -1) .. "e"); cong2s=p.wiki(stem .. stem.sub(stem, -1) .. "es"); cong3s = p.wiki(stem .. stem.sub(stem, -1) .. "e")
		cong1p = p.wiki(stem .. "ions");  cong2p = p.wiki(stem .. "iez");  cong3p = p.wiki(stem .. stem.sub(stem, -1) .. "ent")
		congimp1s = p.wiki(stem .. "asse"); congimp2s = p.wiki(stem.. "asses");  congimp3s = p.wiki(stem .. "ât")
		congimp1p = p.wiki(stem .. "assions");  congimp2p = p.wiki(stem .. "assiez");  congimp3p = p.wiki(stem .. "assent")
		imp2s = p.wiki(stem .. stem.sub(stem, -1) .. "e");  imp3s = ""
		imp1p = p.wiki(stem .. "ons");  imp2p = p.wiki(stem .. "ez");  imp3p = ""  
    elseif (type == "ir") or (type == "ir-se") then
		inf = p.wiki(stem .. "ir")
		par = p.wiki(stem .. "issant"); pp = p.wiki(stem .. "i"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem .. "is");  pres2s = p.wiki(stem .. "is");  pres3s = p.wiki(stem .. "it")
		pres1p = p.wiki(stem .. "issons");  pres2p = p.wiki(stem .. "issez");  pres3p = p.wiki(stem .. "issent")        
		imperf1s = p.wiki(stem .. "issais");  imperf2s = p.wiki(stem .. "issais");  imperf3s = p.wiki(stem .. "issait")
		imperf1p = p.wiki(stem .. "issions");  imperf2p = p.wiki(stem .. "issiez");  imperf3p = p.wiki(stem .. "issaient") 
		prem1s = p.wiki(stem .. "is");  prem2s = p.wiki(stem .. "is");  prem3s = p.wiki(stem .. "it")
		prem1p = p.wiki(stem .. "îmes");  prem2p = p.wiki(stem .. "îtes");  prem3p = p.wiki(stem .. "irent") 
		fut1s = p.wiki(stem .. "irai");  fut2s = p.wiki(stem .. "iras");  fut3s = p.wiki(stem .. "ira")
		fut1p = p.wiki(stem .. "irons");  fut2p = p.wiki(stem .. "irez");  fut3p = p.wiki(stem .. "iront") 
		cond1s = p.wiki(stem .. "irais");  cond2s = p.wiki(stem .. "irais");  cond3s = p.wiki(stem .. "irait")
		cond1p = p.wiki(stem .. "irions");  cond2p = p.wiki(stem .. "iriez");  cond3p = p.wiki(stem .. "iraient") 
		cong1s = p.wiki(stem .. "isse"); cong2s=p.wiki(stem .. "isses"); cong3s = p.wiki(stem .. "isse")
		cong1p = p.wiki(stem .. "issions");  cong2p = p.wiki(stem .. "issiez");  cong3p = p.wiki(stem .. "issent")
		congimp1s = p.wiki(stem .. "isse"); congimp2s = p.wiki(stem.. "isses");  congimp3s = p.wiki(stem .. "ît")
		congimp1p = p.wiki(stem .. "issions");  congimp2p = p.wiki(stem .. "issiez");  congimp3p = p.wiki(stem .. "issent")
		imp2s = p.wiki(stem .. "is");  imp3s = ""
		imp1p = p.wiki(stem .. "issons");  imp2p = p.wiki(stem .. "issez");  imp3p = ""  
		elseif (type == "ir3") or (type == "ir3-se") then
		inf = p.wiki(stem .. "ir")
		par = p.wiki(stem .. "ant"); pp = p.wiki(stem .. "i"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem.sub(stem, 1, -2) .. "s");  pres2s = p.wiki(stem.sub(stem, 1, -2) .. "s");  pres3s = p.wiki(stem.sub(stem, 1, -2) .. "t")
		pres1p = p.wiki(stem .. "ons");  pres2p = p.wiki(stem .. "ez");  pres3p = p.wiki(stem .. "ent")        
		imperf1s = p.wiki(stem .. "ais");  imperf2s = p.wiki(stem .. "ais");  imperf3s = p.wiki(stem .. "ait")
		imperf1p = p.wiki(stem .. "ions");  imperf2p = p.wiki(stem .. "iez");  imperf3p = p.wiki(stem .. "aient") 
		prem1s = p.wiki(stem .. "is");  prem2s = p.wiki(stem .. "is");  prem3s = p.wiki(stem .. "it")
		prem1p = p.wiki(stem .. "îmes");  prem2p = p.wiki(stem .. "îtes");  prem3p = p.wiki(stem .. "irent") 
		fut1s = p.wiki(stem .. "irai");  fut2s = p.wiki(stem .. "iras");  fut3s = p.wiki(stem .. "ira")
		fut1p = p.wiki(stem .. "irons");  fut2p = p.wiki(stem .. "irez");  fut3p = p.wiki(stem .. "iront") 
		cond1s = p.wiki(stem .. "irais");  cond2s = p.wiki(stem .. "irais");  cond3s = p.wiki(stem .. "irait")
		cond1p = p.wiki(stem .. "irions");  cond2p = p.wiki(stem .. "iriez");  cond3p = p.wiki(stem .. "iraient") 
		cong1s = p.wiki(stem .. "e"); cong2s=p.wiki(stem .. "es"); cong3s = p.wiki(stem .. "e")
		cong1p = p.wiki(stem .. "ions");  cong2p = p.wiki(stem .. "iez");  cong3p = p.wiki(stem .. "ent")
		congimp1s = p.wiki(stem .. "isse"); congimp2s = p.wiki(stem.. "isses");  congimp3s = p.wiki(stem .. "ît")
		congimp1p = p.wiki(stem .. "issions");  congimp2p = p.wiki(stem .. "issiez");  congimp3p = p.wiki(stem .. "issent")
		imp2s = p.wiki(stem.sub(stem, 1, -2) .. "s");  imp3s = ""
		imp1p = p.wiki(stem .. "ons");  imp2p = p.wiki(stem .. "ez");  imp3p = ""  
		elseif (type == "dre") or (type == "dre-se") then
		inf = p.wiki(stem .. "dre")
		par = p.wiki(stem .. "dant"); pp = p.wiki(stem .. "du"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem.. "ds");  pres2s = p.wiki(stem.. "ds");  pres3s = p.wiki(stem.. "d")
		pres1p = p.wiki(stem .. "dons");  pres2p = p.wiki(stem .. "dez");  pres3p = p.wiki(stem .. "dent")        
		imperf1s = p.wiki(stem .. "dais");  imperf2s = p.wiki(stem .. "dais");  imperf3s = p.wiki(stem .. "dait")
		imperf1p = p.wiki(stem .. "dions");  imperf2p = p.wiki(stem .. "diez");  imperf3p = p.wiki(stem .. "daient") 
		prem1s = p.wiki(stem .. "dis");  prem2s = p.wiki(stem .. "dis");  prem3s = p.wiki(stem .. "dit")
		prem1p = p.wiki(stem .. "dîmes");  prem2p = p.wiki(stem .. "dîtes");  prem3p = p.wiki(stem .. "dirent") 
		fut1s = p.wiki(stem .. "drai");  fut2s = p.wiki(stem .. "dras");  fut3s = p.wiki(stem .. "dra")
		fut1p = p.wiki(stem .. "drons");  fut2p = p.wiki(stem .. "drez");  fut3p = p.wiki(stem .. "dront") 
		cond1s = p.wiki(stem .. "drais");  cond2s = p.wiki(stem .. "drais");  cond3s = p.wiki(stem .. "drait")
		cond1p = p.wiki(stem .. "drions");  cond2p = p.wiki(stem .. "driez");  cond3p = p.wiki(stem .. "draient") 
		cong1s = p.wiki(stem .. "de"); cong2s=p.wiki(stem .. "des"); cong3s = p.wiki(stem .. "de")
		cong1p = p.wiki(stem .. "dions");  cong2p = p.wiki(stem .. "diez");  cong3p = p.wiki(stem .. "dent")
		congimp1s = p.wiki(stem .. "disse"); congimp2s = p.wiki(stem.. "disses");  congimp3s = p.wiki(stem .. "dît")
		congimp1p = p.wiki(stem .. "dissions");  congimp2p = p.wiki(stem .. "dissiez");  congimp3p = p.wiki(stem .. "dissent")
		imp2s = p.wiki(stem.. "ds");  imp3s = ""
		imp1p = p.wiki(stem .. "dons");  imp2p = p.wiki(stem .. "dez");  imp3p = ""
    elseif (type == "re") or (type == "re-se") or (type == "oir") or (type == "oir-se") then
		if type == "oir" or type == "oir-se" then inf = p.wiki(stem .. "oir") elseif type == "re" or type == "re-se" then inf = p.wiki(stem.. "re") end
		par = p.wiki(stem .. "ant"); pp = p.wiki(stem .. "i"); pplur = p.plurale(-2, pp, "s]]")
		pres1s = p.wiki(stem .. "s");  pres2s = p.wiki(stem .. "s");  pres3s = p.wiki(stem .. "t")
		pres1p = p.wiki(stem .. "ons");  pres2p = p.wiki(stem .. "ez");  pres3p = p.wiki(stem .. "ent")        
		imperf1s = p.wiki(stem .. "ais");  imperf2s = p.wiki(stem .. "ais");  imperf3s = p.wiki(stem .. "ait")
		imperf1p = p.wiki(stem .. "ions");  imperf2p = p.wiki(stem .. "iez");  imperf3p = p.wiki(stem .. "aient") 
		prem1s = p.wiki(stem .. "is");  prem2s = p.wiki(stem .. "is");  prem3s = p.wiki(stem .. "it")
		prem1p = p.wiki(stem .. "îmes");  prem2p = p.wiki(stem .. "îtes");  prem3p = p.wiki(stem .. "irent") 
		fut1s = p.wiki(stem .. "irai");  fut2s = p.wiki(stem .. "iras");  fut3s = p.wiki(stem .. "ira")
		fut1p = p.wiki(stem .. "irons");  fut2p = p.wiki(stem .. "irez");  fut3p = p.wiki(stem .. "iront") 
		cond1s = p.wiki(stem .. "irais");  cond2s = p.wiki(stem .. "irais");  cond3s = p.wiki(stem .. "irait")
		cond1p = p.wiki(stem .. "irions");  cond2p = p.wiki(stem .. "iriez");  cond3p = p.wiki(stem .. "iraient") 
		cong1s = p.wiki(stem .. "e"); cong2s=p.wiki(stem .. "es"); cong3s = p.wiki(stem .. "e")
		cong1p = p.wiki(stem .. "ions");  cong2p = p.wiki(stem .. "iez");  cong3p = p.wiki(stem .. "ent")
		congimp1s = p.wiki(stem .. "isse"); congimp2s = p.wiki(stem.. "isses");  congimp3s = p.wiki(stem .. "ît")
		congimp1p = p.wiki(stem .. "issions");  congimp2p = p.wiki(stem .. "issiez");  congimp3p = p.wiki(stem .. "issent")
		imp2s = p.wiki(stem .. "s");  imp3s = ""
		imp1p = p.wiki(stem .. "ons");  imp2p = p.wiki(stem .. "ez");  imp3p = ""
	else error("Verb type " .. type .. "not supported.")
	end
	
-- Variabile per i verbi riflessivi
    if type == "er-se" or type == "cer-se" or type == "ger-se" or type == "éer-se" or type == "oyer-se" or type == "uyer-se" or type == "ayer-se" or type == "eyer-se" or type == "eler-se" or type == "eter-se" or type == "ir-se" or type == "ir3-se" or type == "oir-se" or type == "re-se" or type == "dre-se" then
    	refl = true
    else
    	refl = false
    end
-- Genera i pronomi riflessivi (con l'apostrofo se la radice inizia per vocale)
    if refl then 
    	refl_exist = true
    	nous = "nous "; vous = "vous "
    	me1 = "me "; te1 = "te "; se1 = "se "
    	me2 = "m'"; te2 = "t'"; se2 = "s'"
    	teimp = "-toi"; nousimp = "-nous"; vousimp = "-vous"
    	if mw.ustring.find(stem, "^[aàâeéèêëiîïoôuùûüh]") then me = "m'"; te = "t'"; se = "s'"
        elseif mw.ustring.find(stem, "^[^aàâeéèêëiîïoôuùûüh]") then me = "me "; te = "te "; se = "se " end
    else me = ""; te = ""; se = ""; nous = ""; vous = ""; me1 = ""; te1 = ""; se1 = ""; me2 = ""; te2 = ""; se2 = ""; teimp = ""; nousimp = ""; vousimp = ""
    end
    
--questo genera la stringa "pron", cioé la particella pronominale con o senza accento, da utilizzare nel link ai riflessivi subito sotto
	if refl == false then
		if mw.ustring.find(stem, "^[aàâeéèêëiîïoôuùûüh]") then pron = "s'"
		else pron = "se " end
	else
		pron = ""
	end
    
--genera il link ai riflessivi
	if type == "er" or type == "cer" or type == "ger" or type == "oyer" or type == "uyer" or type == "ayer" or type == "eyer" or type == "eler" or type == "eter"   
	or type == "er-se" or type == "cer-se" or type == "ger-se" or type == "oyer-se" or type == "uyer-se" or type == "ayer-se" or type == "eyer-se" or type == "eler-se" or type == "eter-se" then
    	if mw.title.new(pron.. stem.. "er").exists == true or mw.title.new("Appendice:Coniugazioni/Francese/".. pron.. stem.. "er").exists == true then --cerca se esiste il lemma o la coniugazione della forma riflessiva del verbo
			refl_exist = true; refl_link = p.wiki(pron.. stem .. "er"); refl_conjlink = " ([[Appendice:Coniugazioni/Francese/".. pron.. stem .. "er|coniugazione]])" --se esiste il riflessivo, genera link al verbo in ns0 e alla relativa coniugazione in appendice
		else
			refl_exist = false; refl_link = ""; refl_conjlink = "" --se non esiste il riflessivo, annulla i link
		end
	elseif type == "éer" or type == "éer-se" then
		if mw.title.new(pron.. stem.. "éer").exists == true or mw.title.new("Appendice:Coniugazioni/Francese/".. pron.. stem.. "éer").exists == true then --cerca se esiste il lemma o la coniugazione della forma riflessiva del verbo
			refl_exist = true; refl_link = p.wiki(pron.. stem .. "er"); refl_conjlink = " ([[Appendice:Coniugazioni/Francese/".. pron.. stem .. "éer|coniugazione]])" --se esiste il riflessivo, genera link al verbo in ns0 e alla relativa coniugazione in appendice
		else
			refl_exist = false; refl_link = ""; refl_conjlink = "" --se non esiste il riflessivo, annulla i link
		end
	elseif type == "ir" or type == "ir-se" or type == "ir3" or type == "ir3-se" then
		if mw.title.new(pron.. stem.. "ir").exists == true or mw.title.new("Appendice:Coniugazioni/Francese/".. pron.. stem.. "ir").exists == true then --cerca se esiste il lemma o la coniugazione della forma riflessiva del verbo
			refl_exist = true; refl_link = p.wiki(pron.. stem .. "ir"); refl_conjlink = " ([[Appendice:Coniugazioni/Francese/".. pron.. stem .. "ir|coniugazione]])" --se esiste il riflessivo, genera link al verbo in ns0 e alla relativa coniugazione in appendice
		else
			refl_exist = false; refl_link = ""; refl_conjlink = "" --se non esiste il riflessivo, annulla i link
		end
	elseif type == "dre" or type == "dre-se" then
		if mw.title.new(pron.. stem.. "dre").exists == true or mw.title.new("Appendice:Coniugazioni/Francese/".. pron.. stem.. "dre").exists == true then --cerca se esiste il lemma o la coniugazione della forma riflessiva del verbo
			refl_exist = true; refl_link = p.wiki(pron.. stem .. "ir"); refl_conjlink = " ([[Appendice:Coniugazioni/Francese/".. pron.. stem .. "dre|coniugazione]])" --se esiste il riflessivo, genera link al verbo in ns0 e alla relativa coniugazione in appendice
		else
			refl_exist = false; refl_link = ""; refl_conjlink = "" --se non esiste il riflessivo, annulla i link
		end
	elseif type == "re" or type == "re-se" then
		if mw.title.new(pron.. stem.. "re").exists == true or mw.title.new("Appendice:Coniugazioni/Francese/".. pron.. stem.. "re").exists == true then --cerca se esiste il lemma o la coniugazione della forma riflessiva del verbo
			refl_exist = true; refl_link = p.wiki(pron.. stem .. "ir"); refl_conjlink = " ([[Appendice:Coniugazioni/Francese/".. pron.. stem .. "re|coniugazione]])" --se esiste il riflessivo, genera link al verbo in ns0 e alla relativa coniugazione in appendice
		else
			refl_exist = false; refl_link = ""; refl_conjlink = "" --se non esiste il riflessivo, annulla i link
		end
	elseif type == "oir" or type == "oir-se" then
		if mw.title.new(pron.. stem.. "oir").exists == true or mw.title.new("Appendice:Coniugazioni/Francese/".. pron.. stem.. "oir").exists == true then --cerca se esiste il lemma o la coniugazione della forma riflessiva del verbo
			refl_exist = true; refl_link = p.wiki(pron.. stem .. "ir"); refl_conjlink = " ([[Appendice:Coniugazioni/Francese/".. pron.. stem .. "oir|coniugazione]])" --se esiste il riflessivo, genera link al verbo in ns0 e alla relativa coniugazione in appendice
		else
			refl_exist = false; refl_link = ""; refl_conjlink = "" --se non esiste il riflessivo, annulla i link
		end
	end
    
-- Recupera le eventuali forme irregolari o varianti, rimpiazziandole o aggiungendole a quelle standard
-- Forme impersonali e participi
    inf = p.over(inf,args["inf"])
    par = p.over(par,args["par"])
    par2 = p.wiki(args["par2"])
    par = p.alts(par, par2)
    ger = "en ".. par
    pp = p.over(pp,args["pp"])
    pp2 = p.wiki(args["pp2"]);  pp3 = p.wiki(args["pp3"]);  pp3 = p.wiki(args["pp3"]);  pp4 = p.wiki(args["pp4"])
    pp = p.alts(pp, pp2); pp = p.alts(pp, pp3); pp = p.alts(pp, pp4)
-- Presente indicativo
    pres1s = p.over(pres1s,args["pres1s"]); pres2s = p.over(pres2s,args["pres2s"]); pres3s = p.over(pres3s,args["pres3s"])
    pres1p = p.over(pres1p,args["pres1p"]); pres2p = p.over(pres2p,args["pres2p"]); pres3p = p.over(pres3p,args["pres3p"])
    pres1s2 = p.wiki(args["pres1s2"]);  pres2s2 = p.wiki(args["pres2s2"]);  pres3s2 = p.wiki(args["pres3s2"])
    pres1p2 = p.wiki(args["pres1p2"]);  pres2p2 = p.wiki(args["pres2p2"]);  pres3p2 = p.wiki(args["pres3p2"])
    pres1s = p.alts(pres1s, pres1s2); pres2s = p.alts(pres2s, pres2s2); pres3s = p.alts(pres3s, pres3s2) 
    pres1p = p.alts(pres1p, pres1p2); pres2p = p.alts(pres2p, pres2p2); pres3p = p.alts(pres3p, pres3p2)     
-- Imperfetto
    imperf1s = p.over(imperf1s,args["imperf1s"]); imperf2s = p.over(imperf2s,args["imperf2s"]); imperf3s = p.over(imperf3s,args["imperf3s"])
    imperf1p = p.over(imperf1p,args["imperf1p"]); imperf2p = p.over(imperf2p,args["imperf2p"]); imperf3p = p.over(imperf3p,args["imperf3p"])
    imperf1s2 = p.wiki(args["imperf1s2"]);  imperf2s2 = p.wiki(args["imperf2s2"]);  imperf3s2 = p.wiki(args["imperf3s2"])
    imperf1p2 = p.wiki(args["imperf1p2"]);  imperf2p2 = p.wiki(args["imperf2p2"]);  imperf3p2 = p.wiki(args["imperf3p2"])
    imperf1s = p.alts(imperf1s, imperf1s2); imperf2s = p.alts(imperf2s, imperf2s2); imperf3s = p.alts(imperf3s, imperf3s2)
    imperf1p = p.alts(imperf1p, imperf1p2); imperf2p = p.alts(imperf2p, imperf2p2); imperf3p = p.alts(imperf3p, imperf3p2)
-- Passato Remoto (Past historic)
    prem1s = p.over(prem1s,args["prem1s"]); prem2s = p.over(prem2s,args["prem2s"]); prem3s = p.over(prem3s,args["prem3s"])
    prem1p = p.over(prem1p,args["prem1p"]); prem2p = p.over(prem2p,args["prem2p"]); prem3p = p.over(prem3p,args["prem3p"])
    prem1s2 = p.wiki(args["prem1s2"]);  prem2s2 = p.wiki(args["prem2s2"]);  prem3s2 = p.wiki(args["prem3s2"])
    prem1p2 = p.wiki(args["prem1p2"]);  prem2p2 = p.wiki(args["prem2p2"]);  prem3p2 = p.wiki(args["prem3p2"])
    prem1s = p.alts(prem1s, prem1s2); prem2s = p.alts(prem2s, prem2s2); prem3s = p.alts(prem3s, prem3s2)
    prem1p = p.alts(prem1p, prem1p2); prem2p = p.alts(prem2p, prem2p2); prem3p = p.alts(prem3p, prem3p2)
-- Alternative extra per il passato remoto
    prem1s3 = p.wiki(args["prem1s3"]); prem1s = p.alts(prem1s, prem1s3)
    prem3s3 = p.wiki(args["prem3s3"]); prem3s = p.alts(prem3s, prem3s3)
    prem3p3 = p.wiki(args["prem3p3"]); prem3p = p.alts(prem3p, prem3p3)
-- Futuro
    fut1s = p.over(fut1s,args["fut1s"]); fut2s = p.over(fut2s,args["fut2s"]); fut3s = p.over(fut3s,args["fut3s"])
    fut1p = p.over(fut1p,args["fut1p"]); fut2p = p.over(fut2p,args["fut2p"]); fut3p = p.over(fut3p,args["fut3p"])
    fut1s2 = p.wiki(args["fut1s2"]);  fut2s2 = p.wiki(args["fut2s2"]);  fut3s2 = p.wiki(args["fut3s2"])
    fut1p2 = p.wiki(args["fut1p2"]);  fut2p2 = p.wiki(args["fut2p2"]);  fut3p2 = p.wiki(args["fut3p2"])
    fut1s = p.alts(fut1s, fut1s2); fut2s = p.alts(fut2s, fut2s2); fut3s = p.alts(fut3s, fut3s2)
    fut1p = p.alts(fut1p, fut1p2); fut2p = p.alts(fut2p, fut2p2); fut3p = p.alts(fut3p, fut3p2)
-- Condizionale
    cond1s = p.over(cond1s,args["cond1s"]); cond2s = p.over(cond2s,args["cond2s"]); cond3s = p.over(cond3s,args["cond3s"])
    cond1p = p.over(cond1p,args["cond1p"]); cond2p = p.over(cond2p,args["cond2p"]); cond3p = p.over(cond3p,args["cond3p"])
    cond1s2 = p.wiki(args["cond1s2"]);  cond2s2 = p.wiki(args["cond2s2"]);  cond3s2 = p.wiki(args["cond3s2"])
    cond1p2 = p.wiki(args["cond1p2"]);  cond2p2 = p.wiki(args["cond2p2"]);  cond3p2 = p.wiki(args["cond3p2"])
    cond1s = p.alts(cond1s, cond1s2); cond2s = p.alts(cond2s, cond2s2); cond3s = p.alts(cond3s, cond3s2)
    cond1p = p.alts(cond1p, cond1p2); cond2p = p.alts(cond2p, cond2p2); cond3p = p.alts(cond3p, cond3p2)
-- Presente congiuntivo
    cong1s = p.over(cong1s,args["cong1s"]); cong2s = p.over(cong2s,args["cong2s"]); cong3s = p.over(cong3s,args["cong3s"])
    cong1p = p.over(cong1p,args["cong1p"]); cong2p = p.over(cong2p,args["cong2p"]); cong3p = p.over(cong3p,args["cong3p"])
    cong1s2 = p.wiki(args["cong1s2"]);  cong2s2 = p.wiki(args["cong2s2"]);  cong3s2 = p.wiki(args["cong3s2"])
    cong1p2 = p.wiki(args["cong1p2"]);  cong2p2 = p.wiki(args["cong2p2"]);  cong3p2 = p.wiki(args["cong3p2"])
    cong1s = p.alts(cong1s, cong1s2); cong2s = p.alts(cong2s, cong2s2); cong3s = p.alts(cong3s, cong3s2)
    cong1p = p.alts(cong1p, cong1p2); cong2p = p.alts(cong2p, cong2p2); cong3p = p.alts(cong3p, cong3p2)
-- Imperfetto congiuntivo
    congimp1s = p.over(congimp1s,args["congimp1s"]); congimp2s = p.over(congimp2s,args["congimp2s"]); congimp3s = p.over(congimp3s,args["congimp3s"])
    congimp1p = p.over(congimp1p,args["congimp1p"]); congimp2p = p.over(congimp2p,args["congimp2p"]); congimp3p = p.over(congimp3p,args["congimp3p"])
    congimp1s2 = p.wiki(args["congimp1s2"]); congimp2s2 = p.wiki(args["congimp2s2"]); congimp3s2 = p.wiki(args["congimp3s2"])
    congimp1p2 = p.wiki(args["congimp1p2"]);  congimp2p2 = p.wiki(args["congimp2p2"]);  congimp3p2 = p.wiki(args["congimp3p2"])
    congimp1s = p.alts(congimp1s, congimp1s2); congimp2s = p.alts(congimp2s, congimp2s2); congimp3s = p.alts(congimp3s, congimp3s2)
    congimp1p = p.alts(congimp1p, congimp1p2); congimp2p = p.alts(congimp2p, congimp2p2); congimp3p = p.alts(congimp3p, congimp3p2)    
-- Imperativo
    imp2s = p.over(imp2s,args["imp2s"]); imp3s = p.over(imp3s,args["imp3s"])
    imp1p = p.over(imp1p,args["imp1p"]); imp2p = p.over(imp2p,args["imp2p"]); imp3p = p.over(imp3p,args["imp3p"])
    imp2s2 = p.wiki(args["imp2s2"]);  imp3s2 = p.wiki(args["imp3s2"])
    imp1p2 = p.wiki(args["imp1p2"]);  imp2p2 = p.wiki(args["imp2p2"]);  imp3p2 = p.wiki(args["imp3p2"])
    imp2s = p.alts(imp2s, imp2s2); imp3s = p.alts(imp3s, imp3s2)
    imp1p = p.alts(imp1p, imp1p2); imp2p = p.alts(imp2p, imp2p2); imp3p = p.alts(imp3p, imp3p2)
-- Alternativa extra per l'imperativo
     imp2s3 = p.wiki(args["imp2s3"]); imp2s = p.alts(imp2s, imp2s3)
     
--cerca se uno qualsiasi dei parametri è definito, e in base a questo definisce la stringa reg_irreg come "irregolare" o "regolare"
    if 
	    args["inf"] ~= nil or args["ger"] ~= nil or args["par"] ~= nil or args["pp"] ~= nil
	    or args["pres1s"] ~= nil or args["pres1s2"] ~= nil or args["pres2s"] ~= nil or args["pres3s"] ~= nil or args["pres1p"] ~= nil or args["pres2p"] ~= nil or args["pres3p"] ~= nil
	    or args["imperf1s"] ~= nil or args["imperf2s"] ~= nil or args["imperf3s"] ~= nil or args["imperf1p"] ~= nil or args["imperf2p"] ~= nil or args["imperf3p"] ~= nil
	    or args["prem1s"] ~= nil or args["prem1s2"] ~= nil or args["prem2s"] ~= nil or args["prem3s"] ~= nil or args["prem3s2"] ~= nil or args["prem1p"] ~= nil or args["prem2p"] ~= nil or args["prem3p"] ~= nil or args["prem3p2"] ~= nil
	    or args["fut1s"] ~= nil or args["fut2s"] ~= nil or args["fut3s"] ~= nil or args["fut1p"] ~= nil or args["fut2p"] ~= nil or args["fut3p"] ~= nil
	    or args["cond1s"] ~= nil or args["cond2s"] ~= nil or args["cond3s"] ~= nil or args["cond1p"] ~= nil or args["cond2p"] ~= nil or args["cond3p"] ~= nil
	    or args["cong123s"] ~= nil or args["cong1p"] ~= nil or args["cong2p"] ~= nil or args["cong3p"] ~= nil
	    or args["imp12s"] ~= nil or args["imp3s"] ~= nil or args["imp1p"] ~= nil or args["imp2p"] ~= nil or args["imp3p"] ~= nil
	    or args["imp2s2"] ~= nil or args["imp2s3"] ~= nil or args["imp3s"] ~= nil or args["imp1p"] ~= nil or args["imp2p"] ~= nil or args["imp3p"] ~= nil
    then 
    	if args["irregolare"] == "no" then
    		irregolaredescr = ""; reg_irreg = " regolari "
    	else
    		irregolaredescr = " '''(irregolare)'''"; reg_irreg = " irregolari "
		end
    else --se nessun parametro è definito...
    	if type == "dre" or type == "re" or type == "oir" then --questi qui sono comunque irregolari anche se non hanno parametri definiti
    		irregolaredescr = " '''(irregolare)'''"; reg_irreg = " irregolari "
    	else --per tutti gli altri senza parametri definiti, le categorie diventano "regolari"
    		irregolaredescr = ""; reg_irreg = " regolari "
		end
	end

--in base alla desinenza "type", costruisce la descizione e aggiunge le categorie
    if type == "er" or type == "cer" or type == "ger" or type == "éer" or type == "oyer" or type == "uyer" or type == "ayer" or type == "eyer" or type == "eler" or type == "eter" then
    		conjdescr = "'''verbo del primo gruppo'''"; conjcat = categorizza("Coniugazioni dei verbi del primo gruppo in francese",titolo)
    		irregolarecat = categorizza("Coniugazioni dei verbi".. reg_irreg.. "in francese",titolo).." "..categorizza("Coniugazioni dei verbi".. reg_irreg.. "del primo gruppo in francese",titolo)
    elseif type == "ir" then
    		conjdescr = "'''verbo del secondo gruppo'''"; conjcat = categorizza("Coniugazioni dei verbi del secondo gruppo in francese", titolo)
    		irregolarecat = categorizza("Coniugazioni dei verbi".. reg_irreg.. "in francese", titolo).." "..categorizza("Coniugazioni dei verbi".. reg_irreg.. "del secondo gruppo in francese", titolo)
    elseif type == "ir3" then
    		conjdescr = "'''verbo del terzo gruppo'''"; conjcat = categorizza("Coniugazioni dei verbi del terzo gruppo in francese", titolo)
    		irregolarecat = categorizza("Coniugazioni dei verbi".. reg_irreg.. "in francese", titolo).." "..categorizza("Coniugazioni dei verbi".. reg_irreg.. "del terzo gruppo in francese", titolo)
	elseif type == "dre" or type == "re" or type == "oir" then
			conjdescr = "'''verbo del terzo gruppo'''"; conjcat = categorizza("Coniugazioni dei verbi del terzo gruppo in francese", titolo)
    		irregolarecat = categorizza("Coniugazioni dei verbi".. reg_irreg.. "in francese", titolo).." "..categorizza("Coniugazioni dei verbi".. reg_irreg.. "del terzo gruppo in francese", titolo)
    elseif type == "er-se" or type == "cer-se" or type == "ger-se" or type == "éer-se" or type == "oyer-se" or type == "uyer-se" or type == "ayer-se" or type == "eyer-se" or type == "eler-se" or type == "eter-se" then
    		conjdescr = "'''verbo riflessivo pronominale del primo gruppo'''"; conjcat = categorizza("Coniugazioni dei verbi del primo gruppo in francese",titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali del primo gruppo in francese", titolo)
    		irregolarecat = categorizza("Coniugazioni dei verbi".. reg_irreg.. "in francese", titolo).." "..categorizza("Coniugazioni dei verbi".. reg_irreg.. "del primo gruppo in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali".. reg_irreg.. "in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali".. reg_irreg.. "del primo gruppo in francese", titolo)
    		irregolarecat = categorizza("Coniugazioni dei verbi".. reg_irreg.. "in francese", titolo).." "..categorizza("Coniugazioni dei verbi".. reg_irreg.. "del secondo gruppo in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali".. reg_irreg.. "in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali".. reg_irreg.. "del secondo gruppo in francese", titolo)
    elseif type == "ir-se" then
    		conjdescr = "'''verbo riflessivo pronominale del secondo gruppo'''"; conjcat = categorizza("Coniugazioni dei verbi del secondo gruppo in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali del secondo gruppo in francese", titolo)
    		irregolarecat = categorizza("Coniugazioni dei verbi".. reg_irreg.. "in francese", titolo).." "..categorizza("Coniugazioni dei verbi".. reg_irreg.. "del secondo gruppo in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali".. reg_irreg.. "in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali".. reg_irreg.. "del secondo gruppo in francese", titolo)
    elseif type == "ir3-se" or type == "dre-se" or type == "re-se" or type == "oir-se" then
    		conjdescr = "'''verbo riflessivo pronominale del terzo gruppo'''"; conjcat = categorizza("Coniugazioni dei verbi del terzo gruppo in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali in francese", titolo).." "..categorizza("Coniugazioni dei verbi riflessivi pronominali del terzo gruppo in francese", titolo)
    		end
    		
--stringa "descrizione", raggruppa tutte le stringhe definite prima per la descrizione e le categorie della coniugazione, regolari/irregolari e riflessivi
--!!ATTENZIONE!! le descrizioni e le categorie regolari/irregolari al momento sono commentate e non escono fuori (anche se di loro funzionerebbero): non è detto servano, gli irregolari francesi sono praticamente tutti nel terzo gruppo, probabilmente sono ridondanti. Inoltre finché abbiamo poche coniugazioni è comunque prematuro...
	descrizione = categorizza("Coniugazioni in francese", titolo).. conjdescr.. conjcat --.. irregolaredescr.. irregolarecat
     
-- Particelle pronominali riflessive
    me = p.over(me,args["me"],0); te = p.over(te,args["te"],0); se = p.over(se,args["se"],0); nous = p.over(nous,args["nous"],0); vous = p.over(vous,args["vous"])  
    
-- Tempi composti
    if args["pp"] == nil then pplur = p.plurale(-2, pp, "s]]") else pplur = "[[".. args["pp"].. "s]]" end
    if pp2 >= "a" then pplur2 = "[[".. args["pp2"].. "s]]" else pplur2 = "0" end
    pplur = p.alts(pplur, pplur2)
-- Passato prossimo
    if aus == "avoir" and pp ~= "" then
    	paspros1s = "[[ai]] ".. pp; paspros2s = "[[as]] ".. pp; paspros3s = "[[a]] ".. pp; paspros1p = "[[avons]] ".. pp; paspros2p = "[[avez]] ".. pp; paspros3p = "[[ont]] ".. pp 
	elseif aus == "être" or aus == "etre" and pp ~= "" then
		aus = "être"
    	paspros1s = me1.. "[[suis]] ".. pp; paspros2s = te2.. "[[es]] ".. pp; paspros3s = se2.. "[[est]] ".. pp; paspros1p = nous.. "[[sommes]] ".. pplur; paspros2p = vous.. "[[êtes]] ".. pplur; paspros3p = se1.. "[[sont]] ".. pplur 
    elseif pp == "" then
    	paspros1s = ""; paspros2s = ""; paspros3s = ""; paspros1p = ""; paspros2p = ""; paspros3p = ""
    else
    	paspros1s = "[[ai]] ".. pp.. "</br>[[suis]] ".. pp; paspros2s = "[[as]] ".. pp.. "</br>[[es]] ".. pp; paspros3s = "[[a]] ".. pp.. "</br>[[est]] ".. pp; paspros1p = "[[avons]] ".. pp.. "</br>[[sommes]] ".. pplur; paspros2p = "[[avez]] ".. pp.. "</br>[[êtes]] ".. pplur; paspros3p = "[[ont]] ".. pp.. "</br>[[sont]] ".. pplur 
	end
-- Trapassato prossimo
    if aus == "avoir" and pp ~= "" then
    	trappros1s = "[[avais]] ".. pp; trappros2s = "[[avais]] ".. pp; trappros3s = "[[avait]] ".. pp; trappros1p = "[[avions]] ".. pp; trappros2p = "[[aviez]] ".. pp; trappros3p = "[[avaient]] ".. pp 
	elseif aus == "être" or aus == "etre" and pp ~= "" then
		aus = "être"
    	trappros1s = me2.. "[[étais]] ".. pp; trappros2s = te2.. "[[étais]] ".. pp; trappros3s = se2.. "[[était]] ".. pp; trappros1p = nous.. "[[étions]] ".. pplur; trappros2p = vous.. "[[étiez]] ".. pplur; trappros3p = se2.. "[[étaient]] ".. pplur 
    elseif pp == "" then
    	trappros1s = ""; trappros2s = ""; trappros3s = ""; trappros1p = ""; trappros2p = ""; trappros3p = ""
    else
    	trappros1s = "[[avais]] ".. pp.. "</br>[[étais]] ".. pp; trappros2s = "[[avais]] ".. pp.. "</br>[[étais]] ".. pp; trappros3s = "[[avait]] ".. pp.. "</br>[[était]] ".. pp; trappros1p = "[[avions]] ".. pp.. "</br>[[étions]] ".. pplur; trappros2p = "[[aviez]] ".. pp.. "</br>[[étiez]] ".. pplur; trappros3p = "[[avaient]] ".. pp.. "</br>[[étaient]] ".. pplur 
	end
-- Trapassato remoto
    if aus == "avoir" and pp ~= "" then
    	traprem1s = "[[eus]] ".. pp; traprem2s = "[[eus]] ".. pp; traprem3s = "[[eut]] ".. pp; traprem1p = "[[eûmes]] ".. pp; traprem2p = "[[eûtes]] ".. pp; traprem3p = "[[eurent]] ".. pp 
	elseif aus == "être" or aus == "etre" and pp ~= "" then
		aus = "être"
    	traprem1s = me1.. "[[fus]] ".. pp; traprem2s = te1.. "[[fus]] ".. pp; traprem3s = se1.. "[[fut]] ".. pp; traprem1p = nous.. "[[fûmes]] ".. pplur; traprem2p = vous.. "[[fûtes]] ".. pplur; traprem3p = se1.. "[[furent]] ".. pplur 
    elseif pp == "" then
    	traprem1s = ""; traprem2s = ""; traprem3s = ""; traprem1p = ""; traprem2p = ""; traprem3p = ""
    else
    	traprem1s = "[[eus]] ".. pp.. "</br>[[fus]] ".. pp; traprem2s = "[[eus]] ".. pp.. "</br>[[fus]] ".. pp; traprem3s = "[[eut]] ".. pp.. "</br>[[fut]] ".. pp; traprem1p = "[[eûmes]] ".. pp.. "</br>[[fûmes]] ".. pplur; traprem2p = "[[eûtes]] ".. pp.. "</br>[[fûtes]] ".. pplur; traprem3p = "[[eurent]] ".. pp.. "</br>[[furent]] ".. pplur 
	end   
-- Futuro anteriore
    if aus == "avoir" and pp ~= "" then
    	futant1s = "[[aurai]] ".. pp; futant2s = "[[auras]] ".. pp; futant3s = "[[aura]] ".. pp; futant1p = "[[aurons]] ".. pp; futant2p = "[[aurez]] ".. pp; futant3p = "[[auront]] ".. pp 
	elseif aus == "être" or aus == "etre" and pp ~= "" then
		aus = "être"
    	futant1s = me1.. "[[serai]] ".. pp; futant2s = te1.. "[[seras]] ".. pp; futant3s = se1.. "[[sera]] ".. pp; futant1p = nous.. "[[serons]] ".. pplur; futant2p = vous.. "[[serez]] ".. pplur; futant3p = se1.. "[[seront]] ".. pplur 
    elseif pp == "" then
    	futant1s = ""; futant2s = ""; futant3s = ""; futant1p = ""; futant2p = ""; futant3p = ""
    else
    	futant1s = "[[aurai]] ".. pp.. "</br>[[serai]] ".. pp; futant2s = "[[auras]] ".. pp.. "</br>[[seras]] ".. pp; futant3s = "[[aura]] ".. pp.. "</br>[[sera]] ".. pp; futant1p = "[[aurons]] ".. pp.. "</br>[[serons]] ".. pplur; futant2p = "[[aurez]] ".. pp.. "</br>[[serez]] ".. pplur; futant3p = "[[auront]] ".. pp.. "</br>[[seront]] ".. pplur 
	end  
-- Condizionale passato
    if aus == "avoir" and pp ~= "" then
    	condpas1s = "[[aurais]] ".. pp; condpas2s = "[[aurais]] ".. pp; condpas3s = "[[aurait]] ".. pp; condpas1p = "[[aurions]] ".. pp; condpas2p = "[[auriez]] ".. pp; condpas3p = "[[auraient]] ".. pp 
	elseif aus == "être" or aus == "etre" and pp ~= "" then
		aus = "être"
    	condpas1s = me1.. "[[serais]] ".. pp; condpas2s = te1.. "[[serais]] ".. pp; condpas3s = se1.. "[[serat]] ".. pp; condpas1p = nous.. "[[serions]] ".. pplur; condpas2p = vous.. "[[seriez]] ".. pplur; condpas3p = se1.. "[[seraient]] ".. pplur 
    elseif pp == "" then
    	condpas1s = ""; condpas2s = ""; condpas3s = ""; condpas1p = ""; condpas2p = ""; condpas3p = ""
    else
    	condpas1s = "[[aurais]] ".. pp.. "</br>[[seras]] ".. pp; condpas2s = "[[aurais]] ".. pp.. "</br>[[seras]] ".. pp; condpas3s = "[[aurait]] ".. pp.. "</br>[[serat]] ".. pp; condpas1p = "[[aurions]] ".. pp.. "</br>[[serions]] ".. pplur; condpas2p = "[[auriez]] ".. pp.. "</br>[[seriez]] ".. pplur; condpas3p = "[[auraient]] ".. pp.. "</br>[[seraient]] ".. pplur 
	end  
-- Congiuntivo passato
    if aus == "avoir" and pp ~= "" then
    	congpas1s = "[[aie]] ".. pp; congpas2s = "[[aies]] ".. pp; congpas3s = "[[ait]] ".. pp; congpas1p = "[[ayons]] ".. pp; congpas2p = "[[ayez]] ".. pp; congpas3p = "[[aient]] ".. pp 
	elseif aus == "être" or aus == "etre" and pp ~= "" then
		aus = "être"
    	congpas1s = me1.. "[[sois]] ".. pp; congpas2s = te1.. "[[sois]] ".. pp; congpas3s = se1.. "[[soit]] ".. pp; congpas1p = nous.. "[[soyons]] ".. pplur; congpas2p = vous.. "[[soyez]] ".. pplur; congpas3p = se1.. "[[soient]] ".. pplur 
    elseif pp == "" then
    	congpas1s = ""; congpas2s = ""; congpas3s = ""; congpas1p = ""; congpas2p = ""; congpas3p = ""
    else
    	congpas1s = "[[aies]] ".. pp.. "</br>[[sois]] ".. pp; congpas2s = "[[aies]] ".. pp.. "</br>[[sois]] ".. pp; congpas3s = "[[ait]] ".. pp.. "</br>[[soit]] ".. pp; congpas1p = "[[ayons]] ".. pp.. "</br>[[soyons]] ".. pplur; congpas2p = "[[ayez]] ".. pp.. "</br>[[soyez]] ".. pplur; congpas3p = "[[aiont]] ".. pp.. "</br>[[soient]] ".. pplur 
	end  
-- Congiuntivo trapassato
    if aus == "avoir" and pp ~= "" then
    	congtrap1s = "[[eusse]] ".. pp; congtrap2s = "[[eusses]] ".. pp; congtrap3s = "[[eût]] ".. pp; congtrap1p = "[[eussions]] ".. pp; congtrap2p = "[[eussiez]] ".. pp; congtrap3p = "[[eussent]] ".. pp 
	elseif aus == "être" or aus == "etre" and pp ~= "" then
		aus = "être"
    	congtrap1s = me1.. "[[fusse]] ".. pp; congtrap2s = te1.. "[[fusses]] ".. pp; congtrap3s = se1.. "[[fût]] ".. pp; congtrap1p = nous.. "[[fussions]] ".. pplur; congtrap2p = vous.. "[[fussiez]] ".. pplur; congtrap3p = se1.. "[[fussent]] ".. pplur 
    elseif pp == "" then
    	congtrap1s = ""; congtrap2s = ""; congtrap3s = ""; contrap1p = ""; congtrap2p = ""; congtrap3p = ""
    else
    	congtrap1s = "[[eusse]] ".. pp.. "</br>[[fusse]] ".. pp; congtrap2s = "[[eusses]] ".. pp.. "</br>[[fusses]] ".. pp; congtrap3s = "[[eût]] ".. pp.. "</br>[[fût]] ".. pp; congtrap1p = "[[eussions]] ".. pp.. "</br>[[fussions]] ".. pplur; congtrap2p = "[[eussiez]] ".. pp.. "</br>[[fussiez]] ".. pplur; congtrap3p = "[[eussent]] ".. pp.. "</br>[[fussent]] ".. pplur 
	end 
-- Genera i titolo dei cassetti per i tempi composti
    if pp == "" then
    	paspros = "manca dei tempi composti"; trappros = "manca dei tempi composti"; traprem = "manca dei tempi composti"; futant = "manca dei tempi composti"; condpas = "manca dei tempi composti"; congpas = "manca dei tempi composti"; congtrap = "manca dei tempi composti"
    else
    	paspros = "ausiliare (".. aus.. ") coniugato all'indicativo presente seguito dal participio passato"
    	trappros = "ausiliare (".. aus.. ") coniugato all'indicativo imperfetto seguito dal participio passato"
    	traprem = "ausiliare (".. aus.. ") coniugato all'indicativo passato remoto seguito dal participio passato"
    	futant = "ausiliare (".. aus.. ") coniugato all'indicativo futuro seguito dal participio passato"
    	condpas = "ausiliare (".. aus.. ") coniugato al condizionale presente seguito dal participio passato"
    	congpas = "ausiliare (".. aus.. ") coniugato al congiuntivo presente seguito dal participio passato"
    	congtrap = "ausiliare (".. aus.. ") coniugato al congiuntivo imperfetto seguito dal participio passato"
    end
-- Costruisce la tabella di coniugazione
    conj = '{| style="background:#F0F0F0;border-collapse:separate;border-spacing:2px" class="inflection-table"\n'
    conj = conj .. '|-\n'
    conj = conj .. '| colspan="8" style="background:#ffe4c4; text-align:center" | ' .. descrizione .. '\n'
    conj = conj .. '|-\n'     
    if refl_exist == true then --se esiste il riflessivo pronominale del verbo, o se il verbo È riflessivo, fa spazio in tabella per aggiungere i relativi link generati precedentemente
    	conj = conj .. '! colspan="1" style="background:#e2e4c0" | infinito\n'
    	conj = conj .. '| colspan="2" | ' .. inf .. '\n'
    		if refl == true then --ulteriore variabile, se il verbo è riflessivo la dicitura della casella è "forma attiva", se no "riflessivo pronominale"
    			conj = conj .. '! colspan="2" style="background:#e2e4c0" | foma attiva\n' 
    		else
    			conj = conj .. '! colspan="2" style="background:#e2e4c0" | riflessivo pronominale\n'
    		end
    	conj = conj .. '| colspan="2" | ' .. refl_link .. refl_conjlink.. '\n'
    	conj = conj .. '|-\n'
    else --se non esiste il riflessivo, la relativa cella si toglie di torno
		conj = conj .. '! colspan="1" style="background:#e2e4c0" | infinito\n'
    	conj = conj .. '| colspan="1" | ' .. inf .. '\n'
    	conj = conj .. '|-\n'
    end
    conj = conj .. '! colspan="2" style="background:#e2e4c0" | verbo ausiliare</br><small>auxiliaire</small>\n'
    conj = conj .. '| colspan="1" | ' .. aus ..'\n'
    conj = conj .. '! colspan="2" style="background:#e2e4c0" | gerundio</br><small>gérondif</small>\n'
    conj = conj .. '| colspan="2" | ' .. ger .. '\n'
    conj = conj .. '|-\n! colspan="2" style="background:#e2e4c0" | participio presente</br><small>participe présent</small>\n'
    conj = conj .. '| colspan="1" | ' .. par .. '\n'
    conj = conj .. '! colspan="2" style="background:#e2e4c0" | participio passato</br><small>participe passé</small>\n'
    conj = conj .. '| colspan="2" | ' .. pp .. '\n'
    conj = conj .. '|-\n! colspan="1" rowspan="2" style="background:#C0C0C0" | persona\n'
    conj = conj .. '! colspan="3" style="background:#C0C0C0" | singolare\n'
    conj = conj .. '! colspan="3" style="background:#C0C0C0" | plurale\n'
    conj = conj .. '|-\n! style="background:#C0C0C0;width:12.5%" | prima\n'
    conj = conj .. '! style="background:#C0C0C0;width:12.5%" | seconda\n'
    conj = conj .. '! style="background:#C0C0C0;width:12.5%" | terza\n'
    conj = conj .. '! style="background:#C0C0C0;width:12.5%" | prima\n'
    conj = conj .. '! style="background:#C0C0C0;width:12.5%" | seconda\n'
    conj = conj .. '! style="background:#C0C0C0;width:12.5%" | terza\n'
    conj = conj .. '|-\n! style="background:#c0cfe4" colspan="1" | indicativo</br><small>indicatif</small>\n'
    conj = conj .. '! style="background:#c0cfe4" | je (j’)\n'
    conj = conj .. '! style="background:#c0cfe4" | tu\n'
    conj = conj .. '! style="background:#c0cfe4" | il/elle/on\n'
    conj = conj .. '! style="background:#c0cfe4" | nous\n'
    conj = conj .. '! style="background:#c0cfe4" | vous\n'
    conj = conj .. '! style="background:#c0cfe4" | ils/elles\n|-\n'
    conj = conj .. '! style="height:3em;background:#c0cfe4" colspan="1" | presente</br><small>présent</small>\n'
    conj = conj .. '|' .. me .. pres1s .. '\n|' .. te .. pres2s .. '\n|' .. se .. pres3s .. '\n|' .. nous .. pres1p .. '\n|' .. vous .. pres2p .. '\n|' .. se .. pres3p .. '\n'
    conj = conj .. '|-\n! style="height:3em;background:#c0cfe4" colspan="1" | imperfetto</br><small>imparfait</small>\n'
    conj = conj .. '|' .. me .. imperf1s .. '\n|' .. te .. imperf2s .. '\n|' .. se .. imperf3s .. '\n|' .. nous .. imperf1p .. '\n|' .. vous .. imperf2p .. '\n|' .. se .. imperf3p .. '\n'
    conj = conj .. '|-\n! style="height:3em;background:#c0cfe4" colspan="1" | passato remoto</br><small>passé simple</small>\n'
    conj = conj .. '|' .. me .. prem1s .. '\n|' .. te .. prem2s .. '\n|' .. se .. prem3s .. '\n|' .. nous .. prem1p .. '\n|' .. vous .. prem2p .. '\n|' .. se .. prem3p .. '\n'
    conj = conj .. '|-\n! style="height:3em;background:#c0cfe4" colspan="1" | futuro</br><small>futur simple</small>\n'
    conj = conj .. '|' .. me .. fut1s .. '\n|' .. te .. fut2s .. '\n|' .. se .. fut3s .. '\n|' .. nous .. fut1p .. '\n|' .. vous .. fut2p .. '\n|' .. se .. fut3p .. '\n'
    conj = conj .. '|-\n! style="height:3em;background:#c0cfe4" colspan="1" | passato prossimo</br><small>passé composé</small>\n'
    conj = conj .. '| style="background:#F0F0F0" colspan="6" | <div class="NavFrame" style="border:0"><div class="NavHead">'.. paspros.. '</div><div class="NavContent">\n {| style="background:#F0F0F0;border-collapse:separate;border-spacing:2px;width:100%" class="inflection-table" \n |- \n | ' .. paspros1s .. '||' .. paspros2s .. '||' .. paspros3s .. '||' .. paspros1p .. '||' .. paspros2p .. '\n|' .. paspros3p .. '\n |- \n |}</div></div>\n'
    conj = conj .. '|-\n! style="height:3em;background:#c0cfe4" colspan="1" | trapassato prossimo</br><small>plus-que-parfait</small>\n'
    conj = conj .. '| style="background:#F0F0F0" colspan="6" | <div class="NavFrame" style="border:0"><div class="NavHead">'.. trappros.. '</div><div class="NavContent">\n {| style="background:#F0F0F0;border-collapse:separate;border-spacing:2px;width:100%" class="inflection-table" \n |- \n | ' .. trappros1s .. '\n|' .. trappros2s .. '\n|' .. trappros3s .. '\n|' .. trappros1p .. '\n|' .. trappros2p .. '\n|' .. trappros3p .. '\n |- \n |}</div></div>\n'
    conj = conj .. '|-\n! style="height:3em;background:#c0cfe4" colspan="1" | trapassato remoto</br><small>passé anterieur</small>\n'
    conj = conj .. '| style="background:#F0F0F0" colspan="6" | <div class="NavFrame" style="border:0"><div class="NavHead">'.. traprem.. '</div><div class="NavContent">\n {| style="background:#F0F0F0;border-collapse:separate;border-spacing:2px;width:100%" class="inflection-table" \n |- \n | ' .. traprem1s .. '\n|' .. traprem2s .. '\n|' .. traprem3s .. '\n|' .. traprem1p .. '\n|' .. traprem2p .. '\n|' .. traprem3p .. '\n |- \n |}</div></div>\n'
    conj = conj .. '|-\n! style="height:3em;background:#c0cfe4" colspan="1" | futuro anteriore</br><small>futur antérieur</small>\n'
    conj = conj .. '| style="background:#F0F0F0" colspan="6" | <div class="NavFrame" style="border:0"><div class="NavHead">'.. futant.. '</div><div class="NavContent">\n {| style="background:#F0F0F0;border-collapse:separate;border-spacing:2px;width:100%" class="inflection-table" \n |- \n | ' .. futant1s .. '\n|' .. futant2s .. '\n|' .. futant3s .. '\n|' .. futant1p .. '\n|' .. futant2p .. '\n|' .. futant3p .. '\n |- \n |}</div></div>\n'
    conj = conj .. '|-\n! style="background:#c0d8e4" colspan="1" | condizionale</br><small>conditionnel</small>\n'
    conj = conj .. '! style="background:#c0cfe4" | je (j’)\n'
    conj = conj .. '! style="background:#c0cfe4" | tu\n'
    conj = conj .. '! style="background:#c0cfe4" | il/elle/on\n'
    conj = conj .. '! style="background:#c0cfe4" | nous\n'
    conj = conj .. '! style="background:#c0cfe4" | vous\n'
    conj = conj .. '! style="background:#c0cfe4" | ils/elles\n|-\n'
    conj = conj .. '|-\n! style="height:3em;background:#c0d8e4" colspan="1" | presente</br><small>présent</small>\n'
    conj = conj .. '|' .. me .. cond1s .. '\n|' .. te .. cond2s .. '\n|' .. se .. cond3s .. '\n|' .. nous .. cond1p .. '\n|' .. vous .. cond2p .. '\n|' .. se .. cond3p .. '\n'   
    conj = conj .. '|-\n! style="height:3em;background:#c0d8e4" colspan="1" | passato</br><small>passé</small>\n'
    conj = conj .. '| style="background:#F0F0F0" colspan="6" | <div class="NavFrame" style="border:0"><div class="NavHead">'.. condpas.. '</div><div class="NavContent">\n {| style="background:#F0F0F0;border-collapse:separate;border-spacing:2px;width:100%" class="inflection-table" \n |- \n | ' .. condpas1s .. '\n|' .. condpas2s .. '\n|' .. condpas3s .. '\n|' .. condpas1p .. '\n|' .. condpas2p .. '\n|' .. condpas3p .. '\n |- \n |}</div></div>\n'   
    conj = conj .. '|-\n! style="background:#c0e4c0" colspan="1" | congiuntivo</br><small>subjonctif</small>\n'
    conj = conj .. '! style="background:#c0cfe4" | que je (j’)\n'
    conj = conj .. '! style="background:#c0cfe4" | que tu\n'
    conj = conj .. '! style="background:#c0cfe4" | qu’il/elle/on\n'
    conj = conj .. '! style="background:#c0cfe4" | que nous\n'
    conj = conj .. '! style="background:#c0cfe4" | que vous\n'
    conj = conj .. '! style="background:#c0cfe4" | qu’ils/elles\n|-\n'
    conj = conj .. '! style="height:3em;background:#c0e4c0" | presente</br><small>présent</small>\n'
    conj = conj .. '|' .. me .. cong1s .. '\n|' .. te .. cong2s .. '\n|' .. se .. cong3s .. '\n|' .. nous .. cong1p .. '\n|' .. vous .. cong2p .. '\n|' .. se .. cong3p .. '\n'   
    conj = conj .. '|-\n! style="height:3em;background:#c0e4c0" rowspan="1" | imperfetto</br><small>imparfait</small>\n'
    conj = conj .. '|' .. me .. congimp1s .. '\n|' .. te .. congimp2s .. '\n|' .. se .. congimp3s .. '\n|' .. nous .. congimp1p .. '\n|' .. vous .. congimp2p .. '\n|' .. se .. congimp3p .. '\n' 
    conj = conj .. '|-\n! style="height:3em;background:#c0e4c0" colspan="1" | passato</br><small>passé</small>\n'
    conj = conj .. '| style="background:#F0F0F0" colspan="6" | <div class="NavFrame" style="border:0"><div class="NavHead">'.. congpas.. '</div><div class="NavContent">\n {| style="background:#F0F0F0;border-collapse:separate;border-spacing:2px;width:100%" class="inflection-table" \n |- \n | ' .. congpas1s .. '\n|' .. congpas2s .. '\n|' .. congpas3s .. '\n|' .. congpas1p .. '\n|' .. congpas2p .. '\n|' .. congpas3p .. '\n |- \n |}</div></div>\n'   
    conj = conj .. '|-\n! style="height:3em;background:#c0e4c0" colspan="1" | trapassato</br><small>plus-que-parfait</small>\n'
    conj = conj .. '| style="background:#F0F0F0" colspan="6" | <div class="NavFrame" style="border:0"><div class="NavHead">'.. congtrap.. '</div><div class="NavContent">\n {| style="background:#F0F0F0;border-collapse:separate;border-spacing:2px;width:100%" class="inflection-table" \n |- \n | ' .. congtrap1s .. '\n|' .. congtrap2s .. '\n|' .. congtrap3s .. '\n|' .. congtrap1p .. '\n|' .. congtrap2p .. '\n|' .. congtrap3p .. '\n |- \n |}</div></div>\n' 
    conj = conj .. '|-\n! colspan="1" rowspan="2" style="height:3em;background:#e4d4c0" | imperativo</br><small>impératif</small>\n'
    conj = conj .. '! style="background:#c0cfe4" | je (j’)\n'
    conj = conj .. '! style="background:#c0cfe4" | tu\n'
    conj = conj .. '! style="background:#c0cfe4" | il/elle/on\n'
    conj = conj .. '! style="background:#c0cfe4" | nous\n'
    conj = conj .. '! style="background:#c0cfe4" | vous\n'
    conj = conj .. '! style="background:#c0cfe4" | ils/elles\n'
    conj = conj .. '|-\n|\n'
    conj = conj .. '|' .. imp2s .. teimp.. '\n|' .. imp3s .. '\n|' .. imp1p .. nousimp.. '\n|' .. imp2p .. vousimp.. '\n|' .. imp3p .. '\n'
    conj = conj .. '|-\n'    
    conj = conj .. '|}'
    return conj 
end

function p.over(x,over,xtra)
-- Utilizzato all'interno della funzione frconj
-- Rimpiazza una voce verbale standard con quella eventualmente indicata nel template (se quest'ultimo è un link rosso, aggiunge anche la relativa categoria)
    if over == nil then return x end
    if over < "a" then return '' end
    if xtra == 0 then return over .. " " end -- for reflexive pronouns
	if over >= "a" and mw.title.new(over).exists == false then 
		RedCat = categorizza("Verbi francesi con forme da scrivere", titolo)
	else
		RedCat = ""
		end
	return RedCat.. "[[" .. over .. "#Francese|" .. over .. "]]"
end

function p.wiki(x)
-- Utilizzato all'interno della funzione frconj
    if x == nil then return " " end
    if x == "" then return " " end
    -- aggiunge la categoria link rossi
    if x == (stem.. "er") or x == (stem.. "cer") or x == (stem.. "ger") or x == (stem.. "éer") or x == (stem.. "oyer") or x == (stem.. "uyer") or x == (stem.. "ayer") or x == (stem.. "eyer") or x == (stem.. "eler") or x == (stem.. "eter") or x == (stem.. "ir") or x == (stem.. "ir3") or x == (stem.. "re") or x == (stem.. "oir") or x == (stem.. "dre")  then --per la voce all'infinito
    	if x >= "a" and mw.title.new(x).exists == false then
    	RedCat = categorizza("Verbi francesi da scrivere", titolo)
        else
    	RedCat = ""
    	end
    else --per tutte le altre
    	if x >= "a" and mw.title.new(x).exists == false then
    	RedCat = categorizza("Verbi francesi con forme da scrivere", titolo)
        else
    	RedCat = ""
    	end
	end
-- Rende il suo argomento un wikilink, o lo rende nullo se non definito (per facilitare la concatenazione)
    return "[[" .. x .. "#Francese|" .. x .. "]]".. RedCat
    end

function p.alts(x,y)
-- Utilizzato all'interno della funzione frconj
-- Aggiunge le eventuali forme alternative, se specificate nel template, separandole da quelle base con una virgola
	if y == nil then return x end
	if y == '' then return x end
    if y > "0" then return x .. ", " .. y end
    return x
    end

function p.plurale(pos, str, r)
-- Utilizzato all'interno della funzione frconj
--genera automaticamente il plurale del participio passato
    return str:sub(1, pos-1) .. r
end

return p