Module:category tree/lang/qhv: Difference between revisions

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
Line 23: Line 23:
labels[gender .. pos] = {
labels[gender .. pos] = {
description = "{{{langname}}} " .. pos .. " proper nouns that belong to the " .. gender .. " gender or class.",
description = "{{{langname}}} " .. pos .. " that belong to the " .. gender .. " gender or class.",
parents = {{name = pos .. " by gender", sort = gender}},
parents = {{name = pos .. " by gender", sort = gender}},
breadcrumb = gender,
breadcrumb = gender,

Revision as of 20:52, 11 May 2026


This module handles generating the descriptions and categorization for High Valyrian category pages of the format "High Valyrian 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 noun_declensions = {
	first = {"1", "a"},
	second = {"2", "y"},
	third = {"3", "o"},
	fourth = {"4", "e"},
	fifth = {"5", "i"},
	sixth = {"6", ""},
}

for _, pos in ipairs{"nouns", "proper nouns"} do
	for _, gender in ipairs{"lunar", "terrestrial", "solar", "aquatic"} do
		for decl, declinfo in pairs(noun_declensions) do
			local num, vowel = unpack(declinfo)
			
			labels[decl .. "-declension " .. pos] = {
				description = "{{{langname}}} " .. pos .. " that belong to the " .. decl ..
					(num ~= "6" and " (or ''" .. vowel .. "''-themed)" or "") .. "declension class.",
				parents = {{name = pos .. " by inflection type", sort = num}},
				breadcrumb = decltext,
			}
			
			labels[gender .. pos] = {
				description = "{{{langname}}} " .. pos .. " that belong to the " .. gender .. " gender or class.",
				parents = {{name = pos .. " by gender", sort = gender}},
				breadcrumb = gender,
			}
		end
	end
end

return {LABELS = labels}