Editor: Use _n() for revisions count aria-label#78382
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the 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. |
|
Size Change: +4 B (0%) Total Size: 7.97 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in 021f17f. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/26006954237
|
What?
Closes #78381
Follow-up to #78140, which introduced a descriptive
aria-labelon the Revisions button in the Post Summary sidebar:Props @tobifjellner
Why?
The string was wrapped in
__(), so the word "revisions" cannot be pluralized for languages with more complex plural rules than English. Switching to_n()lets translators provide the correct plural form (including singular "1 revision").How?
In
packages/editor/src/components/post-last-revision/index.js, thearia-labelnow uses_n():Testing Instructions
aria-labelreadsOpen revisions screen: N revisions(or1 revisionif only one revision exists).