模組:Category tree/poscatboiler/data/lang-specific/sk
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 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", "ending with ''-a''"},
{"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 in most cases"},
{"kuli", "coolie", "m-an", "soft or hard", "of foreign origin, ending with a vowel"},
{"ž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
labels["adjectival nouns"] = {
description = "{{{langname}}} nouns with adjectival endings.",
parents = {"nouns"},
breadcrumb = "adjectival",
}
--------------------------------- 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}