WordPress.org

Make WordPress Core

Opened 10 months ago

Closed 9 months ago

Last modified 7 months 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:
PR Number:

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 10 months ago.
46803.1.diff (1.1 KB) - added by ianbelanger 10 months ago.
Updates patch to remove suggested variable
46803.2.diff (1.0 KB) - added by mukesh27 10 months ago.
Updated patch.

Download all attachments as: .zip

Change History (10)

@desrosj
10 months ago

#1 @mukesh27
10 months 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
10 months ago

Updates patch to remove suggested variable

#2 @ianbelanger
10 months 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
10 months ago

  • Keywords needs-refresh added

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

@mukesh27
10 months ago

Updated patch.

#4 @Clorith
9 months ago

  • Keywords commit added; needs-refresh removed

Looks good.

#5 @desrosj
9 months ago

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

#6 @desrosj
9 months 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
7 months ago

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