tju-yxq opened a new issue, #5580:
URL: https://github.com/apache/rocketmq-dashboard/issues/5580
## Problem
The home page (`pages/home/index.tsx`) is mostly localized but carries four
leftover inline language branches and one pure-Chinese string, bypassing the
`home.*` section that already exists in `translations.ts`:
1. The greeting suffix is an inline ternary: `{lang === 'zh' ? ',欢迎' : ',
welcome'}`.
2. The AI composer's placeholder duplicates the **existing**
`home.placeholder` key as an inline ternary — and the inline English (`Ask
RocketMQ Bot — encrypted, secure, trusted`) has already drifted from the key's
English (`Ask RocketMQ Bot, fully encrypted, secure, trusted`), which is
exactly how parallel copies rot.
3. The voice-input button's tooltip is an inline ternary (`语音输入(暂未支持)` /
`Voice input (not supported yet)`) — note this is a different string from the
existing `home.voiceNotSupported` key used by the click handler's info message,
so it needs its own key.
4. The footer's build line renders **Chinese only** with no English branch
at all: `当前版本 {__BUILD_TIME__} build({__BUILD_COMMIT__})` — an English-locale
user sees a mixed-language footer.
There is also a half-ternary — `{lang === 'zh' ? t('home.welcomeTo') :
'to'}` — where the `t()` call already resolves English, making the branch
redundant.
## Expected Behavior
All five sites resolve through `t()`: three new keys (`home.welcomeSuffix`,
`home.voiceInputTitle`, `home.buildVersion` with `{time}`/`{commit}`
placeholders), the placeholder adopts the existing `home.placeholder` key, and
the half-ternary collapses to `{t('home.welcomeTo')}`. The Chinese render is
byte-identical everywhere.
## Notes
- The English placeholder wording changes from the drifted inline copy back
to the key's text (`fully encrypted`), unifying the two copies.
- The build line gains an English rendering (`Version {time}
build({commit})`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]