Frun1na opened a new pull request, #4633:
URL: https://github.com/apache/rocketmq-dashboard/pull/4633

   ## Which Issue(s) This PR Fixes
   
   Fixes #<to-be-filled>
   
   ## Brief Description
   
   The message page still carried 87 hardcoded Chinese user-facing strings, so 
switching the language to English left most of the page untranslated. This PR 
routes all of them through the i18n catalog:
   
   - 66 new `messagePage.*` keys (including a `messagePage.queryMode.*` 
subgroup), with Chinese values byte-identical to the previous hardcoded strings.
   - 12 existing keys reused 
(`common.success`/`common.failure`/`common.retry`/`common.close`/`common.actions`,
 `clients.healthStatusHealthy`/`clients.healthStatusWarning`, 
`topic.messageBody`, `topic.consumerGroup`, `message.detail`, `message.title`, 
`common.detail`).
   - Module-level constants that carried Chinese labels (`QUERY_OPTIONS`, 
`DELIVERY_STATUS_MAP`, status text maps, default error strings) were converted 
to key-based lookups so labels follow the active language; interpolation 
placeholders (`{total}`, `{title}`, `{duration}` …) replace the previous string 
concatenation.
   
   No behavior change: default-language (Chinese) rendering is identical to 
before.
   
   ## How Did You Test This Change?
   
   ```
   $ cd web && npx tsc --noEmit          # exit 0
   $ npx eslint src/pages/instance/message.tsx src/i18n/translations.ts   # 
exit 0
   $ npx vitest run MessagePage.test.tsx MessagePageAsyncState.test.tsx
    Test Files  2 passed (2)
         Tests  32 passed (32)
   $ grep -nP '[\p{Han}]' src/pages/instance/message.tsx
   735:      // 唯一可伸展列:容器比表宽时余量集中在此,其余列保持声明宽度   ← code comment only
   ```
   
   ## Checklist
   
   - [x] Followed the style guide and code conventions
   - [x] Added tests that prove the fix / covered by the existing MessagePage 
suites (both already wrap `LangProvider`, untouched by this PR)
   - [x] No new warnings from `npm run lint`
   


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