WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#46803 closed defect (bug) (fixed)

Site Health: Display both site and user locale in debug information

Reported by: desrosj Owned by: desrosj
Milestone: 5.2 Priority: normal
Severity: normal Version:
Component: Site Health Keywords: has-patch site-health commit
Focuses: Cc:

Description

In some scenarios, it could be useful to know when the site's locale differs from the user's preference.

In the debug info, only one "Language" field is provided, indicating the current user's locale, either from selected preference or site default.

I propose changing this field to "User Language" and adding "Site Language". This could prove useful for debugging i18n issues.

Follow up of #46694.

Attachments (3)

46803.diff (867 bytes) - added by desrosj 2 years ago.
46803.1.diff (1.1 KB) - added by ianbelanger 2 years ago.
Updates patch to remove suggested variable
46803.2.diff (1.0 KB) - added by mukesh27 2 years ago.
Updated patch.

Download all attachments as: .zip

Change History (10)

@desrosj
2 years ago

#1 @mukesh27
2 years ago

  • Keywords needs-refresh added

@desrosj, Patch looks good to me. one small suggestion, As we remove "language" from array list can we remove $original_locale = get_user_locale(); from debug_data function as $original_locale is not used any where in that function now.

@ianbelanger
2 years ago

Updates patch to remove suggested variable

#2 @ianbelanger
2 years ago

  • Keywords needs-refresh removed

Thanks for the suggestion @mukesh27, I have updated the original patch to remove $original_locale = get_user_locale(); as it is no longer required. There do not seem to be any adverse affects.

#3 @Clorith
2 years ago

  • Keywords needs-refresh added

This needs a refresh, as the patch now doesn't apply cleanly.

@mukesh27
2 years ago

Updated patch.

#4 @Clorith
2 years ago

  • Keywords commit added; needs-refresh removed

Looks good.

#5 @desrosj
2 years ago

  • Owner set to desrosj
  • Status changed from new to assigned

#6 @desrosj
2 years ago

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

In 45166:

Site Health: Include both site and user locales in debug information.

Previously, only the site’s locale was displayed in the Site Health debug information. Moving forward, both the site’s default locale and the user’s locale will be specified.

This change also removes the @param tag for WP_Debug_Data::debug_data(). This parameter was previously removed in [45156].

Props: mukesh27, ianbelanger, Clorith, desrosj.
Fixes #46803.

#7 @spacedmonkey
2 years ago

  • Component changed from Administration to Site Health
Note: See TracTickets for help on using tickets.