zhaohai666 opened a new pull request, #433: URL: https://github.com/apache/rocketmq-dashboard/pull/433
## Summary This PR enriches i18n translation resources and provides a compatible language hook alias to facilitate component migration from `frontend-new` to the new web frontend. Branch: feature/studio-i18n-language-context Commit: 8b49561, 2 files changed, +426 lines Close #【Related Issue】 ## Changes ### 1. `LangContext.tsx` - Export `useLanguage` as a compatible alias of existing `useLang` hook - Support components migrated from `frontend-new` which reference `useLanguage` without modification ### 2. `translations.ts` Expand translation entries from 344 lines to 763 lines, adding **400+ new translation keys** covering multiple business modules. All keys adopt dot-separated namespace specification and are migrated from the uppercase underscore format used in `frontend-new`: - `login.*`: Login page (11 keys) - `ops.*`: Operations page (4 keys) - `topic.*`: Topic management (30 keys) - `group.*`: Consumer group management (40 keys) - `message.*`: Message query (25 keys) - `dlq.*`: Dead letter queue (3 keys) - `trace.*`: Message trace (5 keys) - `broker.*`: Broker details (25 keys) - `proxy.*`: Proxy cluster management (20 keys) - `ssl.*`: SSL configuration (30 keys) - `ns.*`: Namespace management (30 keys) - `alert.*`: Alert management (30 keys) - `liteTopic.*`: LiteTopic management (35 keys) - `producer.*`: Producer related (2 keys) - `common.*`: Extended general common labels (40+ keys) ## Purpose 1. Complete i18n text resource preparation for subsequent page migration from legacy `frontend-new` 2. Reduce modification cost of migrated components via `useLanguage` compatibility alias 3. Unify translation key naming standard to dot-separated namespace format for long-term maintenance ## Verification - Hook compatibility verified: both `useLang` and `useLanguage` work normally - All newly added translation keys follow unified naming convention - No duplicate or invalid key entries introduced -- 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]
