48,355
edits
No edit summary |
No edit summary |
||
| Line 13: | Line 13: | ||
local laxen = { | local laxen = { | ||
["y"] = "ʏ", ["i"] = "ɪ | ["y"] = "ʏ", ["i"] = "ɪ", ["e"] = "ɛ", | ||
["u"] = "ʊ", ["o"] = "ɔ", ["a"] = "ɑ", | ["u"] = "ʊ", ["o"] = "ɔ", ["a"] = "ɑ", | ||
} | } | ||
| Line 26: | Line 26: | ||
function export.crux(term) | function export.crux(term) | ||
-- default to short lax vowels | -- default to short lax vowels | ||
term = term:gsub("[ | term = term:gsub("[aeiou]", laxen); term = term:gsub("ů", "œ") | ||
-- long vowels | -- long vowels | ||
term = | local nfd_term = mw.ustring.toNFD(term) | ||
term = | nfd_term = nfd_term:gsub("[aeiouy]" .. c.hook, long_vowels) | ||
term = mw.ustring.toNFC(nfd_term) | |||
term = term:gsub("ɔɑ", "ɑː"); term = term:gsub("ɛœ", "øː") | term = term:gsub("ɔɑ", "ɑː"); term = term:gsub("ɛœ", "øː") | ||
-- diphthongized vowels | -- diphthongized vowels | ||