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


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



-----------------------------------------------------------------------------
--                                                                         --
--                                  VERBS                                  --
--                                                                         --
-----------------------------------------------------------------------------


local conjugations = {
	["第一類"] = "1",
	["第二類"] = "2",
	["第三類"] = "3",
	["第四類"] = "4",
}

local function conjtext_conjlink(conjugation)
	local conjtext = conjugation .. "變位"
	local conjlink = "[[Appendix:拉丁語" .. conjtext .. "|" .. conjtext .. "]]"
	return conjtext, conjlink
end

for conjugation, conjnum in pairs(conjugations) do
	local conjtext, conjlink = conjtext_conjlink(conjugation)
	labels[conjtext .. "動詞"] = {
		description = "屬於" .. conjlink .. "的{{{langname}}}動詞。",
		parents = {
			{name = "依屈折分類的動詞", sort = conjnum},
		},
		breadcrumb = conjtext
	}
end

labels["verbs by perfect"] = {
	description = "{{{langname}}} verbs categorized by the formation of their perfect tense.",
	parents = {"verbs by derivation type"},
}

-- Add labels for e.g. [[Category:Latin verbs with perfect in -iv-]] and
-- [[Category:Latin third conjugation verbs with perfect in -s- or -x-]].
local perf_suffixes = {
	["-av-"] = {
		display = "{{m|la||-āv-}}",
		displaytitle = "{{m|la||-av-}}",
	},
	["-ev-"] = {
		display = "{{m|la||-ēv-}}",
		displaytitle = "{{m|la||-ev-}}",
	},
	["-iv-"] = {
		display = "{{m|la||-īv-}}",
		displaytitle = "{{m|la||-iv-}}",
	},
	["-i-"] = {
		display = "{{m|la||-i-}}",
	},
	["-u-"] = {
		display = "{{m|la||-u-}}",
	},
	["-s- or -x-"] = {
		display = "{{m|la||-s-}} or {{m|la||-x-}}",
		affix = "affixes",
	},
}
for perftype, obj in pairs(perf_suffixes) do
	local link = obj.link or obj.display
	local displaytitle = obj.displaytitle or obj.display
	local breadcrumb = obj.display
	local affix = obj.affix or "affix"
	labels["verbs with perfect in " .. perftype] = {
		description = "{{{langname}}} verbs whose perfect tense was formed using the " .. affix .. " " .. link .. ".",
		displaytitle = "{{{langname}}} verbs with perfect in " .. displaytitle,
		parents = {{name = "verbs by perfect", sort = perftype}},
		breadcrumb = breadcrumb,
	}
	for conjugation, conjnum in pairs(conjugations) do
		local conjtext, conjlink = conjtext_conjlink(conjugation)
		labels[conjtext .. " verbs with perfect in " .. perftype] = {
			description = "{{{langname}}} " .. conjlink .. " verbs whose perfect tense was formed using the " .. affix .. " " .. link .. ".",
			displaytitle = "{{{langname}}} " .. conjtext .. " verbs with perfect in " .. displaytitle,
			parents = {
				{name = conjtext .. "動詞", sort = "perfect in " .. perftype},
				{name = "verbs with perfect in " .. perftype, sort = conjnum},
			},
			breadcrumb = "perfect in " .. breadcrumb,
		}
	end
end


-- Add labels for e.g. [[Category:Latin verbs with irregular perfect]] and
-- [[Category:Latin third conjugation verbs with suffixless perfect]].
for perfvar, perfvartext in pairs({
	irregular = "irregularly",
	suffixless = "without a suffix",
}) do
	labels["verbs with " .. perfvar .. " perfect"] = {
		description = "{{{langname}}} verbs whose perfect tense was formed " .. perfvartext .. ".",
		parents = {{name = "verbs by perfect", sort = perfvar}},
		breadcrumb = perfvar,
	}
	for conjugation, conjnum in pairs(conjugations) do
		local conjtext, conjlink = conjtext_conjlink(conjugation)
		labels[conjtext .. " verbs with " .. perfvar .. " perfect"] = {
			description = "{{{langname}}} " .. conjlink .. " verbs whose perfect tense was formed " .. perfvartext .. ".",
			parents = {
				{name = conjtext .. " verbs", sort = perfvar .. " perfect"},
				{name = "verbs with " .. perfvar .. " perfect", sort = conjnum},
			},
			breadcrumb = perfvar .. " perfect",
		}
	end
end

labels["verbs without the conjugation in their headwords"] = {
	description = "{{{langname}}} verbs whose headwords are missing the conjugation.",
	parents = {"entry maintenance"},
	hidden = true,
}



-----------------------------------------------------------------------------
--                                                                         --
--                                  NOUNS                                  --
--                                                                         --
-----------------------------------------------------------------------------


local genders = {
	"陽性",
	"陰性",
	"中性",
	"詞性不明",
}

local noun_declensions = {
	["第一類"] = "1",
	["第二類"] = "2",
	["第三類"] = "3",
	["第四類"] = "4",
	["第五類"] = "5",
}

local function decltext_decllink(declension)
	local decltext = declension .. "變格"
	local decllink = "[[Appendix:拉丁語" .. decltext .. "|" .. decltext .. "]]"
	return decltext, decllink
end

