Modul:az-headword

A Wikiszótárból, a nyitott szótárból

A modult a Modul:az-headword/doc lapon tudod dokumentálni

local export = {}

function export.adjectives(frame)
	local params = {
		head = {},
		[1] = {}, -- hyphen (-) if incomparable, intensive form otherwise
	}
	local args = require("Module:parameters").process(frame:getParent().args, params)
	
	local lang = require("Module:languages").getByCode("az")
	local poscat = "adjectives"
	local positive_form = args.head or mw.title.getCurrentTitle().text
	local data = {
		lang = lang,
		pos_category = poscat,
		categories = {},
		heads = positive_form,
		inflections = {}
	}
	
	if args[1] == "-" then
		table.insert(data.inflections, { label = "not comparable" })
	else
		table.insert(data.inflections, { label = "comparative", "[[daha]] " .. positive_form })
		table.insert(data.inflections, { label = "superlative", "[[ən]] " .. positive_form })
		if args[1] then
			table.insert(data.inflections, { label = "intensive", args[1] })
		end
	end
	
	return require("Module:headword").full_headword(data)
end

return export