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

Taxonomy meta box title language #8449

Closed
RavanH opened this issue Aug 3, 2018 · 4 comments
Closed

Taxonomy meta box title language #8449

RavanH opened this issue Aug 3, 2018 · 4 comments
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended

Comments

@RavanH
Copy link

RavanH commented Aug 3, 2018

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:

  1. Set a different language (than the general site language) in your user Profile
  2. Edit a post and see that the taxonomy meta boxes have titles in the alternative language set above
  3. Now click on any taxonomy meta box title to toggle open/close
  4. 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) :
schermafdruk van 2018-08-03 16-56-50

After toggling, taxonomy titles switched to French (site language) :
schermafdruk van 2018-08-03 16-57-52

Desktop (please complete the following information):

  • OS: Linux
  • Google Chrome 68.0.3440.84
@youknowriad youknowriad added [Type] Bug An existing feature does not function as intended Internationalization (i18n) Issues or PRs related to internationalization efforts labels Aug 3, 2018
@youknowriad
Copy link
Contributor

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?

@youknowriad youknowriad added the REST API Interaction Related to REST API label Aug 8, 2018
@danielbachhuber
Copy link
Member

can we make the REST API use the user's locale if the user is authenticated?

This seems like a more appropriate solution to me. We'd make this change in core WordPress.

@danielbachhuber
Copy link
Member

Here's the core Trac ticket for it: https://core.trac.wordpress.org/ticket/44758

@danielbachhuber danielbachhuber added this to the WordPress 5.0 milestone Oct 1, 2018
@danielbachhuber
Copy link
Member

Closing in favor of https://core.trac.wordpress.org/ticket/44758

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 REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants