Module:kilta-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 65: Line 65:
function export.crux(term)
function export.crux(term)
term = mw.ustring.lower(mw.ustring.toNFD(term))
term = mw.ustring.lower(mw.ustring.toNFD(term))
local phonemic, phonetic = "a", "a"
local phonemic, phonetic = "", ""
for _, rule in ipairs(phonemic_rules) do
for _, rule in ipairs(phonemic_rules) do
Line 103: Line 103:
local term = args[1]
local term = args[1]


local IPA_args = {}
local phonemic, phonetic = separate_word(term)
local phonemic, phonetic = separate_word(term)
table.insert(IPA_args, {pron = '/' .. phonemic .. '/'})
local IPA_args = {{pron = '/' .. phonemic .. '/'}, {pron = '[' .. phonetic .. ']'}}
table.insert(IPA_args, {pron = '[' .. phonetic .. ']'})


return "* " .. m_IPA.format_IPA_full(lang, IPA_args)
return "* " .. m_IPA.format_IPA_full(lang, IPA_args)