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

Disambiguate "Cover" translatable string in the context of background-panel.js #62426

Closed
audrasjb opened this issue Jun 7, 2024 · 5 comments · Fixed by #62440
Closed

Disambiguate "Cover" translatable string in the context of background-panel.js #62426

audrasjb opened this issue Jun 7, 2024 · 5 comments · Fixed by #62440
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Bug An existing feature does not function as intended

Comments

@audrasjb
Copy link
Contributor

audrasjb commented Jun 7, 2024

Description

In image block's background-panel.js context, there is a "Cover" string sharing its translation with other occurrences of "Cover", like the Cover block. It results in wrong translation of the setting in some locales, like in French where the Cover Block is translated into "Bloc Bannière" while "Cover Size" cannot be translated into "Taille Bannière".

I'd recommend to add some context using _x(), just like we did in this other occurrence of "Cover", in a very similar context.

Step-by-step reproduction instructions

  1. Install fr_FR language pack
  2. Open background panel component
  3. See that the "Cover" string is translated into "Bannière". "Couvrir" should be used instead.

Screenshots, screen recording, code snippet

image (1)

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

@audrasjb audrasjb added [Type] Bug An existing feature does not function as intended Good First Issue An issue that's suitable for someone looking to contribute for the first time Internationalization (i18n) Issues or PRs related to internationalization efforts labels Jun 7, 2024
@audrasjb
Copy link
Contributor Author

audrasjb commented Jun 7, 2024

Ah and props to @jennydupuy for finding this issue on the French WordPress Slack team :)

@narenin
Copy link
Contributor

narenin commented Jun 10, 2024

@audrasjb I am working on this.

@narenin
Copy link
Contributor

narenin commented Jun 10, 2024

Hi @audrasjb, I have submitted the PR with fix, could you please check.

@ramonjd
Copy link
Member

ramonjd commented Jun 11, 2024

Good find @audrasjb, and thanks for the PR @narenin

I've left a couple of comments on the PR. Once those are addressed LGTM

@narenin
Copy link
Contributor

narenin commented Jun 11, 2024

@ramonjd Thanks for the feedback, I have implemented the same.

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 Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
3 participants