Module:Category tree/poscatboiler/data/lang-specific/rsk
This module handles generating the descriptions and categorization for 潘諾尼亞盧森尼亞語 category pages of the format "潘諾尼亞盧森尼亞語 LABEL" where LABEL can be any text. Examples are Category:Bulgarian conjugation 2.1 verbs and Category:Russian velar-stem neuter-form nouns. 該模块是 poscatboiler 系統的一部分,該系統是用於生成分類頁面的描述和分類的通用框架。
有關更多資訊,請參閱Module:category tree/poscatboiler/data/lang-specific/doc。
注意:如果您新增了特定語言的模块,請將語言代碼新增至 Module:category tree/poscatboiler/data/lang-specific 頂部的清單中,使程式碼能識別該模块。
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 }