Open t-hamano opened 1 month ago
Found this in the comment: https://github.com/WordPress/gutenberg/pull/65386#discussion_r1804243435
Percentage values such as "100%" are not necessarily translated as "100%" depending on the language.
But in some places, these strings are hardcoded and cannot be translated.
I think we should make them translatable by using placeholders, like this:
/* translators: Percentage value. */ sprintf( __( '%s%' ), percentage )
Here are the codes I found.
[!NOTE] Note that in each code, a ButtonGroup component is being replaced with a ToggleGroupControl component. After all these PRs are merged, it would be a good idea to localize all of the following in one PR.
ButtonGroup
ToggleGroupControl
✅ https://github.com/WordPress/gutenberg/pull/65386
https://github.com/WordPress/gutenberg/blob/484c96035f521ff519afe7986c2199536a1e1485/packages/block-editor/src/components/image-size-control/index.js#L102
✅ https://github.com/WordPress/gutenberg/pull/65340/
https://github.com/WordPress/gutenberg/blob/484c96035f521ff519afe7986c2199536a1e1485/packages/block-library/src/search/edit.js#L470
⚒️ https://github.com/WordPress/gutenberg/pull/65346
https://github.com/WordPress/gutenberg/blob/484c96035f521ff519afe7986c2199536a1e1485/packages/block-library/src/button/edit.js#L140
N/A
No response
Hey 👋, I'd like to work on this issue.
Raised a PR for this: https://github.com/WordPress/gutenberg/pull/66323
Description
Found this in the comment: https://github.com/WordPress/gutenberg/pull/65386#discussion_r1804243435
Percentage values such as "100%" are not necessarily translated as "100%" depending on the language.
But in some places, these strings are hardcoded and cannot be translated.
I think we should make them translatable by using placeholders, like this:
Here are the codes I found.
ImageSizeControls component
✅ https://github.com/WordPress/gutenberg/pull/65386
https://github.com/WordPress/gutenberg/blob/484c96035f521ff519afe7986c2199536a1e1485/packages/block-editor/src/components/image-size-control/index.js#L102
Search block
✅ https://github.com/WordPress/gutenberg/pull/65340/
https://github.com/WordPress/gutenberg/blob/484c96035f521ff519afe7986c2199536a1e1485/packages/block-library/src/search/edit.js#L470
Button block
⚒️ https://github.com/WordPress/gutenberg/pull/65346
https://github.com/WordPress/gutenberg/blob/484c96035f521ff519afe7986c2199536a1e1485/packages/block-library/src/button/edit.js#L140
Step-by-step reproduction instructions
N/A
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.