From 1589bba4f569a22ab67b2da9933aba1c4cbe71d2 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Wed, 17 Nov 2021 16:24:00 +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. Built from https://develop.svn.wordpress.org/trunk@52197 git-svn-id: http://core.svn.wordpress.org/trunk@51789 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/update-core.php | 2 ++ wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/update-core.php b/wp-admin/update-core.php index a38e43c46f..4aaa0bf725 100644 --- a/wp-admin/update-core.php +++ b/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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 44bdb0e4d5..25a97fa7e5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52196'; +$wp_version = '5.9-alpha-52197'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.