انتقل إلى المحتوى

وحدة:category tree/lang/ko

من ويكاموس، القاموس الحر
local labels = {}
local handlers = {}

table.insert(handlers, function(data)
	local irreg_type, plpos = data.label:match("^([a-z-]+)-irregular ([a-z]+s)$")
	if irreg_type and (plpos == "adjectives" or plpos == "verbs") then
		local ital_irreg_type
		if #irreg_type <= 3 then
			ital_irreg_type = "''" .. irreg_type .. "''"
		else
			local subpos, stem = irreg_type:match("^([a-z]+)%-([a-z]+)$")
			if subpos then
				-- "determiner-h-irregular adjectives"
				ital_irreg_type = subpos .. "-''" .. stem .. "''"
			end
		end
		ital_irreg_type = ital_irreg_type or irreg_type
		local displaytitle = "{{{langname}}} " .. ital_irreg_type .. "-irregular " .. plpos
		return {
			description = displaytitle .. ".", -- FIXME: Explain what the irregular types mean
			displaytitle = displaytitle,
			breadcrumb_and_first_sort_base = ital_irreg_type,
			parents = {"irregular " .. plpos},
		}
	end
end)

return { LABELS = labels, HANDLERS = handlers }