Module:qay-headword: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 89: Line 89:
table.insert(data.genders, sub(gender_names[args[1]], 1, 2))
table.insert(data.genders, sub(gender_names[args[1]], 1, 2))
table.insert(data.categories, lang:getCanonicalName() .. " " .. (args[1] == "?" and "" or gender_names[args[1]]) .. " " .. data.pos_category)
table.insert(data.categories, lang:getCanonicalName() .. " " .. (args[1] == "?" and "" or gender_names[args[1]]) .. " " .. data.pos_category)
local plurals = {}
if not args["nopl"] then
if not args["nopl"] then
args["pl"] = args["pl"] or generate_plural(PAGENAME, sub(gender_names[args[1]], 1, 2))
plurals = args["pl"] or generate_plural(PAGENAME, sub(gender_names[args[1]], 1, 2))
for i, form in ipairs(args["pl"]) do
for i, form in ipairs(plurals) do
args["pl"][i] = {term = form}
plurals[i] = {term = form}
args["pl"][i].sc = require("Module:scripts").getByCode("Latn")
plurals[i].sc = require("Module:scripts").getByCode("Latn")
end
end
args["pl"].label = "plural"
plurals.label = "plural"
table.insert(data.inflections, args["pl"])
table.insert(data.inflections, plurals)
else
else
table.insert(data.categories, lang:getCanonicalName() .. " uncountable nouns")
table.insert(data.categories, lang:getCanonicalName() .. " uncountable nouns")

Navigation menu