45,646
edits
No edit summary |
No edit summary |
||
Line 85: | Line 85: | ||
local parent_args = frame:getParent().args | local parent_args = frame:getParent().args | ||
local head = parent_args["head"] | local head = parent_args["head"] or nil | ||
local poscat = frame.args[1] or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.") | local poscat = frame.args[1] or error("Part of speech has not been specified. Please pass parameter 1 to the module invocation.") | ||
Line 92: | Line 92: | ||
local data = { | local data = { | ||
lang = lang, | lang = lang, | ||
heads = { | heads = {head}, | ||
inflections = {}, | inflections = {}, | ||
genders = {}, | genders = {}, | ||
Line 121: | Line 121: | ||
local args = require("Module:parameters").process(args, params) | local args = require("Module:parameters").process(args, params) | ||
data.heads = {args["head"]} | data.heads = {args["head"] or split(require("Module:linkeach").link_for_modules(PAGENAME), " ")} | ||
table.insert(data.genders, args[1]) | table.insert(data.genders, args[1]) |