Module:category tree/lang/odt


This module handles generating the descriptions and categorization for Old Dutch category pages of the format "Old Dutch LABEL" where LABEL can be any text. Examples are Category:Bulgarian conjugation 2.1 verbs and Category:Russian velar-stem neuter-form nouns. This module is part of the category tree system, which is a general framework for generating the descriptions and categorization of category pages.

For more information, see Module:category tree/lang/documentation.

NOTE: If you add a new language-specific module, you must add the language code to the list at the top of Module:category tree/lang in order for the module to be recognized.


local labels = {}
local handlers = {}

local insert = table.insert

labels["verbs by derivation type"] = {
	parents = {{ name = "verbs", sort = "derivation" }},
	breadcrumb = "by derivation type",
}

labels["separable verbs"] = {
	description = "{{{langname}}} verbs that split into two parts in certain constructions.",
	parents = "verbs by derivation type",
	breadcrumb = "separable",
}

labels["basic verbs"] = {
	description = "{{{langname}}} verbs which are not prefixed and cannot be separated.",
	parents = "verbs by derivation type",
	breadcrumb = "basic",
}

labels["prefixed verbs"] = {
	parents = "verbs by derivation type",
	breadcrumb = "prefixed",
}

labels["contracted verbs"] = {
	-- add a description
	parents = {
		"verbs by inflection type",
		"irregular verbs",
	},
	breadcrumb = "contracted",
}

labels["irregular strong verbs"] = {
	-- add a description
	parents = {
		"verbs by inflection type",
		"irregular verbs",
		"strong verbs",
	},
	breadcrumb = "irregular strong",
}

labels["Verner alternating verbs"] = {
	description = "{{{langname}}} verbs which alternate between consonants according to [[w:Verner's law|Verner's law]].",
	parents = "irregular strong verbs",
	breadcrumb = "Verner alternating",
}

labels["irregular weak verbs"] = {
	-- add a description
	parents = {
		"verbs by inflection type",
		"irregular verbs",
		"weak verbs",
	},
	breadcrumb = "irregular weak",
}

labels["hiatus verbs"] = {
	-- add a description
	parents = {
		"verbs by inflection type",
		"irregular verbs",
	},
	breadcrumb = "hiatus",
}

labels["consonant stem nouns"] = {
	description = "{{{langname}}} nouns which end in a consonant.",
	parents = "nouns by inflection type",
	breadcrumb = "consonant stem",
}

insert(handlers, function (data)
	local class = data.label:match("^class ([%d]) strong j%-present verbs$")
	if class then
		return {
			description = "{{{langname}}} class " .. class .. " strong verbs with a -''j''- suffix in the present tense. ",
			parents = {
				"class " .. class .. " strong verbs",
				"irregular strong verbs",
			},
			breadcrumb = "j-present",
		}
	end
end)

insert(handlers, function (data)
	local separable, with = data.label:match("^(separable) verbs with (.+)$")
	if separable and with then
		return {
			description = "{{{langname}}} verbs which separate into " .. with .. " and their stem.",
			parents = "separable verbs",
			breadcrumb = with,
		}
	end
end)

insert(handlers, function(data)
	local gender, category
	for _, g in ipairs({ "feminine", "masculine", "neuter" }) do
		gender, category = data.label:match("^(" .. g .. ") (.+)$")
		if gender then break end
	end
	category = category or data.label
	local stem, POS = category:match("^(.-)%-stem (%w+)$")
	if stem and POS then
		local ret = {
			description = "{{{langname}}} " .. (gender or "") .. " " .. POS .. " which decline in historical {{m|odt||-" .. stem .. "}}.",
			breadcrumb = (gender and gender .. " " or "") .. "-" .. stem .. " stems",
		}
		if gender then
			ret.parents = {
				stem .. "-stem " .. POS,
				"nouns by inflection type",
			}
		else
			ret.parents = { 
				{ name = POS, sort = stem },
				{ name = "nouns by inflection type", sort = stem },
			}
		end
		return ret
	end
end)

return { LABELS = labels, HANDLERS = handlers }
Category:Category tree data modules/lang Category:Old Dutch data modules Category:Old Dutch modules