123123213weqw opened a new issue, #5222:
URL: https://github.com/apache/rocketmq-dashboard/issues/5222
### Before creating
- [x] I have searched the existing issues and found no duplicate.
- [x] I have checked the latest `rocketmq-studio` branch where this problem
still exists.
### Bug report
**Which page or component**
`web/src/components/InstanceSelect.tsx` — the shared instance selector
rendered at the top of every instance-scoped page (consumer, topic, dlq, acl,
message).
**What happened**
The component already calls `useLang()` (its failure branch renders
`t('instance.listLoadFailed')` correctly), but the two remaining strings bypass
it: the default `placeholder = '选择实例'` (a default parameter evaluated outside
the hook) and `notFoundContent="暂无匹配实例"`. Every English viewer sees a Chinese
placeholder on every instance page, and a Chinese empty-list hint when no
instance matches.
No caller passes a custom placeholder today (consumer.tsx, topic.tsx,
dlq.tsx, acl.tsx, message.tsx all rely on the default), so the whole surface
renders the hardcoded string.
**Steps to reproduce**
1. Switch the display language to English.
2. Open any instance page (e.g. Topic).
3. The selector placeholder reads "选择实例"; type a non-matching id and open
the dropdown — "暂无匹配实例".
**Expected behaviour**
The default placeholder resolves through `t()` (`placeholder ??
t('instanceSelect.placeholder')`, keeping explicit placeholders working) and
the empty list through `t('instanceSelect.notFound')`, with keys in the
translation table for both languages.
**Environment**
branch `rocketmq-studio`, commit `4ee173ad`.
--
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]