mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-02 21:32:10 +03:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user