for _, pos in ipairs({"名詞", "後綴"}) do
	-- Add labels for e.g. [[Category:Latin fifth declension suffixes]] and
	-- [[Category:Latin feminine nouns in the fourth declension]].
	for decl, declnum in pairs(noun_declensions) do
		local decltext, decllink = decltext_decllink(decl)
		labels[decltext .. pos] = {
			description = "屬於" .. decllink .. "的{{{langname}}}" .. pos .. "。",
			parents = {{name = "依屈折分類的" .. pos, sort = declnum}},
			breadcrumb = decltext,
		}

		for _, gender in ipairs(genders) do
			labels[decltext .. gender .. pos] = {
				description = "屬於" .. decllink .. "的{{{langname}}}" .. gender ..  pos .. " 。",
				parents = {
					{name = decltext .. pos, sort = gender},
					{name = gender .. pos, sort = declnum},
				},
				breadcrumb = gender,
			}
		end
	end

	-- Add labels for e.g. [[Category:Latin masculine indeclinable nouns]] and
	-- [[Category:Latin feminine irregular nouns]].
	for _, nounvar in ipairs({"indeclinable", "irregular"}) do
		for _, gender in ipairs(genders) do
			local decltext = nounvar
			local decllink = "{{glossary|" .. nounvar .. "}}"
			labels[gender .. " " .. decltext .. " " .. pos] = {
				description = "{{{langname}}} " .. gender .. " " .. decllink .. " " .. pos .. ".",
				parents = {
					{name = decltext .. " " .. pos, sort = gender},
					{name = gender .. " " .. pos, sort = decltext},
				},
				breadcrumb = gender,
			}
		end
	end
	
	-- Add labels for e.g. [[Category:Latin unknown gender nouns]].
	labels["unknown gender " .. pos] = {
		description = "{{{langname}}} unknown gender " .. pos .. ".",
		parents = {
			{name = "nouns by gender", sort = "unknown"},
		},
		breadcrumb = "unknown",
	}
	
	-- Add labels for e.g. [[Category:Latin nouns with a genitive singular]].
	labels[pos .. " without a genitive singular"] = {
		description = "{{{langname}}} " .. pos .. " without a genitive singular.",
		parents = {
			{name = "irregular nouns", sort = "without a genitive singular"},
		},
		breadcrumb = "without a genitive singular",
	}
end

-----------------------------------------------------------------------------
--                                                                         --
--                                ADJECTIVES                               --
--                                                                         --
-----------------------------------------------------------------------------


-- First/second declension adjectival subtypes, e.g.
-- [[Category:Latin first and second declension numerals with genitive singular in -īus]].
local subtypes_12 = {
	["nominative masculine singular in -er"] = {
		display = "nominative masculine singular in {{m|la||-er}}",
	},
	["nominative masculine singular in -ur"] = {
		display = "nominative masculine singular in {{m|la||-ur}}",
	},
	["genitive singular in -īus"] = {
		display = "genitive singular in {{m|la||-īus}}",
		link = "genitive singular in {{m|la|-īus}}",
	},
	["Greek declension"] = {
		display = "Greek declension",
	},
}

-- Add labels for e.g. [[Category:Latin first and second declension participles]],
-- [[Category:Latin first and second declension adjectives with Greek declension]] and
-- [[Category:Latin third declension determiners]].
for _, pos in ipairs({"adjectives", "numerals", "determiners", "participles", "suffixes"}) do
	local decltext = "first and second declension"
	local decllink = "[[Appendix:Latin first declension|first]] and [[Appendix:Latin second declension|second declension]]"
	labels[decltext .. " " .. pos] = {
		description = "{{{langname}}} " .. pos .. " of the " .. decllink .. ".",
		parents = {{name = "依屈折分類的" .. pos, sort = "12"}},
		breadcrumb = decltext,
	}
	for subtype, obj in pairs(subtypes_12) do 
		labels[decltext .. " " .. pos .. " with " .. subtype] = {
			description = "{{{langname}}} " .. pos .. " of the " .. decllink .. " with " .. (obj.link or obj.display) .. ".",
			displaytitle = "{{{langname}}} " .. decltext .. " " .. pos .. " with " .. obj.display,
			parents = {{name = decltext .. " " .. pos, sort = subtype}},
			breadcrumb = obj.display,
		}
	end
	local decltext3, decllink3 = decltext_decllink("third")
	labels[decltext3 .. " " .. pos] = {
		description = "{{{langname}}} " .. pos .. " of the " .. decllink3 .. ".",
		parents = {{name = "依屈折分類的" .. pos, sort = "3"}},
		breadcrumb = decltext3,
	}
	for num_terms, third_decl_subtype in ipairs({"one termination", "two terminations", "three terminations"}) do
		labels[decltext3 .. " " .. pos .. " of " .. third_decl_subtype] = {
			description = "{{{langname}}} " .. pos .. " of the " .. decllink3 .. ", with " ..
				third_decl_subtype .. " in the nominative singular.",
			parents = {{name = decltext3 .. " " .. pos, sort = num_terms}},
			breadcrumb = third_decl_subtype,
		}
	end
end

-- Add labels for [[Category:Latin first declension adjectives]], [[Category:Latin second declension adjectives]].
for decl, declnum in pairs({first = "1", second = "2"}) do
	local decltext, decllink = decltext_decllink(decl)
	labels[decltext .. "形容詞"] = {
		description = "{{{langname}}} adjectives of the " .. decllink .. " (feminine forms identical to masculine forms).",
		parents = {{name = "依屈折分類的形容詞", sort = declnum}},
		breadcrumb = decltext,
	}
end

local decltext2, decllink2 = decltext_decllink("second")
labels["second declension adjectives with Greek declension"] = {
	description = "{{{langname}}} adjectives of the " .. decllink2 .. " (feminine forms identical to masculine forms), Greek declension.",
	parents = {{name = "second declension adjectives", sort = "Greek declension"}},
	breadcrumb = "Greek declension",
}


return {LABELS = labels}