Frun1na opened a new pull request, #4629:
URL: https://github.com/apache/rocketmq-dashboard/pull/4629
### Which Issue(s) This PR Fixes
### Brief Description
While localizing the Studio pages, five user-visible strings were still
hardcoded in Chinese on pages that otherwise use the i18n catalog, so switching
the UI to English still showed Chinese text in three places:
- `Ops.tsx`: the "runtime configuration unavailable" Alert message and
fallback description
- `BrokerCluster.tsx`: the instance `Select` aria-label and placeholder
- `AlertRuleAssets.tsx`: the page header subtitle
This PR routes them through the catalog: the BrokerCluster strings reuse the
existing `common.selectInstance` key (same Chinese text), and three new keys
are added (`ops.unavailableTitle`, `ops.unavailableDescription`,
`alertAssets.subtitle`). The Chinese output is byte-identical to before, so
nothing changes for zh users.
### How Did You Test This Change?
```
$ cd web
$ npx tsc --noEmit # exit 0
$ npx eslint src/pages/studio/Ops.tsx src/pages/studio/BrokerCluster.tsx
src/pages/studio/AlertRuleAssets.tsx src/i18n/translations.ts # exit 0
$ npx vitest run src/pages/studio/__tests__ src/i18n
Test Files 9 passed (9)
Tests 87 passed (87)
```
Also verified with `grep -P '[\p{Han}]'` that no hardcoded Chinese remains
in the three files.
### Checklist
- [x] Follows the existing i18n conventions of the surrounding code
- [x] All UI strings have both zh and en entries
- [x] `tsc`, `eslint` and the affected test suites pass locally
--
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]