Module:category tree/lang/rsk
- The following documentation is generated by Module:documentation. [edit]
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox
This module handles generating the descriptions and categorization for Pannonian Rusyn category pages of the format "Pannonian Rusyn 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 rmatch = mw.ustring.match
--------------------------------- Adjectives --------------------------------
for _, pos in ipairs({ "adjectives", "pronouns", "determiners", "numerals", "suffixes", "adjective forms" }) do
labels["hard " .. pos] = {
description = "{{{langname}}} hard-stem " .. pos .. ", or " .. pos .. " ending in -и.",
additional =
"Where not borrowed, these adjectives are usually inherited from Old Slovak adjectives ending in -y or -ý, although this is not always the case, particularly with Old Slovak adjectives ending in -ci, -či, -di, -si, -ši, -ti, -zi or -ži, or their long equivalents.",
breadcrumb = "hard",
parents = { { name = pos .. " by inflection type", sort = "hard-stem" } },
}
labels["soft " .. pos] = {
description = "{{{langname}}} soft-stem " .. pos .. ", or " .. pos .. " ending in -ї.",
additional =
"Where not borrowed, these adjectives are usually inherited from Old Slovak adjectives ending in -li, -lí, -ni or -ní.",
breadcrumb = "soft",
parents = { { name = pos .. " by inflection type", sort = "soft-stem" } },
}
end
--------------------------------- Nouns/Pronouns/Numerals --------------------------------
for _, pos in ipairs({ "nouns", "pronouns", "numerals" }) do
local function make_label(label, description, parents, breadcrumb)
labels[pos .. " " .. label] = {
description = "{{{langname}}} " .. pos .. " " .. description,
breadcrumb = breadcrumb or label,
parents = parents,
}
end
make_label("with reducible stem",
"with a reducible stem, where an extra vowel is inserted " ..
"before the last stem consonant in the nominative singular.",
{ { name = pos .. " by inflection type", sort = "reducible stem" } }
)
labels["adjectival " .. pos] = {
description = "{{{langname}}} " .. pos .. " with adjectival endings.",
parents = { pos },
}
make_label("with irregular stem",
"with an irregular stem, which occurs in all cases except the nominative singular and maybe the accusative singular.",
{ { name = "irregular " .. pos, sort = "stem" } }
)
end
--------------------------------- Verbs --------------------------------
labels["verbs by class"] = {
description = "{{{langname}}} verbs categorized by class.",
parents = { { name = "verbs by inflection type", sort = "class" } },
}
table.insert(handlers, function(data)
local class = rmatch(data.label, "^class ([0-9]+) verbs$")
if class then
return {
description = "{{{langname}}} class " .. class .. " verbs.",
breadcrumb = class,
parents = { { name = "verbs by class", sort = class } },
}
end
end)
return { LABELS = labels, HANDLERS = handlers }