Differenze tra le versioni di "Modulo:Bananas"
| Riga 6: | Riga 6: | ||
function p.word(frame) | function p.word(frame) | ||
| − | + | -- a = mw.ustring.lower('Cé4A') | |
| − | + | -- decomposed = mw.ustring.toNFD(a) | |
| − | + | -- return decomposed | |
| − | + | transcription = transcription:gsub("([eo])(\204\128)", | |
| + | function (vowel, accent) | ||
| + | return ({ e = "ɛ", o = "ɔ" })[vowel] .. accent | ||
| + | end) | ||
| + | return transcription | ||
end | end | ||
return p | return p | ||
Versione delle 20:02, 17 set 2018
La documentazione per questo modulo può essere creata in Modulo:Bananas/man
local p={}
--local acute_or_grave = "[" .. mw.ustring.char(0x300, 0x301) .. "]"
function p.word(frame)
-- a = mw.ustring.lower('Cé4A')
-- decomposed = mw.ustring.toNFD(a)
-- return decomposed
transcription = transcription:gsub("([eo])(\204\128)",
function (vowel, accent)
return ({ e = "ɛ", o = "ɔ" })[vowel] .. accent
end)
return transcription
end
return p