Module:siwa-noun: Difference between revisions

No edit summary
No edit summary
Line 89: Line 89:
local parent_args = frame:getParent().args
local parent_args = frame:getParent().args
local numbers = nil
local numbers = {}
local decl = {}
local decl = {}
local word = NAMESPACE == "Template" and "sivi" or parent_args.word or PAGENAME
local word = NAMESPACE == "Template" and "sivi" or parent_args.word or PAGENAME
Line 95: Line 95:


if not m_data[word] then
if not m_data[word] then
if frame.args.decl then
decl_type = frame.args.decl
decl_type = frame.args.decl or detect_decl(word, parent_args[1] or "oa")
else
if parent_args.n and parent_args.c and parent_args[1] then
decl_type = parent_args.n .. "-" .. parent_args.c
numbers = {parent_args[1]}
else
decl_type, numbers = detect_decl(word, parent_args[2] or "oa")
end
end
if not decl_type then
if not decl_type then