yyqdbngt opened a new pull request, #2974: URL: https://github.com/apache/rocketmq-dashboard/pull/2974
## Summary Localize the K8s certificate management page (`cluster/certs.tsx`) so the English UI no longer shows hard-coded Chinese: - Wire `useLang()` into the page and replace ~25 hard-coded strings with `t()` calls (page title, table columns, status tags, delete confirmation, form labels/rules/placeholders, info banner, messages) - Reuse the previously unused `cert.*` translation keys that already existed in `translations.ts` (`cert.clusterName`, `cert.expiryTime`, `cert.daysRemaining`, `cert.statusValid/Expiring/Expired`, `cert.issuer`, `cert.totalCount`, ...) - Align four of those dormant keys' texts with the current page copy (`cert.searchPlaceholder` now says "k8s ID", `cert.deleteConfirm`/`cert.deleted` use the page's 「」 quoting, `cert.addCert` is the "新增证书" button text) - Add 20 new `cert.*` keys for strings without an existing translation ## Why The page renders all-Chinese in the English UI (column headers, confirm dialogs, form hints). The dormant `cert.*` keys showed a half-finished localization effort that was never wired to this page; this PR connects them and completes the coverage. ## Testing - `vitest run src/pages/cluster/__tests__/K8sCertsPage.test.tsx` → 8/8 passed (7 existing + 1 new "renders English labels inside the language provider" that switches to `en` via a mocked `getInitialLanguage` and asserts the English page title, "Add Certificate" button and localized column headers) - `tsc --noEmit` → clean - `eslint` on changed files → 0 errors (1 pre-existing-pattern `exhaustive-deps` warning on the mount-once effect, same as other localized pages) -- 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]
