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

Global Styles: Make strings translatable #60127

Merged
merged 1 commit into from Mar 23, 2024

Conversation

pedro-mendonca
Copy link
Contributor

@pedro-mendonca pedro-mendonca commented Mar 22, 2024

Make 'Solid' and 'Gradient' labels translatable in the global styles color palette settings.

What?

Add missing gettext to translation strings

Why?

To allow translation of labels

How?

Wrap with __()

Testing Instructions

  1. Open a post or page in a translated WordPress.
  2. Go to Styles > Colors
  3. Open color schene
  4. See the 'Solid' and 'Grandient' untranslated

Screenshots or screencast

imagem

Fixes #60142

Make 'Solid' and 'Gradient' labels translatable
Copy link

github-actions bot commented Mar 22, 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: pedro-mendonca <pedromendonca@git.wordpress.org>
Co-authored-by: swissspidy <swissspidy@git.wordpress.org>

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

@swissspidy swissspidy added [Type] Bug An existing feature does not function as intended [Package] i18n /packages/i18n labels Mar 23, 2024
@swissspidy swissspidy changed the title [i18n] Wrap labels with gettext Global Styles: Make strings translatable Mar 23, 2024
Copy link
Member

@swissspidy swissspidy left a comment

Choose a reason for hiding this comment

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

Probably should use _x() in the future, but that needs to be done holistically across the project

@pedro-mendonca
Copy link
Contributor Author

pedro-mendonca commented Mar 23, 2024

I agree, such a small string without a context can lead to confusion.

Still, these already exist in the translatiaon tables without context, it's better to do it for all at once.

@swissspidy swissspidy merged commit 21bb478 into WordPress:trunk Mar 23, 2024
60 of 61 checks passed
@github-actions github-actions bot added this to the Gutenberg 18.1 milestone Mar 23, 2024
@pedro-mendonca pedro-mendonca deleted the patch-1 branch March 27, 2024 08:36
carstingaxion pushed a commit to carstingaxion/gutenberg that referenced this pull request Mar 27, 2024
Co-authored-by: pedro-mendonca <pedromendonca@git.wordpress.org>
Co-authored-by: swissspidy <swissspidy@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] i18n /packages/i18n [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[I18n] Global styles color palette labels 'Solid' & 'Gradient' untranslatable
2 participants