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 poscatboiler 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 rfind = mw.ustring.find
local rmatch = mw.ustring.match
local rsubn = mw.ustring.gsub
local unpack = unpack or table.unpack -- Lua 5.2 compatibility
-- version of rsubn() that discards all but the first return value
local function rsub(term, foo, bar)
local retval = rsubn(term, foo, bar)
return retval
end
--------------------------------- Nouns/Pronouns/Numerals --------------------------------
for _, pos in ipairs({"nouns", "pronouns", "numerals"}) do
local sgpos = pos:gsub("s$", "")
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
return {LABELS = labels, HANDLERS = handlers}