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

FSE patterns are displayed in user's language instead of site's language #36227

Closed
Chouby opened this issue Nov 4, 2021 · 1 comment
Closed
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended

Comments

@Chouby
Copy link
Contributor

Chouby commented Nov 4, 2021

Description

Since WordPress 4.7, each user can display the backend in its own language, possibly different than the site's main language. When using this feature, FSE patterns are displayed in the user's language instead of the site's main language.

Step-by-step reproduction instructions

  1. Translate some strings of the theme Twenty Twenty Two, let say in French. I selected "ABOUT US" and "LATEST POSTS", using poedit or equivalent and save the .mo file.
  2. Go to Settings > General and select the French language (make sure that in your user profile, the site's default language is selected).
  3. Go to the Site Editor
  4. Edit the footer template part
  5. Select a new footer pattern. I used the "Blog footer" provided by Twenty Twenty Two which comes with the two strings translated at step 1
  6. Check that the two strings are correctly displayed in French as expected.
  7. Go to your profile and now select English as your user's language.
  8. Go back to the Site Editor
  9. Clear the footer customizations and edit it again
  10. Select the same footer pattern as step 5
  11. Check that now the stirings are displayed in English (user's language) instead of French (site's main language).

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 5.8.1
  • Gütenberg 11.8.0
  • Twenty Twenty Two development version from GitHub

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

@stevenlinx stevenlinx added [Type] Bug An existing feature does not function as intended Needs Testing Needs further testing to be confirmed. [Feature] Full Site Editing labels Nov 5, 2021
@annezazu annezazu added the Internationalization (i18n) Issues or PRs related to internationalization efforts label Nov 12, 2021
@ndiego
Copy link
Member

ndiego commented Aug 9, 2022

Thanks for reporting this issue. It was reviewed in today's Editor Bug Scrub and after review, it appears that everything is working as expected. While it might not be ideal for your situation, user language settings take precedent over site language settings as all REST API requests are fetched in user locale since #10862.

@ndiego ndiego closed this as completed Aug 9, 2022
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 Needs Testing Needs further testing to be confirmed. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

4 participants