Module:siwa-noun: Difference between revisions

No edit summary
No edit summary
Line 98: Line 98:
-- This is the only function that can be invoked from a template.
-- This is the only function that can be invoked from a template.
function export.show(frame)
function export.show(frame)
local params = {
local parent_args = frame:getParent().args
[1] = { required = true },
local args = require("Module:parameters").process(parent_args, m_data.params, true)
[2] = { default = pagename },
[3] = {},
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local decl_type = {}
local decl_type = {}
local gender, word = args[1], dedigraphize(args[2])
local gender, word = args[1], args[2]~=nil and dedigraphize(args[2]) or dedigraphize(pagename)
local quality = args[3]~=nil and args[3] or detect_quality(word)
local quality = args[3]~=nil and args[3] or detect_quality(word)