Repository navigation
Conversation
🤖 PR meta 🤖🎉 PropsUnlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @lazerg. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
What?
Closes #87218
Use a single
Selected itemsstring for theSearchableChipSelectchips toolbar label instead of_n( 'Selected item', 'Selected items' ).Why?
_n()is for strings that contain the number. Here the number was only used to pick between a generic singular and plural, which breaks in languages with more than two plural forms or where the form for 1 is also used for other numbers. The count is already announced in the input hint (%d items selected...), so the toolbar name doesn't need it.How?
getChipsToolbarLabel()now returns__( 'Selected items' )when something is selected. Tests that looked forSelected itemwith one chip now look forSelected items.Testing Instructions
npm run storybook:devand open Components → @wordpress-ui → Form → SearchableChipSelectControl → Default.Testing Instructions for Keyboard
Use of AI Tools
Claude Code helped write the fix.