Module:mg-noun: Difference between revisions

no edit summary
No edit summary
No edit summary
 
Line 124: Line 124:
for _, case in ipairs(cases) do
for _, case in ipairs(cases) do
local case_short = sub(case, 1, 2)
local case_short = sub(case, 1, 2)
local form =  
local form_s = args[case_short .. '_s'] and {args[case_short .. '_s']} or data.forms[case_short .. '_s'] or nil
local form_p = args[case_short .. '_p'] and {args[case_short .. '_p']} or data.forms[case_short .. '_p'] or nil
table.insert(ret, '|- \n! ' .. case .. '\n')
table.insert(ret, '|- \n! ' .. case .. '\n')
table.insert(ret, '| ' .. link(show_form({args[case_short .. '_s']} or data.forms[case_short .. '_s'] or nil)) .. '\n')
table.insert(ret, '| ' .. link(show_form(form_s)) .. '\n')
if not data.nopl then
if not data.nopl then
table.insert(ret, '| ' .. link(show_form({args[case_short .. '_p']} or data.forms[case_short .. '_p'] or nil)) .. '\n')
table.insert(ret, '| ' .. link(show_form(form_p)) .. '\n')
end
end
end
end