WordPress.org

Make WordPress Core

Opened 10 months ago

Closed 9 months ago

#39009 closed defect (bug) (fixed)

Customizer: the preview UI language should be the user language

Reported by: afercia Owned by: westonruter
Milestone: 4.7.1 Priority: normal
Severity: normal Version: 4.7
Component: Customize Keywords: has-screenshots has-patch fixed-major commit
Focuses: Cc:

Description

In WordPress 4.7 there are two languages (the site language and the user language) and any controls, text, messages, etc., that are part of the UI should be displayed in the user language, i.e. the one users choose for the admin interface.

By the way, the Customizer preview UI uses the site language. See the screenshots below, taken using these settings:

User language: Spanish
Site language: Deutsch

For example, the edit buttons title and aria label attributes should be in Spanish, as well as the "Shift Click" tooltip:

https://cldup.com/DO36gZkytv.png

https://cldup.com/cKn5xdTHlA.png

Attachments (1)

39009.patch (4.1 KB) - added by ocean90 10 months ago.

Download all attachments as: .zip

Change History (10)

#1 @celloexpressions
10 months ago

If the customize preview is running in the wrong language, the scope of the problems could be much larger than edit shortcut aria labels. There may be additional challenges here, though, because the theme is presumably using the site language. There needs to be a way to detect "admin" strings that are running in the theme/frontend context.

@ocean90
10 months ago

#2 @ocean90
10 months ago

  • Keywords has-patch added

39009.patch makes use of switch_to_locale() and get_user_locale().

This ticket was mentioned in Slack in #core by westonruter. View the logs.


10 months ago

#4 @helen
10 months ago

  • Milestone changed from Awaiting Review to 4.7.1

#5 @westonruter
10 months ago

  • Owner set to westonruter
  • Resolution set to fixed
  • Status changed from new to closed

In 39545:

Customize: Use selected user language for edit shortcuts in preview instead of site language.

Props ocean90.
Fixes #39009.

#6 @westonruter
10 months ago

  • Keywords fixed-major added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for 4.7.1.

#7 @westonruter
10 months ago

  • Keywords commit added

This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.


10 months ago

#9 @dd32
9 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 39571:

Customize: Use selected user language for edit shortcuts in preview instead of site language.

Props ocean90.
Merges [39545] to the 4.7 branch.
Fixes #39009.

Note: See TracTickets for help on using tickets.