Skip to content

Commit

Permalink
Site Health: Improve the internationalisation of strings used in disk…
Browse files Browse the repository at this point in the history
… 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


git-svn-id: https://develop.svn.wordpress.org/trunk@58094 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
johnbillion committed May 4, 2024
1 parent a412372 commit 9d6cd2d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/wp-admin/includes/class-wp-site-health.php
Original file line number Diff line number Diff line change
Expand Up @@ -1839,10 +1839,18 @@ public function get_test_available_updates_disk_space() {
$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';
}

Expand Down

0 comments on commit 9d6cd2d

Please sign in to comment.