From 5036d60706c4f860303bdfcc64c81f1100787f1f Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Wed, 17 Nov 2021 16:22:19 +0000 Subject: [PATCH] Upgrade/Install: Differentiate en_US version strings from localized ones. Adds a condition to `$version_string` to determine whether the Core update is the original en_US package, or a localized one. This change fixes an issue where these packages were not differentiated and duplicate messages were displayed. Props Presskopp, benjamingosset. Fixes #53710. git-svn-id: https://develop.svn.wordpress.org/trunk@52197 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/update-core.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wp-admin/update-core.php b/src/wp-admin/update-core.php index a38e43c46f..4aaa0bf725 100644 --- a/src/wp-admin/update-core.php +++ b/src/wp-admin/update-core.php @@ -48,6 +48,8 @@ function list_core_update( $update ) { // If the only available update is a partial builds, it doesn't need a language-specific version string. $version_string = $update->current; } + } elseif ( 'en_US' === $update->locale && 'en_US' !== get_locale() ) { + $version_string = sprintf( '%s–%s', $update->current, $update->locale ); } $current = false;