Module:cy-mut

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

La documentation pour ce module peut être créée à Module:cy-mut/Documentation

local p={}

local mut = require("Module:cy-mutation")

function ecritureLigne(txt,titre,m,mot)
	if m ~= mot then
		txt = txt ..
			'|-\n'..
			'! ' .. titre .. '\n'..
			'| [[' .. m .. '#cy|' .. m .. ']]\n'
	end
	return txt
end

function p.boite(frame)
	local args = frame:getParent().args
	local mot = args[1]
	local forme = args['forme']
	forme = forme or 'Forme'
	local l, n, s, h =
		nil, nil, nil, nil
	l, n, s, h = mut.mutations(mot)
	local txt =
		'{| class="flextable"\n'..
		'| class="invisible" |\n'..
		'!' .. forme .. '\n'..
		'|-\n'..
		'! Non muté\n'..
		'| [[' .. mot .. '#cy|' .. mot .. ']]\n'
	
	txt = ecritureLigne(txt,'Lénition',l,mot)
	txt = ecritureLigne(txt,'Nasalisation',n,mot)
	txt = ecritureLigne(txt,'Spirantisation',s,mot)
	txt = ecritureLigne(txt,'Prothèse h',h,mot)
	txt = txt .. '|}'
	return txt
end

return p