[PR #6202] [MERGED] fix(i18n): localize Chinese Xray labels #6163

Closed
opened 2026-11-02 04:06:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/6202
Author: @nrps9909
Created: 8/11/2026
Status: ✅ Merged
Merged: 8/12/2026
Merged by: @MHSanaei

Base: main ← Head: codex/localize-zh-tw-xray-labels


📝 Commits (3)

  • 3fd7530 fix(i18n): localize Traditional Chinese Xray labels
  • c4d5b06 Merge branch 'main' into codex/localize-zh-tw-xray-labels
  • 273fa88 fix(i18n): localize Simplified Chinese Xray labels

📊 Changes

2 files changed (+17 additions, -17 deletions)

View changed files

📝 internal/web/translation/zh-CN.json (+8 -8)
📝 internal/web/translation/zh-TW.json (+9 -9)

📄 Description

Summary

Localize Xray UI labels that still displayed English in the Traditional and Simplified Chinese interfaces:

  • Hosts navigation and DNS host mapping
  • outbound egress label and HTTP-test hint
  • balancer fallback, baselines, and cost settings
  • NordVPN and WARP access-token labels

The existing Simplified Chinese Hosts navigation label was already localized, so the follow-up adds the other eight corresponding zh-CN strings without changing it.

Why

These values were copied from the English locale, leaving visible English fallback text across otherwise translated Xray screens. The translations retain established protocol and product names while localizing the surrounding UI terminology.

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?

  • parsed zh-CN and zh-TW JSON and confirmed exact key parity with en-US (1,919 keys; zero missing or extra)
  • confirmed zero placeholder-token mismatches in both Chinese locales
  • npx vitest run src/test/i18n-dead-keys.test.ts (2 tests passed)
  • npm run lint
  • npm run typecheck
  • npm run build
  • git diff --check

Screenshots / recordings

Not included: this is a string-only locale update with no layout or behavior change.

Breaking changes

None.

Checklist

  • The changed strings and their UI contexts were verified locally.
  • Existing i18n contract tests cover the changed locales; no new test was needed.
  • Go build/tests are not applicable to a JSON-only locale update.
  • Frontend lint, typecheck, targeted test, and build pass.
  • Wiki / README / API documentation changes are not applicable.
  • Commits follow the repository message style and include Signed-off-by.
  • No unrelated changes are mixed into this PR.

AI assistance

Codex traced the runtime call sites, drafted the locale updates, checked key and placeholder parity, and ran the listed validation. The scope and verification results are disclosed here for maintainer review.


🔄 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/6202 **Author:** [@nrps9909](https://github.com/nrps9909) **Created:** 8/11/2026 **Status:** ✅ Merged **Merged:** 8/12/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `codex/localize-zh-tw-xray-labels` --- ### 📝 Commits (3) - [`3fd7530`](https://github.com/MHSanaei/3x-ui/commit/3fd75303cc8c0acc96d875e5f3d5286293c481e0) fix(i18n): localize Traditional Chinese Xray labels - [`c4d5b06`](https://github.com/MHSanaei/3x-ui/commit/c4d5b062673fe6efeb2a88cbf9818a59374b75cc) Merge branch 'main' into codex/localize-zh-tw-xray-labels - [`273fa88`](https://github.com/MHSanaei/3x-ui/commit/273fa8865da918cc7c1ce1230cd847f2b3855dea) fix(i18n): localize Simplified Chinese Xray labels ### 📊 Changes **2 files changed** (+17 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `internal/web/translation/zh-CN.json` (+8 -8) 📝 `internal/web/translation/zh-TW.json` (+9 -9) </details> ### 📄 Description ## Summary Localize Xray UI labels that still displayed English in the Traditional and Simplified Chinese interfaces: - Hosts navigation and DNS host mapping - outbound egress label and HTTP-test hint - balancer fallback, baselines, and cost settings - NordVPN and WARP access-token labels The existing Simplified Chinese Hosts navigation label was already localized, so the follow-up adds the other eight corresponding zh-CN strings without changing it. ## Why These values were copied from the English locale, leaving visible English fallback text across otherwise translated Xray screens. The translations retain established protocol and product names while localizing the surrounding UI terminology. ## 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? - parsed zh-CN and zh-TW JSON and confirmed exact key parity with en-US (1,919 keys; zero missing or extra) - confirmed zero placeholder-token mismatches in both Chinese locales - npx vitest run src/test/i18n-dead-keys.test.ts (2 tests passed) - npm run lint - npm run typecheck - npm run build - git diff --check ## Screenshots / recordings Not included: this is a string-only locale update with no layout or behavior change. ## Breaking changes None. ## Checklist - [x] The changed strings and their UI contexts were verified locally. - [x] Existing i18n contract tests cover the changed locales; no new test was needed. - [x] Go build/tests are not applicable to a JSON-only locale update. - [x] Frontend lint, typecheck, targeted test, and build pass. - [x] Wiki / README / API documentation changes are not applicable. - [x] Commits follow the repository message style and include Signed-off-by. - [x] No unrelated changes are mixed into this PR. ## AI assistance Codex traced the runtime call sites, drafted the locale updates, checked key and placeholder parity, and ran the listed validation. The scope and verification results are disclosed here for maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:06:48 +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#6163
No description provided.