tju-yxq opened a new pull request, #5562:
URL: https://github.com/apache/rocketmq-dashboard/pull/5562

   ### Which Issue(s) This PR Fixes
   
   - Fixes #5561
   
   ### Brief Description
   
   Routes the instance selector's two hardcoded strings through the i18n layer 
it already uses for its failed-state text:
   
   - The default placeholder (`选择实例`) becomes 
`t('instance.selectPlaceholder')`, resolved when no explicit placeholder is 
passed — the prop default moves from the destructuring signature to the render 
site because `t` is only available inside the component.
   - The no-match content (`暂无匹配实例`) becomes `t('instance.noMatchInstance')`.
   - Two new `instance.*` keys; the zh text is byte-identical to what was 
hardcoded.
   
   `ResultEmpty.tsx` (flagged alongside) has no importers — dead code — and is 
deliberately not touched.
   
   ### How Did You Test This Change?
   
   ```
   cd web && npx eslint src/components/InstanceSelect.tsx 
src/i18n/translations.ts
   (no output — 0 errors, 0 warnings)
   
   cd web && npx tsc --noEmit
   (no output — exit 0)
   
   cd web && npx vitest run src/pages/ops/__tests__/AuditPage.test.tsx
    Tests  11 passed (11)   # spot-check of a consumer page; the zh render is 
byte-identical
   ```
   
   ### Checklist
   
   - [x] One coherent change; unrelated modifications are not bundled in 
(shared-component i18n defaults)
   - [x] Commit subject follows Conventional Commits
   - [ ] Tests added or updated for non-trivial changes, test methods named 
`...Test` (display-string replacement only — the zh text is byte-identical, so 
the default-locale render is unchanged)
   - [x] New UI text has both Chinese and English entries under `web/src/i18n/` 
(two new `instance.*` keys)
   - [x] Architecture constraints stay green (no Java changes)
   - [x] New source files carry the ASF license header (no new source files)
   - [ ] Documentation touched where behaviour changed (display strings only)
   


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