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
This commit is contained in:
John Blackbourn 2024-05-04 17:23:16 +00:00
parent 0888e755d7
commit 6ad45a93a1
2 changed files with 11 additions and 3 deletions

View File

@ -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';
}

View File

@ -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.