45,645
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 = {["in"] = "inanimate", ["an"] = "animate", ["?"] = ""} | local genders = {["in"] = "inanimate", ["i"] = "inanimate", ["an"] = "animate", ["a"] = "animate", ["?"] = ""} | ||
local function detect_decl(word) | local function detect_decl(word) | ||
Line 37: | Line 37: | ||
local decl_type = parent_args[1] .. "_" .. detect_decl(word) or parent_args["decl"] or NAMESPACE == "Template" and "in_c" | local decl_type = parent_args[1] .. "_" .. detect_decl(word) or parent_args["decl"] or NAMESPACE == "Template" and "in_c" | ||
if g | if not genders[g] then error("Unknown gender.") end | ||
if not m_data[word] then | if not m_data[word] then |