[wp-trac] [WordPress Trac] #43985: Privacy: The user request email should be sent in the user language

WordPress Trac noreply at wordpress.org
Fri Aug 3 22:56:10 UTC 2018


#43985: Privacy: The user request email should be sent in the user language
-------------------------------------+-------------------------------------
 Reporter:  Chouby                   |       Owner:  desrosj
     Type:  defect (bug)             |      Status:  accepted
 Priority:  normal                   |   Milestone:  4.9.9
Component:  I18N                     |     Version:  4.9.6
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  administration,
  has-unit-tests                     |  privacy
-------------------------------------+-------------------------------------

Comment (by earnjam):

 I worked on this with @desrosj this afternoon. After a little more
 investigation, I can get the tests to pass by adding some
 `set_current_screen()` calls. Seems `$current_screen` isn't getting
 changed between tests, which throws off this block in
 `WP_Locale_Switcher->switch_to_locale()` and preventing the locale from
 getting switched correctly.

 {{{
 #!php
 $current_locale = is_admin() ? get_user_locale() : get_locale();
 if ( $current_locale === $locale ) {
         return false;
 }
 }}}

 The last 3 tests in `Tests_Locale_Switcher` all run `set_current_screen()`
 calls, which are what is tripping up these later tests when you pair the
 User group with the l10n group on the tests.

 Need to dig in to the specific screen settings here a bit more to figure
 out why they're failing. Don't want to set that to get them to pass and
 mask a bigger underlying problem.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43985#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list