45,646
edits
No edit summary |
No edit summary |
||
Line 19: | Line 19: | ||
local function plural(word, n) | local function plural(word, n) | ||
local w = split(word, "%s") | local w = split(word, "%s") | ||
if tonumber(n) > | if tonumber(n) > #w then error("Word index outside bounds.") end | ||
if w[n]:match("[kh]wa$") or w[n]:match("a$") then | if w[n]:match("[kh]wa$") or w[n]:match("a$") then | ||
Line 29: | Line 29: | ||
end | end | ||
return {label = "plural", table.concat( | return {label = "plural", table.concat(w[n], " ")} | ||
end | end | ||