Module:siwa-headword: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 12: Line 12:
local PAGENAME = mw.title.getCurrentTitle().text
local PAGENAME = mw.title.getCurrentTitle().text
local params = {
local params = {
[1] = { default = PAGENAME },
[2] = { default = PAGENAME },
[2] = { required = true },
[1] = { required = true },
}
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local args = require("Module:parameters").process(frame:getParent().args, params)
local head = args[1]
local head = frame.args[2]
if head == "" then
if head == "" then
head = nil
head = nil
end
end
local poscat = args[2]
local poscat = args[1]
local data = {lang = lang, pos_category = (postype and postype .. " " or "") .. poscat, categories = {}, heads = {head}, genders = {}, inflections = {}}
local data = {lang = lang, pos_category = (postype and postype .. " " or "") .. poscat, categories = {}, heads = {head}, genders = {}, inflections = {}}