Skip to content

Taxonomy meta box title language #8449

Closed

Description

@RavanH

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

Activity

  1. added
    [Type] Bug
    Internationalization (i18n)
    on Aug 3, 2018
  2. youknowriad commented on Aug 8, 2018

    @youknowriad
    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?

  3. danielbachhuber commented on Aug 8, 2018

    @danielbachhuber
    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.

  4. danielbachhuber commented on Aug 8, 2018

    @danielbachhuber
    Member

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

  5. added this to the WordPress 5.0 milestone on Oct 1, 2018
  6. danielbachhuber commented on Oct 18, 2018

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Internationalization (i18n)REST API Interaction[Type] Bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions