Module:az-verb

From Wiktionary, the free dictionary
Jump to navigation Jump to search


local export = {}

function export.light_verb(frame)
	local params = {
		["head"] = {list = true},
		["c"] = {},
	}
	
	local args = require("Module:parameters").process(frame:getParent().args, params)
	
	local lang = require("Module:languages").getByCode("az")
	local data = {lang = lang,
		pos_category = "verbs",
		categories = {"Azerbaijani compound verbs"},
		heads = args["head"],
		genders = {},
		inflections = {},
		check = {}}

	if (args["c"]) then
		table.insert(data["categories"], "Azerbaijani compound verbs formed with \"" .. args["c"] .. '"')
	else
		local pagename = mw.title.getCurrentTitle().text
		local parts = mw.text.split(pagename, " ", true)
		table.insert(data["categories"], "Azerbaijani compound verbs formed with \"" .. parts[#parts] .. '"')
	end
	
	return require("Module:headword").full_headword(data)
	
end

return export