tju-yxq opened a new pull request, #5560:
URL: https://github.com/apache/rocketmq-dashboard/pull/5560
### Which Issue(s) This PR Fixes
- Fixes #5559
### Brief Description
Localizes the queue browser (`components/QueueBrowser.tsx`), the last
unlocalized shared component:
- `useQueueBrowser`, `QueueBrowserControls`, and `QueueBrowserResults` each
take `t` from `useLang()`; the hook's `loadQueues` callback adds `t` to its
dependency list.
- All user-facing strings go through a new `queueBrowser.*` section (13
keys): controls, both empty states, the queue table's columns and `查看` button,
the queue summary, the detail pane's labels and no-message notice, and the two
toast fallbacks.
- The slider tooltip (`offset: N`) — previously English-only — now follows
the display language too.
- 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 vitest run src/components/__tests__/QueueBrowser.test.tsx
Test Files 1 passed (1)
Tests 7 passed (7)
cd web && npx eslint src/components/QueueBrowser.tsx src/i18n/translations.ts
0 errors (1 pre-existing warning)
cd web && npx tsc --noEmit
(no output — exit 0)
```
The message page's suites assert on none of the converted strings (verified
by search), so no other test surface is affected.
### Checklist
- [x] One coherent change; unrelated modifications are not bundled in
(single component localization)
- [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 QueueBrowser suite covers the component)
- [x] New UI text has both Chinese and English entries under `web/src/i18n/`
(this PR is exactly that — 13 `queueBrowser.*` 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]