Module:Gender and number/templates: Difference between revisions
Jump to navigation
Jump to search
(clean up, allow etym languages) |
m (1 revision imported) |
(No difference)
|
Latest revision as of 02:05, 10 June 2024
Documentation for this module may be created at Module:Gender and number/templates/doc
local export = {}
function export.format_one(frame)
local parent_args = frame:getParent().args
local params = {
[1] = {required = true},
["lang"] = {},
["pos"] = {},
}
-- FIXME!!! This is called from [[Template:g-lite/node]] with extraneous parameters.
local args = require("Module:parameters").process(parent_args, params, "return unknown")
local lang = args.lang and require("Module:languages").getByCode(args.lang, "lang", "allow etym")
local html, cats = require("Module:gender and number").format_genders({{ spec = args[1] }}, lang, args.pos)
return html .. require("Module:utilities").format_categories(cats, lang)
end
return export