Module:gender and number/templates

Wiktionary වෙතින්

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
"https://si.wiktionary.org/w/index.php?title=Module:gender_and_number/templates&oldid=164381" වෙතින් සම්ප්‍රවේශනය කෙරිණි