Module:mg-noun: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 34: Line 34:
local numbers = {}
local numbers = {}
local decl = {}
local decl = {}
local g = NAMESPACE == "Template" and "f" or parent_args["g"]
local g = NAMESPACE == "Template" and "f" or parent_args[1] or parent_args["g"]
local word = NAMESPACE == "Template" and "mazer" or parent_args["word"] or PAGENAME
local word = NAMESPACE == "Template" and "mazer" or parent_args["word"] or PAGENAME
local args = {}
local args = {}
local decl_type = parent_args[1] or parent_args["decl"] or detect_decl(word)
local decl_type = parent_args[2] or parent_args["decl"] or detect_decl(word)
if g ~= "m" and g ~= "f" then error("Unknown gender: it must be either ‘i’ or ‘a’") end
if g ~= "m" and g ~= "f" then error("Unknown gender: it must be either ‘i’ or ‘a’") end