yyqdbngt opened a new pull request, #3181:
URL: https://github.com/apache/rocketmq-dashboard/pull/3181
## Summary
The K8s certificates page (cluster/certs.tsx) was the last Studio page with
no i18n wiring at all: headers, toolbar, status tags, the create modal and
every toast were hard-coded zh strings, so the page stayed Chinese in English
mode.
This PR localizes the whole page:
- Adds `useLang` and routes all visible copy through translations keys
(`certs.*` for page-specific strings, reusing `common.*`,
`cluster.k8sName`/`cluster.k8sId` and `nav.certs` where the same wording
already exists).
- Status tags (`valid`/`expiring`/`expired`) now render translated labels
via a small label-key map; type/status colors are unchanged.
- Toasts and the delete confirmation use parameterized keys (e.g.
`证书「{name}」已删除` / `Certificate "{name}" deleted`).
- The shared error fallback moved to a parameter so the page can pass the
localized `请求失败,请稍后重试` text.
## Why
The page is fully data-driven (certificate records themselves are ASCII), so
converting it gives a complete, coherent English experience for the K8s
certificates management surface.
## Testing
- `tsc --noEmit` passes
- `eslint` clean on the changed files
- `vitest run K8sCertsPage` - 7/7 tests pass
--
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]