模組:Category tree/poscatboiler/data/lang-specific/zlw-ocs
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
--------------------------------- Nouns/Pronouns/Numerals --------------------------------
local noun_decls = {
["硬音陽性a-詞幹"] = {
singular = "-а",
plural = "-y",
gender = "陽性",
sortkey = "a-詞幹",
},
["硬音陰性a-詞幹"] = {
singular = "-а",
plural = "-y",
gender = "陰性",
sortkey = "a-詞幹",
},
["軟音陽性a-詞幹"] = {
singular = "-ě",
plural = "-ě",
gender = "陽性",
sortkey = "a-詞幹",
},
["軟音陰性a-詞幹"] = {
singular = "-ě",
plural = "-ě",
gender = "陰性",
sortkey = "a-詞幹",
},
["陽性i-詞幹"] = {
singular = "-",
plural = "-i",
gender = "陽性",
},
["陰性i-詞幹"] = {
singular = "-",
plural = "-i",
gender = "陰性",
},
["ī-詞幹"] = {
singular = "-ии or -ьи",
plural = "-иѭ or -ьѩ",
gender = "陰性(陽性when referring to a person)",
parent = "軟音a-詞幹",
},
["硬音陽性o-詞幹"] = {
singular = "-",
plural = "-i",
gender = "陽性",
sortkey = "o-詞幹",
},
["軟音陽性o-詞幹"] = {
singular = "-",
plural = "-i",
gender = "陽性",
sortkey = "o-詞幹",
},
["硬音中性o-詞幹"] = {
singular = "-o",
plural = "-а",
gender = "中性",
sortkey = "o-詞幹",
},
["軟音中性o-詞幹"] = {
singular = "-e",
plural = "-ě",
gender = "中性",
sortkey = "o-詞幹",
},
["u-詞幹"] = {
singular = "-",
plural = "-оvé",
gender = "陽性",
},
["陽性n-詞幹"] = {
singular = "-n",
plural = "-ni",
gender = "陽性",
parent = "輔音詞幹",
},
["中性n-詞幹"] = {
singular = "-ě",
plural = "-ena",
gender = "中性",
parent = "輔音詞幹",
},
["陽性t-詞幹"] = {
singular = "et",
plural = "-ty",
gender = "陽性",
parent = "輔音詞幹",
},
["中性t-詞幹"] = {
singular = "-ě",
plural = "-ata",
gender = "中性",
parent = "輔音詞幹",
},
["r-詞幹"] = {
singular = "-i",
plural = "-ery",
gender = "陰性",
parent = "輔音詞幹",
},
["v-詞幹"] = {
singular = "-ev",
plural = "-ve",
gender = "陰性",
parent = "輔音詞幹",
}
}
for _, pos in ipairs({"名詞"}) do
local sgpos = pos:gsub("s$", "")
labels["輔音詞幹" .. pos] = {
description = "古捷克語輔音詞幹 " .. pos .. ".",
additional = "This is not a single declension class, but a set of related declension classes, with endings that are"
.. " largely identical outside of the nominative, accusative and vocative.",
breadcrumb = "輔音詞幹",
parents = "依詞幹類型和性別分類的" .. pos,
}
for decl, spec in pairs(noun_decls) do
labels[decl .. pos] = {
description = "古捷克語" .. decl .. pos .. "。",
additional = "這些" .. pos .. "的單數通常以 " .. spec.singular .. " 結尾,複數通常以 " .. spec.plural .. "結尾,"
.. "且通常為" .. spec.gender .. "。",
breadcrumb = decl,
parents = {{
name = spec.parent and spec.parent .. pos or "依詞幹類型和性別分類的" .. pos,
sort = spec.sortkey or decl,
}},
}
end
end
--------------------------------- Verbs --------------------------------
local verb_classes = {
["1"] = "whose infinitive ends in <<-ti>> directly following the root (or <<-ci>> for roots ending in a velar) and ending in <<-e>>, <<-é>> or <<-ie>> in the third singular present",
["2"] = "ending in <<-núti>> in the infinitive and <<-ne>> in the third singular present",
["3"] = "ending in <<-ěti>>, <<-éti>>, <<-ieti>> or <<-áti>> in the infinitive and <<-í>> or <<-ie>> in the third singular present",
["4"] = "ending in <<-iti>> in the infinitive and <<-í>> in the third singular present",
["5"] = "ending in Proto-Slavic {{m|sla-pro||*-ati}} or {{m|sla-pro||*-ěti}} in the infinitive (古捷克語<<-ati>>, <<-áti>>, <<-ěti>> or <<-ieti>>) and 古捷克語<<-e>> or <<-á>> in the third singular present",
["6"] = "ending in <<-ovati>> in the infinitive and <<-uje>> in the third singular present",
}
for class, desc in pairs(verb_classes) do
desc = desc:gsub("<<(.-)>>", "{{m|zlw-ocs||%1}}")
labels[class .. "類動詞"] = {
description = ("古捷克語%s類動詞,%s。"):format(class, desc),
breadcrumb = class .. "類",
parents = {{name = "依屈折分類的動詞", sort = class}},
}
end
--------------------------------- Adjectives --------------------------------
local adj_like_poses = {"形容詞", "代詞", "限定詞", "數詞", "後綴"}
for _, pos in ipairs(adj_like_poses) do
local plpos = pos
labels["硬音" .. plpos] = {
description = "古捷克語硬音" .. plpos .. "。",
parents = {{name = "依屈折分類的" .. plpos, sort = "硬音詞幹"}},
}
labels["軟音" .. plpos] = {
description = "古捷克語軟音" .. plpos .. "。",
parents = {{name = "依屈折分類的" .. plpos, sort = "軟音詞幹"}},
}
labels["有短形式的" .. plpos] = {
description = "有短形式屈折的古捷克語" .. plpos .. "。",
parents = {{name = "依屈折分類的" .. plpos, sort = "短形式"}},
}
end
--------------------------------- Nouns/Pronouns/Numerals --------------------------------
local possible_genders = {"陽性個人", "陽性動物", "陽性無生", "陰性", "中性"}
for _, pos in ipairs({"名詞", "代詞", "數詞"}) do
local sgpos = pos:gsub("s$", "")
local function make_label(label, description, props)
local full_label
if rfind(label, "POS") then
full_label = label:gsub("POS", pos)
else
full_label = pos .. label
end
local full_description
if rfind(description, "POS") then
full_description = description:gsub("POS", pos)
else
full_description = pos .. description
end
full_description = "古捷克語" .. full_description
props.description = full_description
if not props.breadcrumb then
props.breadcrumb = label:gsub(" *POS *", "")
props.breadcrumb = mw.text.trim(props.breadcrumb)
end
labels[full_label] = props
end
make_label("形容詞性POS",
"有形容詞性詞尾。",
{parents = {pos}}
)
make_label("依詞幹類型和性別分類的POS",
"categorized by stem type and gender.",
{parents = {name = "依屈折分類的" .. pos, sort = "stem type and gender"}}
)
make_label("依詞幹類型和性別分類的形容詞性POS",
"adjectival POS categorized by stem type and gender.",
{
parents = {
{name = "依屈折分類的" .. pos, sort = "stem type and gender"},
{name = "形容詞性" .. pos, sort = "stem type and gender"},
}
}
)
for _, gender in ipairs(possible_genders) do
make_label("依詞幹類型分類的" .. gender .. "POS",
("%s POS categorized by stem type."):format(gender),
{
breadcrumb = gender,
parents = {"依詞幹類型和性別分類的" .. pos},
}
)
make_label("依詞幹類型分類的" .. gender .. "形容詞性POS",
("%s adjectival POS categorized by stem type."):format(gender),
{
breadcrumb = gender,
parents = {"依詞幹類型和性別分類的形容詞性" .. pos},
}
)
end
make_label("帶定量元音交替的POS",
"with stem alternation between a long vowel (''á'', ''é'', ''í'', ''ó'' or ''ú'') and the corresponding " ..
"short vowel (''a'', ''e'', ''i'', ''o'' or ''u''), depending on the form.",
{
additional = ("參見[[:Category:帶í-ě交替的古捷克語%s]]。"):format(pos),
parents = {name = pos, sort = "quantitative vowel alternation"},
}
)
make_label("帶í-ě交替的POS",
"with stem alternation between ''í'' and ''ě'', depending on the form.",
{
additional = ("參見[[:Category:帶定量元音交替的古捷克語%s]]。"):format(pos),
parents = {name = pos, sort = "í-ě alternation"},
}
)
make_label("實際性別和變格性別不同的POS",
"declined with the endings of a particular gender but actually with a different gender, as shown by "
.. "agreement patterns.",
{
additional = ("See also [[:Category:古捷克語%s with í-ě alternation]]."):format(pos),
parents = {name = "不規則" .. pos, sort = "change gender"}
}
)
make_label("複數改變性別的POS",
"with a different gender in the plural as compared with the singular, as shown by agreement patterns.",
{
additional = ("See also [[:Category:古捷克語%s with í-ě alternation]]."):format(pos),
parents = {name = "不規則" .. pos, sort = "change gender"}
}
)
make_label("有可簡化詞幹的POS",
"with a reducible stem, where an extra vowel is inserted " ..
"before the last stem consonant in the nominative singular and/or genitive plural.",
{parents = {name = "依屈折分類的" .. pos, sort = "reducible stem"}}
)
make_label("有多個詞幹的POS",
"with multiple stems.",
{parents = {name = "依屈折分類的" .. pos, sort = "multiple stems"}}
)
make_label("陽性個人POS",
"陽性個人POS, i.e. POS referring (mostly) to male human beings.",
{
breadcrumb = "個人",
parents = {{name = "陽性" .. pos, sort = "個人"}},
}
)
make_label("陽性動物POS",
"陽性動物POS, i.e. POS referring (mostly) to male 動物s.",
{
breadcrumb = "動物",
parents = {{name = "陽性" .. pos, sort = "動物"}},
}
)
make_label("陽性無生POS",
"陽性無生POS, i.e. POS referring to 無生objects that have 陽性agreement patterns.",
{
breadcrumb = "inanimate",
parents = {{name = "陽性" .. pos, sort = "inanimate"}},
}
)
make_label("有規則外語變格的POS",
"with a foreign ending such as ''-us'', ''-os'', ''-es'', ''-um'', ''-on'' or silent ''-e'', which is dropped in " ..
"all cases except the nominative singular and maybe the accusative singular and vocative singular.",
{parents = {name = "依屈折分類的" .. pos, sort = "regular foreign declension"}}
)
make_label("有不規則詞幹的POS",
"with an irregular stem, which occurs in all cases except the nominative singular and maybe the accusative "
.. "singular and vocative singular.",
{parents = {name = "不規則" .. pos, sort = "stem"}}
)
end
return {LABELS = labels, HANDLERS = handlers}