[Feature]: Complete frontend i18n coverage — eliminate ~30 hardcoded strings to attract more international users
Is your feature request related to a problem?
The 3x-ui frontend already ships 13 translation files (2,071 keys each) and has i18next fully wired up. But the dashboard, log modals, sidebar, sub page and some form labels still have ~30 user-visible strings hardcoded in English (Statistic titles, table headers, protocol labels, etc.). So even with a complete zh-CN or pt-BR translation file, users of those languages still see mixed English on core screens.
This is a quick gap to close — the i18n engine is already there, just not fully used.
Describe the solution you'd like
Wrap the remaining hardcoded strings in t('key') and add corresponding keys to the translation files. Below is the full list — each entry is a direct code change, no design or architecture decisions needed.
P0 — Dashboard overview page (frontend/src/pages/index/IndexPage.tsx)
| Line | Hardcoded | Suggestion |
|---|---|---|
| 160 | 'Copied' |
use existing t('copied') |
| 312 | title="Xray" |
use existing t('pages.index.xrayStatus') |
| 319 | title="OS" |
new key 'pages.index.os' |
| 427 | title="IPv4" |
new key 'pages.index.ipv4' |
| 434 | title="IPv6" |
new key 'pages.index.ipv6' |
| 448 | title="TCP" |
new key 'pages.index.tcp' |
| 455 | title="UDP" |
new key 'pages.index.udp' |
| 527-528 | 'Download' / 'config.json' |
new keys |
| 537 | 'Copy' |
use existing t('copy') |
P1 — Log modals & sidebar
| File | Line | Hardcoded | Suggestion |
|---|---|---|---|
LogModal.tsx |
111-116 | Debug, Info, Warning, Error log levels |
new keys |
LogModal.tsx |
122 | 'SysLog' |
new key |
XrayLogModal.tsx |
27,168 | DIRECT, BLOCKED, PROXY event labels |
new keys |
XrayLogModal.tsx |
230-236 | Table headers Date From To Inbound Outbound Email |
new keys |
XrayLogModal.tsx |
187 | 'No Record...' |
new key |
AppSidebar.tsx |
184,192 | 'Sub Formats', 'DNS' sidebar labels |
new keys (...Label to avoid namespace conflict) |
P1 — Sub page & settings
| File | Line | Hardcoded | Suggestion |
|---|---|---|---|
SubPage.tsx |
195-217 | Client app names (V2RayNG, Sing-box, etc.) |
new keys |
SubPage.tsx |
316,346,376 | SUB, JSON, CLASH tag labels |
new keys |
GeneralTab.tsx |
37-38 | Gregorian (Standard), Jalalian |
new keys |
useInboundColumns.tsx |
79 | title: 'ID' |
new key 'pages.inbounds.id' |
P2 — Form labels
| File | Line | Hardcoded | Suggestion |
|---|---|---|---|
reality.tsx |
56 | label="uTLS" |
new key |
tls.tsx |
39,68,72,77 | SNI, uTLS, None, ALPN |
new keys |
FallbacksCard.tsx |
100 | prefix="SNI" |
use existing t('pages.inbounds.form.serverNameIndication') |
InboundFormModal.tsx |
~98 | protocol enum values as labels | wrap in t() |
ClientsPage.tsx |
602 | fileName: 'clients-export.json' |
new key |
TestResultPopover.tsx |
41,63 | 'failed' |
new key |
每个改动都是 s/硬编码字符串/{t('key')}/ 的模式,无副作用。
Why this matters
Chinese users are a major part of this panel's audience. The zh-CN translation file already has 2,071 keys ready — but those ~30 hardcoded strings still show in English, making the UI feel half-translated. Same for Russian, Portuguese, Persian, and all other supported languages.
Filling these gaps is the last step to make the panel feel fully localized for every language we already support.
Which parts of the panel would this affect?
- Frontend (UI / panel pages)
Before submitting
- I searched existing issues and this feature has not been requested.
- This feature request is written in English.
Source: MHSanaei/3x-ui