Skip to content

chore: Add built-in internationalization to button dropdown filtering - #4884

Open
avinashbot wants to merge 1 commit into
mainfrom
button-dropdown-i18n
Open

chore: Add built-in internationalization to button dropdown filtering#4884
avinashbot wants to merge 1 commit into
mainfrom
button-dropdown-i18n

Conversation

@avinashbot

@avinashbot avinashbot commented Aug 7, 2026

Copy link
Copy Markdown
Member

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

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-dropdown message keys (filteringResultsText, noMatch, and i18nStrings.filteringItemAriaDescription) across locale catalogs.
  • Updates ButtonDropdown to resolve filteringResultsText and filteringItemAriaDescription via 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

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.64%. Comparing base (523ea64) to head (59b930d).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants