Frun1na opened a new pull request, #4635:
URL: https://github.com/apache/rocketmq-dashboard/pull/4635

   ## Which Issue(s) This PR Fixes
   
   Fixes #<to-be-filled>
   
   ## Brief Description
   
   A final sweep for hardcoded Chinese user-facing strings found a small batch 
that survived the earlier localization PRs. This PR routes them through the 
i18n catalog:
   
   - `layouts/MainLayout.tsx`: logout-failure hint, the `用户管理` menu entry and 
breadcrumb, the command-palette empty state, and the ↑/↓/↵/ESC keyboard hints 
(new keys `nav.users`, `layout.logoutFailedHint`, `layout.noMatchingPage`, 
`layout.kbdNavigate`, `layout.kbdOpen`; `common.close` reused).
   - `pages/settings/AboutTab.tsx`: all Descriptions labels and the 
related-links section (new keys `about.buildCommit`, `about.buildTime`, 
`about.supportedVersions`, `about.frontend`, `about.backend`, 
`about.relatedLinks`; `common.version`, `home.docs`, `home.community` reused). 
The component now calls `useLang()` so labels follow the active language.
   - `pages/home/dashboard.tsx`: the load-failure alert and its retry button 
(new keys `dashboard.loadFailed`, `dashboard.loadFailedDescription`; 
`common.retry` reused).
   - `components/InstanceSelect.tsx`: placeholder and "no matching instances" 
empty content (new key `common.noMatchingInstances`; `common.selectInstance` 
reused).
   
   Chinese values are byte-identical to the previous hardcoded strings, so the 
default-language rendering is unchanged. The intentional language toggle (`En` 
/ `中`) and code comments are left untouched.
   
   ## How Did You Test This Change?
   
   ```
   $ cd web && npx tsc --noEmit          # exit 0
   $ npx eslint src/layouts/MainLayout.tsx src/components/InstanceSelect.tsx \
       src/pages/settings/AboutTab.tsx src/pages/home/dashboard.tsx \
       src/i18n/translations.ts          # exit 0
   $ npx vitest run MainLayout AboutTab dashboard
    Test Files  7 passed (7)
         Tests  34 passed (34)
   $ npx vitest run QueueBrowser         # InstanceSelect consumer
    Test Files  1 passed (1)
         Tests  9 passed (9)
   $ grep -nP '[\p{Han}]' <changed files>   # only code comments and the 
intentional En/中 toggle remain
   ```
   
   ## Checklist
   
   - [x] Followed the style guide and code conventions
   - [x] Covered by existing component tests (all wrap `LangProvider` where 
needed); no test changes required
   - [x] No new warnings from `npm run lint`
   


-- 
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]

Reply via email to