Pergi ke kandungan

Modul:category tree/poscatboiler/data/lang-specific/ja

Daripada Wikikamus

This module handles generating the descriptions and categorization for Jepun category pages of the format "Jepun 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 m_ja = require("Module:ja")

local kata_to_hira = m_ja.kata_to_hira
local romaji_to_kata = m_ja.romaji_to_kata

labels["godan verbs"] = {
	breadcrumb = "godan",
	description = "{{{langname}}} godan verbs, which are verbs that follow the five-grade conjugation, or {{ja-r|五%段 活%用|ご%だん かつ%よう}}; also variously known as group 1 verbs, {{lang|ja|う}}-verbs, [[u-verb]]s, [[quintigrade]] verbs, [[pentagrade]] verbs or consonant-stem verbs.",
	parents = {"verbs by inflection type"},
}

labels["ichidan verbs"] = {
	breadcrumb = "ichidan",
	description = "{{{langname}}} ichidan verbs, which are verbs that follow the one-grade conjugation, or {{ja-r|一%段 活%用|いち%だん かつ%よう}}; also variously known as group 2 verbs, {{lang|ja|る}}-verbs, [[ru-verb]]s, [[monograde]] verbs or vowel-stem verbs.",
	additional = "These are further divided into {{ja-r|上 一%段 活%用|かみ いち%だん かつ%よう|upper monograde conjugation}} verbs, with verb stems that end with ''-i'', and {{ja-r|下 一%段 活%用|しも いち%だん かつ%よう|lower monograde conjugation}} verbs, with verb stems that end with ''-e''.",
	parents = {"verbs by inflection type"},
}

labels["kami ichidan verbs"] = {
	breadcrumb = "kami",
	description = "{{{langname}}} kami ichidan verbs, which are verbs that follow the upper one-grade conjugation, or {{ja-r|上 一%段 活%用|かみ いち%だん かつ%よう}}; also known as upper [[monograde]] verbs.",
	additional = [==[These verbs have stems that end with ''-i''.
===See also===
* [[:Category:{{{langname}}} shimo ichidan verbs]]
* [[:Category:{{{langname}}} godan verbs ending with -iru]]
]==],
	parents = {"ichidan verbs"},
}

labels["kami nidan verbs"] = {
	breadcrumb = "kami",
	description = "{{{langname}}} kami nidan verbs in [[Classical Japanese]], which are verbs that follow the upper two-grade conjugation, or {{ja-r|上 二%段 活%用|かみ に%だん かつ%よう}}; also known as upper [[bigrade]] verbs.",
	additional = [==[These verbs have stems that alternate between ''-u'' and ''-i'' endings.
===See also===
* [[:Category:{{{langname}}} shimo nidan verbs]]
]==],
	parents = {"nidan verbs"},
}

labels["kuru verbs"] = {
	breadcrumb = "kuru",
	description = "{{{langname}}} kuru verbs, which includes the irregular verb {{ja-r|来る|くる|to come}} and any compound verbs which end with it.",
	parents = {"irregular verbs"},
}

labels["nidan verbs"] = {
	breadcrumb = "nidan",
	description = "{{{langname}}} nidan verbs in [[Classical Japanese]], which are verbs that follow the two-grade conjugation, or {{ja-r|二%段 活%用|に%だん かつ%よう}}; also known as [[bigrade]] verbs.",
	additional = "These are further divided into {{ja-r|上 二%段 活%用|かみ に%だん かつ%よう|upper bigrade conjugation}} verbs, with verb stems that alternate between ''-u'' and ''-i'' endings, and {{ja-r|下 二%段 活%用|しも に%だん かつ%よう|lower bigrade conjugation}} verbs, with verb stems that alternate between ''-u'' and ''-e'' endings.{{pb}}This conjugation is archaic in the modern language, and has been superseded by the [[:Category:{{{langname}}} ichidan verbs|ichidan]] conjugation.",
	parents = {"verbs by inflection type"},
}

