#46694 closed enhancement (fixed)
Site Health: Debug copy field uses site locale, not user locale
Reported by: | Clorith | Owned by: | desrosj |
---|---|---|---|
Milestone: | 5.2 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Site Health | Keywords: | site-health has-patch commit |
Focuses: | Cc: |
Description
The Debug Information part of the site health element takes the sites locale into account, and allows a user to copy either an English, or a translated version of the information for use when seeking support.
This currently checks the site language, as it was implemented before core supported different locales per user.
This should be updated, as a user looking for localized help is likely to choose their own language over the site language if they should differ.
Attachments (2)
Change History (10)
#3
@
6 years ago
- Keywords has-patch added; needs-patch removed
46694.patch replaces our use of get_locale
to instead use get_user_locale
, to reflect that this is the user viewing things, so they may have different preferential language options from the site it self.
#6
@
6 years ago
While reviewing this, I noticed that there are function_exists()
checks for switch_to_locale()
and restore_locale()
. I confirmed with @Clorith that these were in the plugin version of Site Health for the purpose of supporting older versions of WordPress. These are no longer needed, as all WordPress 5.2 installs will have these functions.
Related: #46726.