You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "tju-yxq (via GitHub)" <gi...@apache.org> on 2026/10/04 08:41:32 UTC

[PR] fix(web): localize the instance selector's default placeholder and no-match text [rocketmq-dashboard]

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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(web): localize the instance selector's default placeholder and no-match text [rocketmq-dashboard]

Posted by "tju-yxq (via GitHub)" <gi...@apache.org>.
tju-yxq commented on PR #5562:
URL: https://github.com/apache/rocketmq-dashboard/pull/5562#issuecomment-6096610313

   Closing in favor of #5403, which was merged and already covers this PR's full scope (localizing the shared instance selector's default placeholder and no-match text). Happy to re-open a fresh PR if any part of the shared-defaults localization turns out to be missing on trunk.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] fix(web): localize the instance selector's default placeholder and no-match text [rocketmq-dashboard]

Posted by "tju-yxq (via GitHub)" <gi...@apache.org>.
tju-yxq closed pull request #5562: fix(web): localize the instance selector's default placeholder and no-match text
URL: https://github.com/apache/rocketmq-dashboard/pull/5562


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org