labels["shimo ichidan verbs"] = {
	breadcrumb = "shimo",
	description = "{{{langname}}} shimo ichidan verbs, which are verbs that follow the lower one-grade conjugation, or {{ja-r|下 一%段 活%用|しも いち%だん かつ%よう}}; also known as lower [[monograde]] verbs.",
	additional = [==[These verbs have stems that end with ''-e''.
===See also===
* [[:Category:{{{langname}}} kami ichidan verbs]]
* [[:Category:{{{langname}}} godan verbs ending with -eru]]
]==],
	parents = {"ichidan verbs"},
}

labels["shimo nidan verbs"] = {
	breadcrumb = "shimo",
	description = "{{{langname}}} shimo nidan verbs in [[Classical Japanese]], which are verbs that follow the lower two-grade conjugation, or {{ja-r|下 二%段 活%用|しも に%だん かつ%よう}}; also known as lower [[bigrade]] verbs.",
	additional = [==[These verbs have stems that alternate between ''-u'' and ''-e'' endings.
===See also===
* [[:Category:{{{langname}}} kami nidan verbs]]
]==],
	parents = {"nidan verbs"},
}

labels["suru verbs"] = {
	breadcrumb = "suru",
	description = "{{{langname}}} suru verbs, which includes the irregular verb {{ja-r|する||to do}} and any compound verbs which end with it.",
	parents = {"irregular verbs"},
}

labels["yodan verbs"] = {
	breadcrumb = "yodan",
	description = "{{{langname}}} yodan verbs in [[Classical Japanese]], which are verbs that follow the four-grade conjugation, or {{ja-r|四%段 活%用|よ%だん かつ%よう}}; also known as [[quadrigrade]] verbs.",
	additional = "This conjugation is archaic in the modern language, and has been superseded by the [[:Category:{{{langname}}} godan verbs|godan]] conjugation.",
	parents = {"verbs by inflection type"},
}

labels["zuru verbs"] = {
	breadcrumb = "zuru",
	description = "{{{langname}}} zuru verbs, which includes any suru verbs that end with {{ja-r|ずる}}, the [[rendaku]] form of {{ja-r|する||to do}}.",
	parents = {"suru verbs"},
}

table.insert(handlers, function(data)
	local ending = data.label:match("^godan verbs ending with (%-.-)$")
	if not ending then
		return
	end
	local hira_ending, extra, additional, parent, confusable, other
	if ending == "-eru" then
		hira_ending = "ぇる"
		confusable = "shimo ichidan"
		other = "-iru"
	elseif ending == "-iru" then
		hira_ending = "ぃる"
		confusable = "kami ichidan"
		other = "-eru"
	else
		hira_ending = kata_to_hira(romaji_to_kata(ending))
		extra = "."
		parent = "godan verbs"
	end
	if not extra then
		extra = (", which are therefore confusable with [[:Category:{{{langname}}} %s verbs|%s verbs]]."):format(confusable, confusable)
		additional = ([==[===See also===
* [[:Category:{{{langname}}} godan verbs ending with %s]]
* [[:Category:{{{langname}}} %s verbs]]
]==]):format(ending == "-eru" and "-iru" or "-eru", confusable)
		parent = "godan verbs ending with -ru"
	end
	return {
		breadcrumb = ending,
		description = "{{{langname}}} godan verbs that end with {{ja-r|" .. hira_ending .. "|linkto=-}}" .. extra,
		additional = additional,
		parents = {parent},
	}
end)

table.insert(handlers, function(data)
	local ending = data.label:match("^yodan verbs ending with (%-.-)$")
	if not ending then
		return
	end
	return {
		breadcrumb = ending,
		description = "{{{langname}}} godan verbs that end with {{ja-r|" .. kata_to_hira(romaji_to_kata(ending)) .. "|linkto=-}}.",
		parents = {"yodan verbs"},
	}
end)

return {LABELS = labels, HANDLERS = handlers}