Module:kilta-headword: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 22: Line 22:
if not n then n = 1 end
if not n then n = 1 end
if w[2]:match("[kh]wa$") or w[2]:match("a$") then
if w[3]:match("[kh]wa$") or w[3]:match("a$") then
w[2] = sub(w[2], 1, -1) .. "úr"
w[3] = sub(w[3], 1, -1) .. "úr"
elseif w[2]:match("ës$") or w[2]:match("uin$") or w[2]:match("[str]$") then
elseif w[3]:match("ës$") or w[3]:match("uin$") or w[3]:match("[str]$") then
w[2] = w[2] .. "á"
w[3] = w[3] .. "á"
elseif w[2]:match("[nml]$") then
elseif w[3]:match("[nml]$") then
w[2] = w[2] .. "ur"
w[3] = w[3] .. "ur"
end
end