From 25f37511383e6b00ec3088dc0d484fe67ea3391f Mon Sep 17 00:00:00 2001 From: wizardchen Date: Thu, 30 Jul 2026 20:45:01 +0800 Subject: [PATCH] fix(frontend): prune i18n locales, add audit tooling, and fix UI warnings Regenerate four locale bundles from static usage analysis (6024 -> 4592 keys), align translations across locales, escape vue-i18n @ syntax, and add check-i18n plus gap-scan tooling. Also fix TDesign drawer/textarea teardown warnings and add missing tenantOthers section labels. --- frontend/package.json | 5 +- frontend/src/components/ModelDebugDrawer.vue | 8 +- .../src/components/settings/SettingDrawer.vue | 12 +- frontend/src/i18n/localeGapScan.ts | 239 + frontend/src/i18n/localeKeyAudit.test.ts | 87 + frontend/src/i18n/localeKeyAudit.ts | 666 + frontend/src/i18n/localeSerialize.ts | 40 + frontend/src/i18n/locales/en-US.ts | 3063 +--- frontend/src/i18n/locales/ko-KR.ts | 12627 +++++++--------- frontend/src/i18n/locales/ru-RU.ts | 11973 +++++++-------- frontend/src/i18n/locales/zh-CN.ts | 12599 +++++++-------- frontend/src/i18n/regeneratePrunedLocales.ts | 4 + .../src/views/knowledge/wiki/WikiBrowser.vue | 2 +- frontend/src/views/settings/Settings.vue | 10 + frontend/src/views/system/SystemSettings.vue | 2 +- 15 files changed, 18403 insertions(+), 22934 deletions(-) create mode 100644 frontend/src/i18n/localeGapScan.ts create mode 100644 frontend/src/i18n/localeKeyAudit.test.ts create mode 100644 frontend/src/i18n/localeKeyAudit.ts create mode 100644 frontend/src/i18n/localeSerialize.ts create mode 100644 frontend/src/i18n/regeneratePrunedLocales.ts diff --git a/frontend/package.json b/frontend/package.json index 97340ed2..e3666e4b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -10,7 +10,10 @@ "preview": "vite preview", "build-only": "vite build", "type-check": "vue-tsc --build", - "test": "tsx --test" + "test": "tsx --test", + "check-i18n": "tsx --test src/i18n/localeKeyAudit.test.ts", + "scan-i18n-gaps": "tsx src/i18n/localeGapScan.ts", + "regenerate-i18n-locales": "tsx src/i18n/regeneratePrunedLocales.ts" }, "dependencies": { "@microsoft/fetch-event-source": "^2.0.1", diff --git a/frontend/src/components/ModelDebugDrawer.vue b/frontend/src/components/ModelDebugDrawer.vue index 45269904..9a4e8055 100644 --- a/frontend/src/components/ModelDebugDrawer.vue +++ b/frontend/src/components/ModelDebugDrawer.vue @@ -192,7 +192,7 @@