Module:snon-common: Difference between revisions

Melinoë (talk | contribs)
No edit summary
Melinoë (talk | contribs)
No edit summary
Line 22: Line 22:
if mw.ustring.find(word_l, "^[bcdfgmptsnlrv]") then
if mw.ustring.find(word_l, "^[bcdfgmptsnlrv]") then
ret.len = mw.ustring.gsub(word, "^(.)", "%1h")
ret.len = mw.ustring.gsub(word, "^(.)", "%1h")
elseif mw.ustring.find(word_l, "^[h]") then
ret.len = mw.ustring.gsub(word, "^(.)", "g%1")
elseif mw.ustring.find(word_l, "^-[bcdfgmptsnlrv]") then
elseif mw.ustring.find(word_l, "^-[bcdfgmptsnlrv]") then
ret.len = mw.ustring.gsub(word, "^(..)", "%1h")
ret.len = mw.ustring.gsub(word, "^(..)", "%1h")
Line 31: Line 29:
if mw.ustring.find(word_l, "^[b]") then
if mw.ustring.find(word_l, "^[b]") then
ret.ecl = mw.ustring.gsub(word, "^(.)", "m")
ret.ecl = mw.ustring.gsub(word, "^(.)", "m")
elseif mw.ustring.find(word_l, "^[p]") then
elseif mw.ustring.find(word_l, "^[pv]") then
ret.ecl = mw.ustring.gsub(word, "^(.)", "b")
elseif mw.ustring.find(word_l, "^[v]") then
ret.ecl = mw.ustring.gsub(word, "^(.)", "b")
ret.ecl = mw.ustring.gsub(word, "^(.)", "b")
elseif mw.ustring.find(word_l, "^[f]") then
elseif mw.ustring.find(word_l, "^[f]") then
ret.ecl = mw.ustring.gsub(word, "^(.)", "v")
ret.ecl = mw.ustring.gsub(word, "^(.)", "v")
elseif mw.ustring.find(word_l, "^[B]") then
ret.ecl = mw.ustring.gsub(word, "^(.)", "M")
elseif mw.ustring.find(word_l, "^[PV]") then
ret.ecl = mw.ustring.gsub(word, "^(.)", "B")
elseif mw.ustring.find(word_l, "^[F]") then
ret.ecl = mw.ustring.gsub(word, "^(.)", "V")
end
end
end
end