Modul:fa-adj

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

A modult a Modul:fa-adj/doc lapon tudod dokumentálni

local export = {}

local m_common = require("Module:fa-common")

local lang = require("Module:languages").getByCode("fa")

function export.main(frame)
	local args = frame:getParent().args
	local word = mw.title.getCurrentTitle().text
	local tr = args["tr"]; if tr == "" then tr = nil end
	local tr2 = args["tr2"] or nil
	local c = args["c"]
	
	local data = {lang = lang, pos_category = "melléknevek", categories = {}, translits = {tr, tr2}, inflections = {}}
	
	if c == "+" then
		table.insert(data.inflections, {
			label = 'közpéfok',
			accel = {form = "közpéfok", translit = tr and mw.uri.anchorEncode(tr) .. '-tar' or nil},
			word .. m_common.ZWNJ(word) .. "تر"
		})
		
		table.insert(data.inflections, {
			label = 'felsőfok',
			accel = {form = "felsőfok", translit = tr and mw.uri.anchorEncode(tr) .. '-tarin' or nil},
			word .. m_common.ZWNJ(word) .. "ترین"
		})
	end
	
	return require("Module:headword").full_headword(data)
end

return export