Module:br-flex-adj

Définition, traduction, prononciation, anagramme et synonyme sur le dictionnaire libre Wiktionnaire.

 Documentation[voir] [modifier] [historique] [purger]

Ce module permet de générer un tableau donnant les différents degrés d’un adjectif breton : positif ; comparatif ; superlatif et exclamatif avec la mutation interne adéquate si nécessaire.

Il est appelé par le modèle {{br-flex-adj}}.

Fonction utilisable dans un modèle ou dans une page

boite
affiche le tableau des degrés de l’adjectif breton donné en argument
Nature Forme
Positif kozh
Comparatif koshocʼh
Superlatif koshañ
Exclamatif koshat
  • {{#invoke:br-flex-adj|boite|kozh}} affiche :

--============================================================================--
-- Module:br-flex-adj : génération d’un tableau donnant les différents degrés --
-- d’un adjectif breton : positif ; comparatif ; superlatif et exclamatif.    --
--------------------------------------------------------------------------------
-- auteurs principaux : Yun                                                   --
-- licence :
--============================================================================--
local p={}

local function provection(lettre) -- provection étendue - mutation durcissante incluant z/s et zh/sh
  if lettre == 'b' then
    return 'p'
  elseif lettre == 'd' then
    return 't'
  elseif lettre == 'g' then
    return 'k'
  elseif lettre == 'z' then
    return 's'
  elseif lettre == 'zh' then
    return 'sh'
  else
    return lettre  -- pas de mutation
  end
end

function p.boite(frame)
	local adjectif = frame.args[1]
	if mw.ustring.sub(adjectif,-2) == 'zh' then
		lettre = 'zh'
		debut = mw.ustring.sub(adjectif,1,-3)
	else 
		lettre = mw.ustring.sub(adjectif,-1)
		debut = mw.ustring.sub(adjectif,1,-2)
	end
	lettre = provection(lettre)
	local txt =
        '{| class="flextable"\n'..
        '! Nature\n'..
        '! Forme\n'..
        '|-\n'..
        '! Positif\n'..
        '| [['.. adjectif ..'#br-adj|' .. adjectif ..']]\n'..
        '|-\n'..
        '! Comparatif\n'..
        '| [['.. debut .. lettre .. 'ocʼh#br-flex-adj|' .. debut .. lettre .. 'ocʼh]]\n'..
        '|-\n'..
        '! Superlatif\n'..
        '| [['.. debut .. lettre .. 'añ#br-flex-adj|' .. debut .. lettre .. 'añ]]\n'..
        '|-\n'..
        '! Exclamatif\n'..
        '| [['.. debut .. lettre .. 'at#br-flex-adj|' .. debut .. lettre .. 'at]]\n'..
        '|}'
    return txt    
end

return p