[PR #7057] [MERGED] fix(i18n): show proper text instead of raw keys on six panel screens #6624

Closed
opened 2026-11-07 14:34:13 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • d61dfc0 fix(i18n): show proper text instead of raw keys on six panel screens
  • 61e6aa2 chore: integrate current main for PR 7057 validation
  • 729fedf Merge 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 copyFail or inbounds where a label or message belongs. They now show real text in all 14 languages.

Where Before After
Clients -> Filter -> inbounds filter inbounds Attached inbounds
Clients -> select clients -> More -> Adjust -> OK button apply Confirm
Inbounds -> Add Inbound -> TUIC -> Set Cert from Panel pages.inbounds.setSuccess Success
Settings -> Security -> API Token -> Copy, when copying fails copyFail Copy failed
Xray Configs -> Log -> Error Log and Mask Address empty Empty
Xray Configs -> Outbounds -> WARP -> save the IP update interval pages.setting.toasts.saveSuccess The parameters have been changed.

Why

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 like t('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 none is a real Error Log value.

The Adjust button gets the same apply -> confirm change 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

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

  • Built two Docker images from the repo's Dockerfile, one from main (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.
  • The new check in frontend/src/test/i18n-dead-keys.test.ts fails on main and lists exactly the six keys. It passes with this change.
  • The typecheck, lint and format:check scripts pass. The Vitest unit and components projects pass.
  • The Docker build ran npm run build and go build for this branch, and both passed.
  • Not run locally: the Go tests and the Storybook project. The only Go tests that read locale files check Telegram and Discord keys, which this PR doesn't touch.

Screenshots / recordings

Clients -> Filter:

image

Clients -> Adjust:

image

TUIC -> Set Cert from Panel:

image

Settings -> Security -> API Token -> Copy. I blocked the clipboard in the test browser to trigger the error; the token is masked.

image

Xray Configs -> Log:

image

No WARP screenshot: the interval field only appears after registering a WARP account with Cloudflare.

Breaking changes

None.

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/7057 **Author:** [@eric15342335](https://github.com/eric15342335) **Created:** 11/3/2026 **Status:** ✅ Merged **Merged:** 11/5/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/i18n-raw-keys` --- ### 📝 Commits (3) - [`d61dfc0`](https://github.com/MHSanaei/3x-ui/commit/d61dfc094b11e52d47ab47db68e720221fe002cb) fix(i18n): show proper text instead of raw keys on six panel screens - [`61e6aa2`](https://github.com/MHSanaei/3x-ui/commit/61e6aa2ab8502c1c16c235fb9397f6861e4cba11) chore: integrate current main for PR 7057 validation - [`729fedf`](https://github.com/MHSanaei/3x-ui/commit/729fedf56232a859a4b2dc9b912dfa0368bbb3da) Merge remote-tracking branch 'origin/main' into codex/review-pr-7057-20261105 ### 📊 Changes **20 files changed** (+42 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `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) </details> ### 📄 Description ## Summary Six spots in the panel showed an internal key like `copyFail` or `inbounds` where a label or message belongs. They now show real text in all 14 languages. | Where | Before | After | |---|---|---| | Clients -> Filter -> inbounds filter | `inbounds` | Attached inbounds | | Clients -> select clients -> More -> Adjust -> OK button | `apply` | Confirm | | Inbounds -> Add Inbound -> TUIC -> Set Cert from Panel | `pages.inbounds.setSuccess` | Success | | Settings -> Security -> API Token -> Copy, when copying fails | `copyFail` | Copy failed | | Xray Configs -> Log -> Error Log and Mask Address | `empty` | Empty | | Xray Configs -> Outbounds -> WARP -> save the IP update interval | `pages.setting.toasts.saveSuccess` | The parameters have been changed. | ## Why 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 like `t('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 `none` is a real Error Log value. The Adjust button gets the same `apply` -> `confirm` change 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 - [x] Bug fix - [ ] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [x] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? - Built two Docker images from the repo's `Dockerfile`, one from `main` (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. - The new check in `frontend/src/test/i18n-dead-keys.test.ts` fails on `main` and lists exactly the six keys. It passes with this change. - The `typecheck`, `lint` and `format:check` scripts pass. The Vitest unit and components projects pass. - The Docker build ran `npm run build` and `go build` for this branch, and both passed. - Not run locally: the Go tests and the Storybook project. The only Go tests that read locale files check Telegram and Discord keys, which this PR doesn't touch. ## Screenshots / recordings Clients -> Filter: <img width="1328" height="1282" alt="image" src="https://github.com/user-attachments/assets/14b893d1-7ac7-4014-ae3d-40daf8715032" /> <br> Clients -> Adjust: <img width="1628" height="1066" alt="image" src="https://github.com/user-attachments/assets/718bc9d9-df92-404b-a2eb-1e12c2fdb1c8" /> TUIC -> Set Cert from Panel: <img width="1868" height="509" alt="image" src="https://github.com/user-attachments/assets/ef4c5255-66f5-4497-824b-7bcbce6a6fa1" /> Settings -> Security -> API Token -> Copy. I blocked the clipboard in the test browser to trigger the error; the token is masked. <img width="1688" height="540" alt="image" src="https://github.com/user-attachments/assets/f792a3be-577e-4f28-a8e4-4ff962540b86" /> Xray Configs -> Log: <img width="1868" height="421" alt="image" src="https://github.com/user-attachments/assets/60451baa-4e60-40c4-8c4e-66b5779b5a21" /> No WARP screenshot: the interval field only appears after registering a WARP account with Cloudflare. ## Breaking changes None. ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [x] I added or updated tests for the new behavior (when applicable). - [ ] `go build ./...` and the test suite pass locally. - [x] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 14:34:13 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6624
No description provided.