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

Custom colors in color palette don't increment on non-English sites #55185

Closed
Tracked by #57309
properlypurple opened this issue Oct 10, 2023 · 3 comments
Closed
Tracked by #57309
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Package] Components /packages/components [Type] Bug An existing feature does not function as intended

Comments

@properlypurple
Copy link
Contributor

Description

When using the color palette under global styles to add custom colors, every new color should show up like Color 1, Color 2, and so on. When on a site with a different language, the numbers in custom colors don't increment.

Step-by-step reproduction instructions

  1. On a fresh site, set the site language to French or German.
  2. If using the Gutenberg plugin, install the language pack from Dashboard > Updates
  3. Start with a block theme(2023, Spectra, etc), and go to Appearance > Editor
  4. Go Styles > Colors > Palette. Click the button to add a new custom color. In French, this would be under Personnalisé.
  5. Add a few more colors, and notice that the names are all Couleur 1 by default.
  6. Close the editor, and switch the site's language to English.
  7. Repeat steps 3-5, and notice that the color names auto-increment Color 1, Color 2, and so on.

Screenshots, screen recording, code snippet

English

Kooha-2023-10-10-11-09-39.mp4

French

Kooha-2023-10-10-11-14-01.mp4

I've also tested this with German, Spanish, and Brazilian Portuguese, with the same results.

Environment info

  • WP 6.3.1, with or without the Gutenberg (16.7.1) plugin

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

@properlypurple properlypurple added [Type] Bug An existing feature does not function as intended [Package] i18n /packages/i18n [Package] Components /packages/components labels Oct 10, 2023
@properlypurple
Copy link
Contributor Author

It looks like this is related to how the translation is handled here

@t-hamano
Copy link
Contributor

Thanks for the report.

Some issues have been reported for non-Latin languages with the global style custom color palette.

It may be difficult to solve all of these problems at once, but I believe that #54332 will be the first step towards solving them.

@t-hamano
Copy link
Contributor

This issue has been fixed in #52212. The screencast below shows that palette names are incremented correctly even on a French site.

d4231d0ea47a10831410a5a50e420b9b.mp4

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 [Package] Components /packages/components [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants