45,626
edits
No edit summary |
No edit summary |
||
Line 16: | Line 16: | ||
local NAMESPACE = mw.title.getCurrentTitle().nsText | local NAMESPACE = mw.title.getCurrentTitle().nsText | ||
local genders = {["m"] = "masculine", ["f"] = "feminine"} | local genders = {["m"] = "masculine", ["f"] = "feminine", ["?"] = "unknown"} | ||
local function detect_decl(word) | local function detect_decl(word) | ||
Line 39: | Line 39: | ||
local decl_type = parent_args[2] 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 ‘m’ or ‘f’") end | if g ~= "m" and g ~= "f" and g ~= "?" then error("Unknown gender: it must be either ‘m’ or ‘f’") end | ||
if not m_data[word] then | if not m_data[word] then |