From 7436d6b646ce4df61adb9d266952836c9436ae05 Mon Sep 17 00:00:00 2001 From: Duc Nguyen Date: Tue, 10 Mar 2026 09:50:52 +0700 Subject: [PATCH] fix(i18n): add missing config.json locale files (#108) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(i18n): add missing config.json locale files The config namespace was registered in i18n/index.ts but the actual JSON files were never created, breaking the UI Docker build (tsc error). Also fix .gitignore: config.json → /config.json so only the root gateway config is ignored, not the i18n locale files. Closes #107 * feat(ui): replace language cycle button with dropdown select Users can now pick a language directly from a dropdown instead of cycling through all options on each click. * fix(i18n): keep "Subagent" in Vietnamese translations "Agent con" and "sinh sản" sound unnatural; keep the English term. * chore: align .dockerignore config.json pattern with .gitignore --- .dockerignore | 2 +- .gitignore | 2 +- ui/web/src/components/layout/topbar.tsx | 26 +-- ui/web/src/i18n/locales/en/config.json | 270 ++++++++++++++++++++++++ ui/web/src/i18n/locales/vi/config.json | 270 ++++++++++++++++++++++++ ui/web/src/i18n/locales/zh/config.json | 270 ++++++++++++++++++++++++ 6 files changed, 826 insertions(+), 14 deletions(-) create mode 100644 ui/web/src/i18n/locales/en/config.json create mode 100644 ui/web/src/i18n/locales/vi/config.json create mode 100644 ui/web/src/i18n/locales/zh/config.json diff --git a/.dockerignore b/.dockerignore index c4e78139..ce047d29 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,7 +5,7 @@ *.md docs/ tests/ -config.json +/config.json openclaw-go *.exe tmp/ diff --git a/.gitignore b/.gitignore index 51e71237..600a2d60 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,7 @@ app browser-poc openclaw-go goclaw -config.json +/config.json prompt.md *.bk.* diff --git a/ui/web/src/components/layout/topbar.tsx b/ui/web/src/components/layout/topbar.tsx index d2117bd8..f4b654c7 100644 --- a/ui/web/src/components/layout/topbar.tsx +++ b/ui/web/src/components/layout/topbar.tsx @@ -28,10 +28,8 @@ export function Topbar() { ? () => setMobileSidebarOpen(true) : toggleSidebar; - const cycleLanguage = () => { - const idx = SUPPORTED_LANGUAGES.indexOf(language); - const next = SUPPORTED_LANGUAGES[(idx + 1) % SUPPORTED_LANGUAGES.length] as Language; - setLanguage(next); + const handleLanguageChange = (e: React.ChangeEvent) => { + setLanguage(e.target.value as Language); }; return ( @@ -68,14 +66,18 @@ export function Topbar() { )} - +
+ + +