Skip to content
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

l10n: Make percentage values ​​translatable #66298

Open
2 tasks done
t-hamano opened this issue Oct 22, 2024 · 2 comments · May be fixed by #66323
Open
2 tasks done

l10n: Make percentage values ​​translatable #66298

t-hamano opened this issue Oct 22, 2024 · 2 comments · May be fixed by #66323
Assignees
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time l10n Localization and translations best practices [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@t-hamano
Copy link
Contributor

t-hamano commented Oct 22, 2024

Description

Found this in the comment: #65386 (comment)

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.

ImageSizeControls component

#65386

Search block

#65340

Button block

⚒️ #65346

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.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes
@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended l10n Localization and translations best practices labels Oct 22, 2024
@t-hamano t-hamano changed the title l10n: Making percentage values ​​translatable l10n: Make percentage values ​​translatable Oct 22, 2024
@t-hamano t-hamano added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Oct 22, 2024
@AhmarZaidi
Copy link
Contributor

Hey 👋,
I'd like to work on this issue.

@AhmarZaidi AhmarZaidi linked a pull request Oct 22, 2024 that will close this issue
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 22, 2024
@AhmarZaidi
Copy link
Contributor

Raised a PR for this: #66323

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time l10n Localization and translations best practices [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants