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

From Linguifex
Jump to navigation Jump to search
No edit summary
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
local labels = {}
local labels = {}


local noun_declensions = {
-----------------------------------------------------------------------------
first = {"1", "a"},
--                                                                        --
second = {"2", "y"},
--                                  NOUNS                                --
third = {"3", "o"},
--                                                                        --
fourth = {"4", "e"},
-----------------------------------------------------------------------------
fifth = {"5", "i"},
 
sixth = {"6", ""},
}


for _, pos in ipairs{"nouns", "proper nouns"} do
--------------------------------- Noun labels -------------------------------
for _, gender in ipairs{"lunar", "terrestrial", "solar", "aquatic"} do
for _, pos in ipairs{"nouns", "proper nouns", "pronouns"} do
for decl, declinfo in pairs(noun_declensions) do
for _, gender in ipairs{"lunar", "aquatic", "solar", "terrestrial"} do
local num, vowel = unpack(declinfo)
labels[gender .. " " .. pos] = {
description = "{{{langname}}} " .. pos .. " that belong to the " .. gender .. " gender or class.",
labels[decl .. "-declension " .. pos] = {
parents = {pos .. " by gender"},
description = "{{{langname}}} " .. pos .. " that belong to the " .. decl ..
breadcrumb = gender,
(num ~= "6" and " (or ''" .. vowel .. "''-themed)" or "") .. "declension class.",
}
parents = {{name = pos .. " by inflection type", sort = num}},
end
breadcrumb = decltext,
}
for i, decl_vowel in ipairs{"a", "y", "o", "e", "i", ""} do
local num = tostring(i)
labels[gender .. pos] = {
local ordinal = require("Module:ConvertNumeric").spell_number(num, nil, nil, false, false, false, "ordinal")
description = "{{{langname}}} " .. pos .. " that belong to the " .. gender .. " gender or class.",
labels[ordinal .. "-declension " .. pos] = {
parents = {{name = pos .. " by gender", sort = gender}},
description = "{{{langname}}} " .. pos .. " that belong to the " .. ordinal ..
breadcrumb = gender,
(i ~= 6 and " (or ''" .. decl_vowel .. "''-themed)" or "") .. " declension class.",
}
parents = {{name = pos .. " by inflection type", sort = num}},
end
breadcrumb = num,
}
end
end
end
end
-----------------------------------------------------------------------------
--                                                                        --
--                                ADJECTIVES                              --
--                                                                        --
-----------------------------------------------------------------------------
------------------------------ Adjective labels -----------------------------
labels["adjectives of first declension"] = {
description = "{{{langname}}} adjectives that belong to the first declension class.",
parents = {{name = "adjectives by inflection type", sort = "1"}},
}
labels["adjectives of second declension"] = {
description = "{{{langname}}} adjectives that belong to the second declension class.",
parents = {{name = "adjectives by inflection type", sort = "2"}},
}
labels["adjectives of third declension"] = {
description = "{{{langname}}} adjectives that belong to the third declension class.",
parents = {{name = "adjectives by inflection type", sort = "3"}},
}
labels["numerals of first declension"] = {
description = "{{{langname}}} numerals that belong to the first declension class.",
parents = {{name = "numerals by inflection type", sort = "1"}},
}
labels["numerals of second declension"] = {
description = "{{{langname}}} numerals that belong to the second declension class.",
parents = {{name = "numerals by inflection type", sort = "2"}},
}
labels["numerals of third declension"] = {
description = "{{{langname}}} numerals that belong to the third declension class.",
parents = {{name = "numerals by inflection type", sort = "3"}},
}
labels["participles of first declension"] = {
description = "{{{langname}}} participles that belong to the first declension class.",
parents = {{name = "participles by inflection type", sort = "1"}},
}
labels["participles of second declension"] = {
description = "{{{langname}}} participles that belong to the second declension class.",
parents = {{name = "participles by inflection type", sort = "2"}},
}
labels["participles of third declension"] = {
description = "{{{langname}}} participles that belong to the third declension class.",
parents = {{name = "participles by inflection type", sort = "3"}},
}
-----------------------------------------------------------------------------
--                                                                        --
--                                  VERBS                                --
--                                                                        --
-----------------------------------------------------------------------------
--------------------------------- Verb labels -------------------------------
labels["consonant-final verbs"] = {
description = "{{{langname}}} verbs whose stems end in a consonant.",
parents = {"verbs by inflection type"},
}
labels["vowel-final verbs"] = {
description = "{{{langname}}} verbs whose stems end in a vowel.",
parents = {"verbs by inflection type"},
}
labels["instrumental passive verbs"] = {
description = "{{{langname}}} verbs that indicate actions, occurrences, or states directed from inanimate grammatical subjects, such as natural forces, inanimate objects, and instruments.",
parents = {"verbs"},
}


