tju-yxq opened a new pull request, #5533:
URL: https://github.com/apache/rocketmq-dashboard/pull/5533

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5531
   - Supersedes #5508 (its ten error-message conversions are included here; see 
the issue for why one complete change replaces two partial ones)
   
   ### Brief Description
   
   Localizes the topic page's remaining ~150 hardcoded Chinese strings and adds 
the corresponding `topic.*` keys (zh text unchanged, new English translations) 
to `translations.ts`:
   
   - **Instance banner**: `当前实例`/`接入模式`/`厂商`/`接入点` labels, vendor names, and 
the four per-access-mode endpoint explanations
   - **Main table & toolbar**: column titles, action buttons, type filter 
options, batch-delete confirmation, import/export/sync buttons, pagination total
   - **Detail modal**: section headers, description labels, route diagnostics 
chrome (metric cards, summaries, severity tags)
   - **Create/edit modal**: type cards with descriptions, perm radios, queue 
hints, name validation, remark placeholder
   - **Send modal**: labels/placeholders, quick-fill generator buttons, 
custom-property editor, the entire pre-send check panel
   - **Import modal** and **sync modal**: full coverage
   - **Module constants** (`INSTANCE_ACCESS_*`, `TYPE_OPTIONS`, 
`TOPIC_TYPE_CARDS`, `PERM_LABEL`, `RANDOM_BODY_GENERATORS`, 
route-status/precheck meta) now hold keys; render sites call `t()`
   - Includes the ten error toasts from #5508 (`topic.listLoadFailed` etc.)
   
   Out of scope (tracked separately): route diagnostics issue 
titles/descriptions and `statusText` come from 
`utils/topicRouteDiagnostics.ts`, which returns Chinese strings directly; the 
random quick-fill JSON sample content is data, not UI.
   
   The zh text is byte-identical to what was hardcoded, so Chinese-locale users 
see no change.
   
   ### How Did You Test This Change?
   
   `cd web && npx tsc --noEmit` — clean. `npx eslint 
src/pages/instance/topic.tsx src/i18n/translations.ts` — 0 errors.
   
   `npx vitest run src/pages/instance/__tests__/TopicPage.test.tsx` — 33/34 
pass; the single failure (`clears selected topics when the search scope 
changes`, a 20s-timeout on a machine whose test-file import alone took 72s 
under load) passes standalone in 6.7s on the same branch. Key audit: all 194 
`topic.*` keys referenced by the page exist; no duplicate keys in 
`translations.ts`.
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in 
(single page localization, consolidating #5508 per the grouping guideline #2107)
   - [x] Commit subject follows Conventional Commits
   - [ ] Tests added or updated for non-trivial changes, test methods named 
`...Test` (display-string replacement only — the zh text is byte-identical; the 
existing TopicPage suite covers the page)
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(this PR is exactly that — ~150 `topic.*` keys)
   - [x] Architecture constraints stay green (no Java changes)
   - [x] New source files carry the ASF license header (no new source files)
   - [ ] Documentation touched where behaviour changed (display strings only)
   


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