fix(翻译bug):修复翻译超时失败!
deploy-hxtesting / build-and-deploy (push) Successful in 1m15s

This commit is contained in:
runny committed 2026-11-30 23:22:23 +08:00
1 parent 74d21cb204
commit 7d3b6804af
5 files changed
+220 -15

No files matched your search

+7
View File
@@ -141,6 +141,13 @@ func trimSpaceASCII(s string) string {
return strings.Trim(s, " \t\n\r")
}
// collapseWhitespace trims and collapses every whitespace run (including
// full-width spaces) to a single ASCII space. Used as the dedupe key so
// layout-padded variants of one term share a single translation unit.
func collapseWhitespace(s string) string {
return strings.Join(strings.Fields(s), " ")
}
// itoa is a tiny helper so this file needs no strconv import noise.
func itoa(i int) string {
if i == 0 {