return {LABELS = labels}
return {LABELS = labels}

Latest revision as of 18:36, 12 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 = {}

-----------------------------------------------------------------------------
--                                                                         --
--                                   NOUNS                                 --
--                                                                         --
-----------------------------------------------------------------------------


--------------------------------- Noun labels -------------------------------
for _, pos in ipairs{"nouns", "proper nouns", "pronouns"} do
	for _, gender in ipairs{"lunar", "aquatic", "solar", "terrestrial"} do
		labels[gender .. " " .. pos] = {
			description = "{{{langname}}} " .. pos .. " that belong to the " .. gender .. " gender or class.",
			parents = {pos .. " by gender"},
			breadcrumb = gender,
		}
	end
	
	for i, decl_vowel in ipairs{"a", "y", "o", "e", "i", ""} do
		local num = tostring(i)
		local ordinal = require("Module:ConvertNumeric").spell_number(num, nil, nil, false, false, false, "ordinal")
		labels[ordinal .. "-declension " .. pos] = {
			description = "{{{langname}}} " .. pos .. " that belong to the " .. ordinal ..
				(i ~= 6 and " (or ''" .. decl_vowel .. "''-themed)" or "") .. " declension class.",
			parents = {{name = pos .. " by inflection type", sort = num}},
			breadcrumb = num,
		}
	end
end

-----------------------------------------------------------------------------
--                                                                         --
--                                ADJECTIVES                               --
--                                                                         --
-----------------------------------------------------------------------------


------------------------------ Adjective labels -----------------------------

labels["adjectives of first declension"] = {
	description = "{{{langname}}} adjectives that belong to the first declension class.",
	parents = {{name = "adjectives by inflection type", sort = "1"}},
}

labels["adjectives of second declension"] = {
	description = "{{{langname}}} adjectives that belong to the second declension class.",
	parents = {{name = "adjectives by inflection type", sort = "2"}},
}

labels["adjectives of third declension"] = {
	description = "{{{langname}}} adjectives that belong to the third declension class.",
	parents = {{name = "adjectives by inflection type", sort = "3"}},
}

labels["numerals of first declension"] = {
	description = "{{{langname}}} numerals that belong to the first declension class.",
	parents = {{name = "numerals by inflection type", sort = "1"}},
}

labels["numerals of second declension"] = {
	description = "{{{langname}}} numerals that belong to the second declension class.",
	parents = {{name = "numerals by inflection type", sort = "2"}},
}

labels["numerals of third declension"] = {
	description = "{{{langname}}} numerals that belong to the third declension class.",
	parents = {{name = "numerals by inflection type", sort = "3"}},
}

labels["participles of first declension"] = {
	description = "{{{langname}}} participles that belong to the first declension class.",
	parents = {{name = "participles by inflection type", sort = "1"}},
}

labels["participles of second declension"] = {
	description = "{{{langname}}} participles that belong to the second declension class.",
	parents = {{name = "participles by inflection type", sort = "2"}},
}

labels["participles of third declension"] = {
	description = "{{{langname}}} participles that belong to the third declension class.",
	parents = {{name = "participles by inflection type", sort = "3"}},
}

-----------------------------------------------------------------------------
--                                                                         --
--                                   VERBS                                 --
--                                                                         --
-----------------------------------------------------------------------------


--------------------------------- Verb labels -------------------------------

labels["consonant-final verbs"] = {
	description = "{{{langname}}} verbs whose stems end in a consonant.",
	parents = {"verbs by inflection type"},
}

labels["vowel-final verbs"] = {
	description = "{{{langname}}} verbs whose stems end in a vowel.",
	parents = {"verbs by inflection type"},
}

labels["instrumental passive verbs"] = {
description = "{{{langname}}} verbs that indicate actions, occurrences, or states directed from inanimate grammatical subjects, such as natural forces, inanimate objects, and instruments.",
parents = {"verbs"},
}

return {LABELS = labels}