Module:tevo-translit: Difference between revisions
No edit summary |
No edit summary |
||
| (13 intermediate revisions by 2 users not shown) | |||
| Line 109: | Line 109: | ||
return nil | return nil | ||
end | end | ||
text = gsub( | text = gsub(text,'([क-ह]़?)'..'([ािीुूृॄॢॣेैोौ्ॅॆॊॉ]?)'..'([अ-औ]?)',function(c, d, e) | ||
if d == "" and e ~= "" then | if d == "" and e ~= "" then | ||
if tt[e] == "i" or tt[e] == "u" then return consonants[c] .. 'a' .. tt[e] .. diaeresis | if tt[e] == "i" or tt[e] == "u" then return consonants[c] .. 'a' .. tt[e] .. diaeresis | ||
| Line 131: | Line 126: | ||
text = gsub(text, '.', tt) | text = gsub(text, '.', tt) | ||
text = gsub(text, 'a([iu])([' .. acute .. grave .. '])', 'a%2%1') | text = gsub(text, 'a([iu])([' .. acute .. grave .. '])', 'a%2%1') | ||
text = gsub(text, 'e([i])([' .. acute .. grave .. '])', 'e%2%1') | |||
text = gsub(text, 'o([u])([' .. acute .. grave .. '])', 'o%2%1') | |||
text = gsub(text, 'ē([i])([' .. acute .. grave .. '])', 'ē%2%1') | |||
text = gsub(text, 'ō([u])([' .. acute .. grave .. '])', 'ō%2%1') | |||
text = gsub(text, " ?[।॥]", ".") | text = gsub(text, " ?[।॥]", ".") | ||
text = gsub(text, "(ā" .. acute .. "3[iu])" .. acute, "%1") -- for pluti vowels | text = gsub(text, "(ā" .. acute .. "3[iu])" .. acute, "%1") -- for pluti vowels | ||