Module:siwa-noun: Difference between revisions

No edit summary
No edit summary
Line 93: Line 93:
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 = parent_args[2]


if not m_data[word] then
if not m_data[word] then
decl_type = frame.args.decl or detect_decl(word, parent_args[1] or "oa")
decl_type = frame.args.decl or detect_decl(word, sv)
if not decl_type then
if not decl_type then
Line 113: Line 114:
local data = {forms = {}, categories = {}}
local data = {forms = {}, categories = {}}
data.head = parent_args["head"] or nil
data.head = parent_args["head"] or PAGENAME
data.proper = parent_args["proper"] and true or false
data.proper = parent_args["proper"] and true or false
data.nocat = parent_args["nocat"] and true or false
data.nocat = parent_args["nocat"] and true or false
data.sv = parent_args[1] or "oa" or error("Parameter 1 must be the word's stressed vowel")
data.sv = sv or error("Parameter 2 must be the word's stressed vowel")
-- Generate the forms
-- Generate the forms