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
This commit is contained in:
audrasjb 2021-11-17 16:24:00 +00:00
parent 74395140ad
commit 1589bba4f5
2 changed files with 3 additions and 1 deletions

View File

@ -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. // If the only available update is a partial builds, it doesn't need a language-specific version string.
$version_string = $update->current; $version_string = $update->current;
} }
} elseif ( 'en_US' === $update->locale && 'en_US' !== get_locale() ) {
$version_string = sprintf( '%s–%s', $update->current, $update->locale );
} }
$current = false; $current = false;

View File

@ -16,7 +16,7 @@
* *
* @global string $wp_version * @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. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.