模組:Category tree/poscatboiler/data/lang-specific/vep


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 = {}

------- Nominal categories -------

labels["nominals by declension"] = {
	description = "{{{langname}}} nouns and adjectives categorized by their declension type.",
	breadcrumb = "by declension",
	-- doesn't exist yet
	-- preceding = "{{mainapp|Veps declension}}",
	parents = {
		{name = "nouns", sort = "declension"},
		{name = "adjectives", sort = "declension"},
	},
}

table.insert(handlers, function(data)
	local nomtype = data.label:match("^(.*)%-type nominals$")
	if nomtype then
		return {
			description = ("{{{langname}}} ''%s''-type nominals."):format(nomtype),
			-- doesn't exist yet
			-- preceding = ("{{mainapp|Veps declension/%s}}"):format(nomtype),
			additional = ("Terms are added to this category using {{tl|vep-decl-%s}}."):format(nomtype),
			breadcrumb = {name = ("''%s''-type"):format(nomtype), nocap = true},
			parents = {"nominals by declension"},
		}
	end
end)

------- Verbal categories -------

labels["verbs by conjugation"] = {
	description = "{{{langname}}} verbs categorized by their conjugation type.",
	breadcrumb = "by conjugation",
	-- doesn't exist yet
	-- preceding = "{{mainapp|Veps conjugation}}",
	parents = {
		{name = "verbs", sort = "conjugation"},
	},
}

local defective_types = {
	["kaikaa"] = true,
}

table.insert(handlers, function(data)
	local verbtype = data.label:match("^(.*)%-type verbs$")
	if verbtype then
		local parents = {"verbs by conjugation"}
		return {
			description = ("{{{langname}}} ''%s''-type verbs."):format(verbtype),
			-- doesn't exist yet
			-- preceding = ("{{mainapp|Veps conjugation/%s}}"):format(verbtype),
			additional = ("Terms are added to this category using {{tl|vep-conj-%s}}."):format(verbtype),
			breadcrumb = {name = ("''%s''-type"):format(verbtype), nocap = true},
			parents = parents,
		}
	end
end)

local stem_vowels = {
	"-ä-",
	"-a-, past in -i-",
	"-a-, past in -oi-",
	"-e-",
	"-i-",
	"-o-",
	"-u-",
	"-ü-",
}

for _, stem_vowel in ipairs(stem_vowels) do
	local label_pref = "verbs with stem in "
	local linked_stem_vowel = stem_vowel:gsub("(%-.-%-)", "{{m|vep|%1}}")
	local italicized_stem_vowel = stem_vowel:gsub("(%-.-%-)", "{{m|vep||%1}}") 
	labels[label_pref .. stem_vowel] = {
		description = "{{{langname}}} " .. label_pref .. linked_stem_vowel .. ".",
		displaytitle = "{{{langname}}} " .. label_pref .. italicized_stem_vowel,
		breadcrumb = "stem in " .. italicized_stem_vowel,
		parents = {{name = "verbs by inflection type", sort = stem_vowel:gsub("^%-", "")}},
	}
end

labels["monosyllabic verbs"] = {
	description = "{{{langname}}} monosyllabic verbs.",
	breadcrumb = "monosyllabic",
	parents = {{name = "verbs by inflection type", sort = "1"}},
}


return {LABELS = labels, HANDLERS = handlers}