Skip to content

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

Merged
avinashbot merged 2 commits into
mainfrom
button-dropdown-i18n
Aug 13, 2026
Merged

chore: Add built-in internationalization to button dropdown filtering#4884
avinashbot merged 2 commits 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}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fine for now; thinking about having the string accept a react node as fallback but that can come in a different PR.

Comment thread src/i18n/messages/all.zh-TW.json
Comment thread src/i18n/messages/all.ja.json
@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 (71dbaad).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4884   +/-   ##
=======================================
  Coverage   97.64%   97.64%           
=======================================
  Files         958      958           
  Lines       31238    31250   +12     
  Branches    11530    11537    +7     
=======================================
+ Hits        30501    30513   +12     
- 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.

cansuaa
cansuaa previously approved these changes Aug 11, 2026
@avinashbot
avinashbot added this pull request to the merge queue Aug 11, 2026
@avinashbot
avinashbot removed this pull request from the merge queue due to a manual request Aug 11, 2026
@avinashbot
avinashbot enabled auto-merge August 12, 2026 14:08
@avinashbot
avinashbot added this pull request to the merge queue Aug 12, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 12, 2026
@avinashbot
avinashbot added this pull request to the merge queue Aug 13, 2026
Merged via the queue into main with commit 670d1fc Aug 13, 2026
57 checks passed
@avinashbot
avinashbot deleted the button-dropdown-i18n branch August 13, 2026 13:04
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.

3 participants