chore: Add built-in internationalization to button dropdown filtering - #4884
Open
avinashbot wants to merge 1 commit into
Open
chore: Add built-in internationalization to button dropdown filtering#4884avinashbot wants to merge 1 commit into
avinashbot wants to merge 1 commit into
Conversation
avinashbot
marked this pull request as ready for review
August 7, 2026 16:06
avinashbot
requested review from
cansuaa
and removed request for
a team and
cansuaa
August 7, 2026 16:06
Contributor
There was a problem hiding this comment.
Pull request overview
Adds internal i18n support for ButtonDropdown filtering-related strings by wiring the component to useInternalI18n and introducing new message keys across the supported locales.
Changes:
- Introduces new
button-dropdownmessage keys (filteringResultsText,noMatch, andi18nStrings.filteringItemAriaDescription) across locale catalogs. - Updates ButtonDropdown to resolve
filteringResultsTextandfilteringItemAriaDescriptionvia the internal i18n hook. - Adds unit tests validating i18n-provider fallback vs prop override behavior for the new strings.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/i18n/messages/all.en.json | Adds button-dropdown i18n strings (EN). |
| src/i18n/messages/all.en-GB.json | Adds button-dropdown i18n strings (EN-GB). |
| src/i18n/messages/all.de.json | Adds button-dropdown i18n strings (DE). |
| src/i18n/messages/all.es.json | Adds button-dropdown i18n strings (ES). |
| src/i18n/messages/all.fr.json | Adds button-dropdown i18n strings (FR). |
| src/i18n/messages/all.it.json | Adds button-dropdown i18n strings (IT). |
| src/i18n/messages/all.pt-BR.json | Adds button-dropdown i18n strings (PT-BR). |
| src/i18n/messages/all.tr.json | Adds button-dropdown i18n strings (TR). |
| src/i18n/messages/all.id.json | Adds button-dropdown i18n strings (ID). |
| src/i18n/messages/all.ko.json | Adds button-dropdown i18n strings (KO). |
| src/i18n/messages/all.ja.json | Adds button-dropdown i18n strings (JA). |
| src/i18n/messages/all.zh-CN.json | Adds button-dropdown i18n strings (ZH-CN). |
| src/i18n/messages/all.zh-TW.json | Adds button-dropdown i18n strings (ZH-TW). |
| src/i18n/messages/all.ar.json | Adds button-dropdown i18n strings (AR). |
| src/i18n/messages-types.ts | Adds button-dropdown namespace typing for new message keys/format args. |
| src/button-dropdown/index.tsx | Resolves filtering strings through useInternalI18n. |
| src/button-dropdown/tests/button-dropdown-i18n.test.tsx | Adds tests for i18n-provider fallback and prop precedence. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| filteringResultsText, | ||
| format => (matchesCount, totalCount) => format({ matchesCount, totalCount }) | ||
| )} | ||
| noMatch={noMatch} |
| "i18nStrings.externalIconAriaLabel": "在新索引標籤中開啟" | ||
| }, | ||
| "button-dropdown": { | ||
| "filteringResultsText": "{matchesCount} 個項目 (共 {totalCount} 個)", |
| "i18nStrings.externalIconAriaLabel": "新しいタブで開く" | ||
| }, | ||
| "button-dropdown": { | ||
| "filteringResultsText": "{totalCount} 件のうち {matchesCount} 件の商品", |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4884 +/- ##
=======================================
Coverage 97.64% 97.64%
=======================================
Files 958 958
Lines 31238 31241 +3
Branches 11530 11530
=======================================
+ Hits 30501 30504 +3
- Misses 690 730 +40
+ Partials 47 7 -40 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The translations were around for a while, just forgot to integrate it into the components.
Related links, issue #, if available: n/a
How has this been tested?
Unit tests.
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.