Module:xchc-pron: Difference between revisions

No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 17: Line 17:
local nb_cons = "mnŋɲptbdkɡfvszʃʒxɣhʧʦʤʣlrɾʎ"
local nb_cons = "mnŋɲptbdkɡfvszʃʒxɣhʧʦʤʣlrɾʎ"
local consonants = "[" .. nb_cons .. "]"
local consonants = "[" .. nb_cons .. "]"
local consonantsAsIs = "[мньӈбдгвзжғлрйпткфсшӀчц]"
local vowels = "[ыиэеаяүөуюоёӯӣɜɔ]"
local vowels = "[ыиэеаяүөуюоёӯӣɜɔ]"


Line 124: Line 126:
if exception then
if exception then
termR = term:gsub(neutralR, ""); termB = term:gsub(neutralB, "")
termR = term:gsub(neutralR, ""); termB = term:gsub(neutralB, "")
termR = termR:match("(".. vowels .. consonants .. "*)$") or termR; termB = termB:match("(" .. vowels .. consonants .. "*)$") or termB
termR = termR:match("(".. vowels .. consonantsAsIs .. "*)$") or termR; termB = termB:match("(" .. vowels .. consonants .. "*)$") or termB
end
end
Line 167: Line 169:
western = gsub(western, rule[1], rule[2])
western = gsub(western, rule[1], rule[2])
end
end
local ipa1 = (western ~= phonetic) and "\n** " .. m_IPA.format_IPA_multiple(lang, {{pron='[' .. western .. ']', q={"Western"}}}) or ""
local ipa1 = (western ~= phonetic) and "\n** " .. m_IPA.format_IPA_multiple(lang, {{pron='[' .. western .. ']', l={"Western"}}}) or ""
local surgut = phonetic
local surgut = phonetic
Line 173: Line 175:
surgut = gsub(surgut, rule[1], rule[2])
surgut = gsub(surgut, rule[1], rule[2])
end
end
local ipa2 = (surgut ~= phonetic) and "\n** " .. m_IPA.format_IPA_multiple(lang, {{pron='[' .. surgut .. ']', q={"Surgut"}}}) or ""
local ipa2 = (surgut ~= phonetic) and "\n** " .. m_IPA.format_IPA_multiple(lang, {{pron='[' .. surgut .. ']', l={"Surgut"}}}) or ""


return "* " .. m_IPA.format_IPA_full{lang = lang, items = {{pron='[' .. phonetic .. ']'}}} .. ipa1 .. ipa2
return "* " .. m_IPA.format_IPA_full{lang = lang, items = {{pron='[' .. phonetic .. ']'}}} .. ipa1 .. ipa2