-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update percentage strings to be translatable #66323
base: trunk
Are you sure you want to change the base?
Update percentage strings to be translatable #66323
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @AhmarZaidi! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
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. |
Hi @AhmarZaidi, All
Could you resolve the conflicts in this PR? |
What?
Fixes: #66298
This PR makes percentage values such as "100%" translatable by replacing hardcoded percentage strings with placeholders.
Why?
"Different locales use different symbols for the percent sign. And like currency symbols, the percent sign can go to the left or right of its associated number depending on the locale." - ref: 1, 2
This means percentage values are not consistently translated across different languages when using hardcoded strings. This PR replaces those hardcoded values with translatable placeholders, allowing proper localization for all languages.
How?
Replaces hardcoded value such as
{ scale }%
with wordpress/i18n's translation function (__
) along with translators comment & sprintf.Testing Instructions
N/A
Testing Instructions for Keyboard
N/A
Screenshots or screencast