You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When a users admin language is different from the default site language, the Categories and Tags meta box title in the Gutenberg editor sidebar initially show in the users admin language but as soon as one is clicked to open the meta box, the title will jump to the default site language.
The same thing happens with custom taxonomies, but other meta boxes, like Featured Image, do not suffer this issue. Also the taxonomy meta box content remains in the user admin language. Only the title changes. See screen shots before and after.
Gutenberg 3.4.0
To Reproduce
Steps to reproduce the behavior:
Set a different language (than the general site language) in your user Profile
Edit a post and see that the taxonomy meta boxes have titles in the alternative language set above
Now click on any taxonomy meta box title to toggle open/close
Notice that the title switches to the site default language
Expected behavior
Meta boxes keep their user admin language.
Screenshots
Before toggling the meta boxes, titles are English (user admin language) :
After toggling, taxonomy titles switched to French (site language) :
Desktop (please complete the following information):
The problem is that the preloaded API request is using the user's locale while the REST API triggered from the client is using the site's locale.
@danielbachhuber Any idea how to fix this? Do we have a global locale argument for REST API endpoints or can we make the REST API use the user's locale if the user is authenticated?
Activity
youknowriad commentedon Aug 8, 2018
The problem is that the preloaded API request is using the user's locale while the REST API triggered from the client is using the site's locale.
@danielbachhuber Any idea how to fix this? Do we have a global locale argument for REST API endpoints or can we make the REST API use the user's locale if the user is authenticated?
danielbachhuber commentedon Aug 8, 2018
This seems like a more appropriate solution to me. We'd make this change in core WordPress.
danielbachhuber commentedon Aug 8, 2018
Here's the core Trac ticket for it: https://core.trac.wordpress.org/ticket/44758
danielbachhuber commentedon Oct 18, 2018
Closing in favor of https://core.trac.wordpress.org/ticket/44758