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

Fixed : Disambiguate "Cover" translatable string in the context of background-panel.js #62440

Merged
merged 3 commits into from
Jun 11, 2024

Conversation

narenin
Copy link
Contributor

@narenin narenin commented Jun 10, 2024

Resolves #62426

What?

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".

This PR will fix the issue raised in #62426

Why?

It fixed the disambiguate we have in "Cover" translatable string in the context of background-panel.js

How?

This PR will add some context using _x(), just like we did in this other occurrence of "Cover", in a very similar context to fix this issue.

Testing 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 or screencast

Before:

image

After:

image

@narenin narenin requested a review from ellatrix as a code owner June 10, 2024 09:55
Copy link

github-actions bot commented Jun 10, 2024

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: narenin <narenin@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: audrasjb <audrasjb@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@audrasjb
Copy link
Contributor

Thanks for the PR! It looks good to me.
By the way I think we could also add context for the "Contains" string.

@audrasjb audrasjb added the Internationalization (i18n) Issues or PRs related to internationalization efforts label Jun 10, 2024
@narenin
Copy link
Contributor Author

narenin commented Jun 10, 2024

@audrasjb Thanks for the feedback, I have added the same for "Contains" and "Tile" string.

Copy link
Member

@ramonjd ramonjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @narenin

I'd update the string to describe the translation context more accurately, and so it's differentiated from the Cover block context

Copy link
Member

@ramonjd ramonjd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff! Thanks for the quick changes 🙇🏻

@ramonjd ramonjd added Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta [Type] Code Quality Issues or PRs that relate to code quality labels Jun 11, 2024
@ramonjd ramonjd merged commit fd587da into WordPress:trunk Jun 11, 2024
64 of 65 checks passed
@github-actions github-actions bot added this to the Gutenberg 18.6 milestone Jun 11, 2024
ellatrix pushed a commit that referenced this pull request Jun 11, 2024
…ckground-panel.js (#62440)

* Fixed : Disambiguate 'Cover' translatable string in the context of background-panel.js

* Added context for Contain and Tile

* Implemented the suggestions


Co-authored-by: narenin <narenin@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: audrasjb <audrasjb@git.wordpress.org>
ellatrix pushed a commit that referenced this pull request Jun 11, 2024
…ckground-panel.js (#62440)

* Fixed : Disambiguate 'Cover' translatable string in the context of background-panel.js

* Added context for Contain and Tile

* Implemented the suggestions


Co-authored-by: narenin <narenin@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: audrasjb <audrasjb@git.wordpress.org>
patil-vipul pushed a commit to patil-vipul/gutenberg that referenced this pull request Jun 17, 2024
…ckground-panel.js (WordPress#62440)

* Fixed : Disambiguate 'Cover' translatable string in the context of background-panel.js

* Added context for Contain and Tile

* Implemented the suggestions


Co-authored-by: narenin <narenin@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: audrasjb <audrasjb@git.wordpress.org>
@ellatrix ellatrix removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Jun 18, 2024
@ellatrix
Copy link
Member

This was cherry-picked to the wp/6.6 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disambiguate "Cover" translatable string in the context of background-panel.js
4 participants