模組:Category tree/poscatboiler/data/lang-specific/zh
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 = {}
for _, source in ipairs {
"孟子",
"論語",
"禮記",
"詩經",
"韓非子",
"易經",
"莊子",
"左傳",
} do
local book = source:match("^(.*)$")
local sort_key = book or source
local italicized = book or source
labels["來自《" .. source .. "》的詞"] = {
displaytitle = "來自《" .. italicized .. "》的{{{langname}}}詞",
parents = {{name = "依出處分類的詞", sort = sort_key}},
description = "來自《" .. italicized .. "》的{{{langname}}}詞。",
breadcrumb = italicized,
}
labels["來自《" .. source .. "》的成語"] = {
displaytitle = "來自《" .. italicized .. "》的{{{langname}}}成語",
parents = {{name = "成語", sort = sort_key}, "來自《" .. source .. "》的詞"},
description = "來自《" .. italicized .. "》的{{{langname}}}成語。",
breadcrumb = "來自《" .. italicized .. "》",
}
end
return {LABELS = labels, HANDLERS = handlers}