yyqdbngt opened a new pull request, #3183:
URL: https://github.com/apache/rocketmq-dashboard/pull/3183
## Summary
The Studio user management page (studio/UserManagement.tsx) had no i18n
wiring at all: headers, table, filters, toasts and both modals were hard-coded
zh, so the page stayed Chinese in English mode.
This PR localizes the whole page:
- Adds `useLang` and routes all visible copy through translation keys
(`users.*` for page-specific strings, reusing `common.status`, `common.actions`
and `common.total`).
- Role/status tags, the role/status filter selects and the create-modal
switch all share the same `users.roleAdmin` / `users.roleReader` /
`users.enabled` / `users.disabled` labels.
- Toasts and the reset-password modal title use parameterized keys (e.g. `重置
{name} 的密码`).
- The pagination total follows the repo pattern used on the clients page:
`t("common.total") + count + t("users.unit")`, so it also renders correctly
when the page is used outside a language provider.
- CSV export headers stay ASCII (unchanged).
## Why
The page manages accounts, sessions and passwords - feedback and labels
there must be readable in the active language.
## Testing
- `tsc --noEmit` passes
- `eslint` clean on the changed files
- `vitest run UserManagement` - 4/4 tests pass (the existing suite renders
without a language provider, which is why the total is composed rather than
parameterized)
--
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]