From 6ad45a93a122ed43223b466fbab7a1466d984c07 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 4 May 2024 17:23:16 +0000 Subject: [PATCH] Site Health: Improve the internationalisation of strings used in disk space health checks. This allows the disk space values to be changed in the future without requiring a string change. Props afragen, audrasjb, johnbillion Fixes #61115 Built from https://develop.svn.wordpress.org/trunk@58094 git-svn-id: http://core.svn.wordpress.org/trunk@57559 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-site-health.php | 12 ++++++++++-- wp-includes/version.php | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index 15996fd420..e308074634 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -1839,10 +1839,18 @@ class WP_Site_Health { $result['description'] = __( 'Could not determine available disk space for updates.' ); $result['status'] = 'recommended'; } elseif ( $available_space < 20 * MB_IN_BYTES ) { - $result['description'] = __( 'Available disk space is critically low, less than 20 MB available. Proceed with caution, updates may fail.' ); + $result['description'] = sprintf( + /* translators: %s: Available disk space in MB or GB. */ + __( 'Available disk space is critically low, less than %s available. Proceed with caution, updates may fail.' ), + size_format( 20 * MB_IN_BYTES ) + ); $result['status'] = 'critical'; } elseif ( $available_space < 100 * MB_IN_BYTES ) { - $result['description'] = __( 'Available disk space is low, less than 100 MB available.' ); + $result['description'] = sprintf( + /* translators: %s: Available disk space in MB or GB. */ + __( 'Available disk space is low, less than %s available.' ), + size_format( 100 * MB_IN_BYTES ) + ); $result['status'] = 'recommended'; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 20d8b6e97c..50cc8e925c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-alpha-58093'; +$wp_version = '6.6-alpha-58094'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.