mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[PR #7057] [MERGED] fix(i18n): show proper text instead of raw keys on six panel screens #6624
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#6624
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MHSanaei/3x-ui/pull/7057
Author: @eric15342335
Created: 11/3/2026
Status: ✅ Merged
Merged: 11/5/2026
Merged by: @MHSanaei
Base:
main← Head:fix/i18n-raw-keys📝 Commits (3)
d61dfc0fix(i18n): show proper text instead of raw keys on six panel screens61e6aa2chore: integrate current main for PR 7057 validation729fedfMerge remote-tracking branch 'origin/main' into codex/review-pr-7057-20261105📊 Changes
20 files changed (+42 additions, -13 deletions)
View changed files
📝
frontend/src/pages/clients/ClientBulkAdjustModal.tsx(+1 -1)📝
frontend/src/pages/clients/FilterDrawer.tsx(+2 -2)📝
frontend/src/pages/inbounds/form/protocols/tuic.tsx(+1 -1)📝
frontend/src/pages/settings/SecurityTab.tsx(+1 -1)📝
frontend/src/pages/xray/overrides/WarpModal.tsx(+1 -1)📝
frontend/src/test/i18n-dead-keys.test.ts(+8 -7)📝
internal/web/translation/ar-EG.json(+2 -0)📝
internal/web/translation/en-US.json(+2 -0)📝
internal/web/translation/es-ES.json(+2 -0)📝
internal/web/translation/fa-IR.json(+2 -0)📝
internal/web/translation/id-ID.json(+2 -0)📝
internal/web/translation/ja-JP.json(+2 -0)📝
internal/web/translation/pt-BR.json(+2 -0)📝
internal/web/translation/ru-RU.json(+2 -0)📝
internal/web/translation/sk-SK.json(+2 -0)📝
internal/web/translation/tr-TR.json(+2 -0)📝
internal/web/translation/uk-UA.json(+2 -0)📝
internal/web/translation/vi-VN.json(+2 -0)📝
internal/web/translation/zh-CN.json(+2 -0)📝
internal/web/translation/zh-TW.json(+2 -0)📄 Description
Summary
Six spots in the panel showed an internal key like
copyFailorinboundswhere a label or message belongs. They now show real text in all 14 languages.inboundsapplypages.inbounds.setSuccesscopyFailemptypages.setting.toasts.saveSuccessWhy
None of these keys exist in
en-US.json. When a key is missing, i18next shows the key itself, so users saw it in every language. Some call sites had fallbacks liket('copyFail') ?? 'Copy failed', but those never ran: i18next returns the key, which is never empty.Four screens now reuse existing strings that mean the same thing. "Copy failed" and "Empty" are new strings, added to all 14 locales. "Empty" is kept separate from "None" because
noneis a real Error Log value.The Adjust button gets the same
apply->confirmchange as #6948, so the two PRs merge cleanly in either order.To stop this from coming back, the i18n key test now fails when a
t('...')call names a key that isn't an English string. That covers missing keys and keys that point at a group. It replaces the group-only check added in #6960.Type of change
Areas affected
How was this tested?
Dockerfile, one frommain(83ea59fb) and one from this branch, and ran them side by side. Then walked through each screen in Chromium. The screenshots below come from those runs.frontend/src/test/i18n-dead-keys.test.tsfails onmainand lists exactly the six keys. It passes with this change.typecheck,lintandformat:checkscripts pass. The Vitest unit and components projects pass.npm run buildandgo buildfor this branch, and both passed.Screenshots / recordings
Clients -> Filter:
Clients -> Adjust:
TUIC -> Set Cert from Panel:
Settings -> Security -> API Token -> Copy. I blocked the clipboard in the test browser to trigger the error; the token is masked.
Xray Configs -> Log:
No WARP screenshot: the interval field only appears after registering a WARP account with Cloudflare.
Breaking changes
None.
Checklist
go build ./...and the test suite pass locally.npm run lint,npm run typecheck, andnpm run buildpass.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.