From cf5767acd1cf1ae0d16fc4081ccb78092397c7cd Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 10 May 2026 11:55:37 +0200 Subject: [PATCH] i18n: localize sidebar theme toggle, xray-status badge, and nodes menu The sidebar theme submenu (Theme / Dark / Ultra dark) and the dashboard's Xray status badge ("Xray is running" etc.) were hardcoded English strings. Wire them through vue-i18n: ThemeSwitch.vue uses menu.theme/dark/ultraDark, and XrayStatusCard.vue derives the badge text from the existing pages.index.xrayStatus{Running,Stop,Error,Unknown} keys (status.js no longer carries an English stateMsg field). The "Nodes" menu item was already keyed as menu.nodes but only en-US and fa-IR had a translation; add it to the other 11 languages, matching the wording each file already uses for pages.nodes.title. #4201 --- frontend/src/components/ThemeSwitch.vue | 9 ++++++--- frontend/src/models/status.js | 9 +-------- frontend/src/pages/index/XrayStatusCard.vue | 21 ++++++++++++++------- web/translation/ar-EG.json | 1 + web/translation/es-ES.json | 1 + web/translation/id-ID.json | 1 + web/translation/ja-JP.json | 1 + web/translation/pt-BR.json | 1 + web/translation/ru-RU.json | 1 + web/translation/tr-TR.json | 1 + web/translation/uk-UA.json | 1 + web/translation/vi-VN.json | 1 + web/translation/zh-CN.json | 1 + web/translation/zh-TW.json | 1 + web/web.go | 3 +-- 15 files changed, 33 insertions(+), 20 deletions(-) diff --git a/frontend/src/components/ThemeSwitch.vue b/frontend/src/components/ThemeSwitch.vue index 12ed574d..0c9edbfd 100644 --- a/frontend/src/components/ThemeSwitch.vue +++ b/frontend/src/components/ThemeSwitch.vue @@ -1,8 +1,11 @@