Module:category tree/poscatboiler/data/lang-specific/sk
- පහත දැක්වෙන උපදෙස්, Module:documentation මගින් ජනනය කොට ඇත. [සංස්කරණය කරන්න]
- ප්රයෝජනවත් සබැඳි: root page • root page’s subpages • සබැඳි • transclusions • testcases • sandbox
This module handles generating the descriptions and categorization for Slovak category pages of the format "Slovak 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/poscatboiler/data/lang-specific/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/poscatboiler/data/lang-specific in order for the module to be recognized.
local labels = {}
local handlers = {}
local rfind = mw.ustring.find
local rmatch = mw.ustring.match
--------------------------------- Nouns --------------------------------
local decltypes = {
{"dub", "oak tree", "m-in", "hard"},
{"chlap", "man", "m-an", "hard"},
{"mesto", "city", "n", "hard"},
{"stroj", "machine", "m-in", "soft"},
{"kosť", "bone", "f", "soft", "a pure ''i''-stem with genitive in ''-i''"},
{"vysvedčenie", "report card", "n", "soft", "with vocalic stem"},
{"dlaň", "palm of the hand", "f", "soft", "a mixed ''i''-stem with genitive in ''-e''"},
{"hrdina", "hero", "m-an", "hard", "with feminine endings"},
{"dievča", "girl", "n", "soft", "with ''t''-stem endings outside of the nominative and accusative singular"},
{"srdce", "heart", "n", "soft"},
{"gazdiná", "housewife", "f", "hard", "with adjectival endings"},
{"žena", "woman", "f", "hard"},
{"ulica", "street", "f", "soft"},
}
local possible_genders = {
["m-an"] = "masculine animate",
["m-in"] = "masculine inanimate",
["f"] = "feminine",
["n"] = "neuter",
}
labels["nouns by declension"] = {
description = "{{{langname}}} nouns categorized by the declension they follow.",
additional = "Declensions are described using a common noun of that declension.",
parents = {{name = "nouns by inflection type", sort = "by declension"}},
breadcrumb = "declension",
}
for _, declspec in ipairs(decltypes) do
local sample_term, meaning, gender, softhard, extra = unpack(declspec)
labels["terms with declension " .. sample_term] = {
description = ("{{{langname}}} nouns forming their declension like {{m|sk|%s||%s}}."):format(
sample_term, meaning),
additional = ("These are %s %s%s."):format(softhard, possible_genders[gender], extra and ", " .. extra or ""),
parents = {{name = "nouns by declension", sort = sample_term}},
breadcrumb = sample_term,
displaytitle = ("{{{langname}}} terms with declension {{m|sk||%s}}"):format(sample_term),
}
end
local labels = {}
local handlers = {}
local rfind = mw.ustring.find
local rmatch = mw.ustring.match
--------------------------------- Adjectives --------------------------------
local adj_like_poses = {"adjective", "pronoun", "determiner", "numeral", "suffix"}
for _, pos in ipairs(adj_like_poses) do
local plpos = require("Module:string utilities").pluralize(pos)
for _, adjtype in ipairs { "hard", "soft" } do
labels[adjtype .. " long " .. plpos] = {
description = "{{{langname}}} " .. adjtype .. "-stem " .. plpos .. " ending in a long vowel.",
breadcrumb = adjtype .. " long",
parents = {{name = plpos .. " by inflection type", sort = adjtype .. " long"}},
}
labels[adjtype .. " short " .. plpos] = {
description = "{{{langname}}} " .. adjtype .. "-stem " .. plpos .. " ending in a short vowel.",
additional = "The short vowel occurs due to the {{w|Slovak_orthography#Rhythmical_rule|Slovak rhythmic law}} when the preceding syllable is long.",
breadcrumb = adjtype .. " short",
parents = {{name = plpos .. " by inflection type", sort = adjtype .. " short"}},
}
end
end
--------------------------------- Misc maintenance categories --------------------------------
local function define_maint_label(lb, desc)
labels[lb] = {
description = desc,
parents = {"entry maintenance"},
breadcrumb = lb,
hidden = true,
can_be_empty = true,
}
end
define_maint_label("terms with obsolete declension parameters",
"Pages are placed here if the sk-headword module receives any of the obsolete parameters: decl or declqual.")
define_maint_label("terms with obsolete inflection parameters",
"Pages are placed here if the sk-headword module receives any of the obsolete parameters: pl, plqual, gen, genqual, genpl, or genplqual.")
define_maint_label("terms without declension paradigm",
"Pages are placed here if the sk-decl-noun template doesn't receive a paradigm parameter.")
define_maint_label("terms with IPA literal transcriptions",
"Pages are placed here if any transcriptions in the sk-IPA template are literal.")
define_maint_label("terms with IPA predictive transcriptions",
"Pages are placed here if any transcriptions in the sk-IPA template are not literal.")
return {LABELS = labels, HANDLERS = handlers}