i18n(zh-CN): translate CHANGELOG entries and section headings (#6043)

Adopt zh-CN as a translated locale: translate CHANGELOG + supporting docs. Integrated into release/v3.8.44.
This commit is contained in:
Devin
2026-07-04 10:57:35 +08:00
committed by GitHub
parent 926b08aa80
commit e42e55426e
27 changed files with 14004 additions and 9770 deletions

View File

@@ -177,12 +177,15 @@ function checkI18nChangelogFile(sourcePath) {
continue;
}
// Verify body size is within 25% tolerance of source (translations may
// expand or shrink, but drastic size differences indicate stale content)
const sizeDiff = Math.abs(normalizedBody.length - sourceBody.length) / sourceBody.length;
// Verify body line count is within 25% tolerance of source (translations
// should preserve structure — drastic line-count differences indicate
// stale or missing content)
const sourceLines = sourceBody.split("\n").length;
const targetLines = normalizedBody.split("\n").length;
const sizeDiff = Math.abs(targetLines - sourceLines) / sourceLines;
if (sizeDiff > 0.25) {
fail(
`docs/i18n/${locale}/${fileName} body size differs by ${(sizeDiff * 100).toFixed(0)}% from root (expected within 25%)`
`docs/i18n/${locale}/${fileName} body line count differs by ${(sizeDiff * 100).toFixed(0)}% from root (expected within 25%)`
);
continue;
}