tju-yxq opened a new issue, #5392:
URL: https://github.com/apache/rocketmq-dashboard/issues/5392

   ## Problem
   
   The producer connection page is fully localized — except for seven strings 
that render hardcoded English regardless of the display language. In the 
Chinese UI the query form shows `INSTANCE` / `TOPIC` / `PRODUCER GROUP` labels 
and a `Select instance` placeholder next to a translated topic placeholder (请选择 
Topic), the result table's first column header reads `Client ID`, and 
submitting a query without an instance shows an English error toast. The 
mixed-language form is the first thing an operator sees on the page.
   
   This is the same bug class the repo has been fixing page by page (#4622 user 
management, #4630/#4634/#4636 and the current #5219-#5226 family); the producer 
page was missed.
   
   ## What did you do (steps to reproduce)?
   
   1. Switch the console to Chinese (default).
   2. Open **Producer Connection**.
   3. The query form labels read INSTANCE / TOPIC / PRODUCER GROUP; the 
instance selector shows "Select instance".
   4. Run any query: the result table's first column header reads Client ID.
   5. (Error path) with no instances configured, submit the form: the toast is 
in English — "Select an instance before querying producer connections." — while 
every other message on the page (topic fetch failure, connection failure, no 
connections) is translated.
   
   Code facts — `web/src/pages/studio/Producer.tsx`:
   - Line 214: `message.error('Select an instance before querying producer 
connections.');` — the only unlocalized toast in the file.
   - Lines 339/353/366: `label="INSTANCE"`, `label="TOPIC"`, `label="PRODUCER 
GROUP"` — while line 359 uses `t('producer.selectTopic')` for the topic 
placeholder in the same form.
   - Line 344: `placeholder="Select instance"`.
   - Lines 254/256: the `Client ID` and `Producer Group` column titles — while 
the sibling columns (lines 263, 269, 275) use `t('common.address')`, 
`t('producer.language')`, `t('brokerCluster.version')`.
   
   None of these strings have a defined key in `web/src/i18n/translations.ts` — 
they were simply never routed through it.
   
   ## What did you expect to see?
   
   Every user-visible string on the page follows the display language, like the 
rest of the producer page and the sibling pages.
   
   ## What did you see instead?
   
   Seven hardcoded English strings in the Chinese UI, including two in the same 
form row as translated ones.
   
   ## Root cause
   
   The page's localization pass covered the messages, statistics and warning 
tags but missed the form labels, the instance placeholder, two column titles 
and one error toast. The `producer.*` key family in `translations.ts` (27 keys) 
has no entries for any of the seven strings.
   
   ## Expected behavior
   
   - The three form labels, the instance placeholder, both column titles and 
the select-instance error render through `t()` with new `producer.*` keys 
carrying zh and en entries.
   - No other behavior changes.
   
   ## Acceptance criteria
   
   - [ ] In the Chinese UI the form reads 实例 / Topic / 生产者组, the placeholder 
reads 请选择实例, and the column header reads 客户端 ID.
   - [ ] In the English UI the same strings read Instance / Topic / Producer 
Group, Select instance, Client ID.
   - [ ] The select-instance error toast follows the display language.
   - [ ] All previously localized strings on the page are unchanged.
   
   ## Environment
   
   Branch `rocketmq-studio` at `6a68042f`; files: 
`web/src/pages/studio/Producer.tsx`, `web/src/i18n/translations.ts`.
   
   ## Duplicate check
   
   Searched open and closed issues for `producer page English`, `hardcoded`, 
and reviewed the open localization family (#5219-#5228): they cover the home 
dashboard, consumer page, LiteTopic, audit page, instance selector, About tab, 
Queue Browser and message timestamps — none mentions the producer page.
   


-- 
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]

Reply via email to