Module:Category tree/poscatboiler/data/lang-specific/zh: Difference between revisions

From The Languages of David J. Peterson
Jump to navigation Jump to search
(Created page with "local labels = {} local handlers = {} for _, source in ipairs { "Mencius", "the Analects", "the Book of Rites", "the Classic of Poetry", "the Han Feizi", "the I Ching", "the Zhuangzi", "the Zuo Zhuan", } do local book = source:match("^the (.*)$") local sort_key = book or source local italicized = book and "the ''" .. book .. "''" or source labels["terms derived from " .. source] = { displaytitle = book and "{{{langname}}} terms derived from " .. italicized...")
 
m (Changed links to point to Wiktionary)
Tag: Reverted
Line 25: Line 25:
displaytitle = book and "{{{langname}}} four-character idioms derived from " .. italicized or nil,
displaytitle = book and "{{{langname}}} four-character idioms derived from " .. italicized or nil,
parents = {{name = "four-character idioms", sort = sort_key}, "terms derived from " .. source},
parents = {{name = "four-character idioms", sort = sort_key}, "terms derived from " .. source},
description = "{{{langname}}} four-character idioms ([[chengyu]]) derived from " .. italicized .. ".",
description = "{{{langname}}} four-character idioms ({{wt|chengyu}}) derived from " .. italicized .. ".",
breadcrumb = "derived from " .. italicized,
breadcrumb = "derived from " .. italicized,
}
}

Revision as of 00:46, 25 August 2024

Documentation for this module may be created at Module:Category tree/poscatboiler/data/lang-specific/zh/documentation

local labels = {}
local handlers = {}

for _, source in ipairs {
	"Mencius",
	"the Analects",
	"the Book of Rites",
	"the Classic of Poetry",
	"the Han Feizi",
	"the I Ching",
	"the Zhuangzi",
	"the Zuo Zhuan",
} do
	local book = source:match("^the (.*)$")
	local sort_key = book or source
	local italicized = book and "the ''" .. book .. "''" or source
	labels["terms derived from " .. source] = {
		displaytitle = book and "{{{langname}}} terms derived from " .. italicized or nil,
		parents = {{name = "terms attributed to a specific source", sort = sort_key}},
		description = "{{{langname}}} terms derived from " .. italicized .. ".",
		breadcrumb = italicized,
	}

	labels["four-character idioms derived from " .. source] = {
		displaytitle = book and "{{{langname}}} four-character idioms derived from " .. italicized or nil,
		parents = {{name = "four-character idioms", sort = sort_key}, "terms derived from " .. source},
		description = "{{{langname}}} four-character idioms ({{wt|chengyu}}) derived from " .. italicized .. ".",
		breadcrumb = "derived from " .. italicized,
	}
end


return {LABELS = labels, HANDLERS = handlers}