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

Comments

Projects
None yet
3 participants
@RavanH

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

This comment has been minimized.

Show comment
Hide comment
@youknowriad

youknowriad Aug 8, 2018

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?

Contributor

youknowriad commented 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

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Aug 8, 2018

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.

Member

danielbachhuber commented Aug 8, 2018

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

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber

danielbachhuber Aug 8, 2018

Member

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

Member

danielbachhuber commented Aug 8, 2018

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

This comment has been minimized.

Show comment
Hide comment
@danielbachhuber
Member

danielbachhuber commented Oct 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment