Module:siwa-noun: Difference between revisions
No edit summary |
No edit summary |
||
| Line 66: | Line 66: | ||
local numbers = {} | local numbers = {} | ||
local decl = {} | local decl = {} | ||
local g = parent_args[1] | local g = parent_args[1] | ||
local word = NAMESPACE == "Template" and "sivi" or parent_args["word"] or PAGENAME | local word = NAMESPACE == "Template" and "sivi" or parent_args["word"] or PAGENAME | ||
local args = {} | local args = {} | ||
local sv = NAMESPACE == "Template" and "i" or parent_args[2] | local sv = NAMESPACE == "Template" and "i" or parent_args[2] | ||
local decl_type = parent_args["decl"] or detect_decl(word, sv) | local decl_type = parent_args["decl"] or detect_decl(word, sv) | ||
if g ~= "i" and g ~= "a" then error("Unknown gender: it must be either ‘i’ or ‘a’") end | |||
if not m_data[word] then | if not m_data[word] then | ||
| Line 96: | Line 98: | ||
data.decl_type = decl_type | data.decl_type = decl_type | ||
data.q = detect_quality(data.head, data.sv) | data.q = detect_quality(data.head, data.sv) | ||
-- Generate the forms | -- Generate the forms | ||