From 3269e838019daee716ec1c3e3ca0958168150233 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 21 Jul 2020 15:51:22 +0000 Subject: [PATCH] Site Health: Move `post_max_size` and `upload_max_filesize` out of a translatable string in file upload checks. Simplify some other strings, use a consistent format for translator comments. Follow-up to [48535]. See #50038. git-svn-id: https://develop.svn.wordpress.org/trunk@48539 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-site-health.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index 7e55ec515d..79686addf4 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -1973,8 +1973,8 @@ class WP_Site_Health { 'description' => sprintf( '

%s

', sprintf( - /* translators: %1$s: file_uploads %2$s: php.ini */ - __( 'The %1$s directive in %2$s determines if uploading to is allowed in your WordPress.' ), + /* translators: 1: file_uploads, 2: php.ini */ + __( 'The %1$s directive in %2$s determines if uploading files is allowed on your site.' ), 'file_uploads', 'php.ini' ) @@ -1998,8 +1998,8 @@ class WP_Site_Health { $result['description'] .= sprintf( '

%s

', sprintf( - /* translators: %1$s: file_uploads %2$s: 0 */ - __( '%1$s is set to %2$s. You won\'t be able to upload files in your WordPress.' ), + /* translators: 1: file_uploads, 2: 0 */ + __( '%1$s is set to %2$s. You won\'t be able to upload files on your site.' ), 'file_uploads', '0' ) @@ -2011,12 +2011,17 @@ class WP_Site_Health { $upload_max_size = ini_get( 'upload_max_filesize' ); if ( wp_convert_hr_to_bytes( $post_max_size ) !== wp_convert_hr_to_bytes( $upload_max_size ) ) { - $result['label'] = __( 'Mismatched "post_max_size" and "upload_max_filesize" values.' ); + $result['label'] = sprintf( + /* translators: 1: post_max_size, 2: upload_max_filesize */ + __( 'Mismatched "%1$s" and "%2$s" values.' ), + 'post_max_size', + 'upload_max_filesize' + ); $result['status'] = 'recommended'; $result['description'] = sprintf( '

%s

', sprintf( - /* translators: %1$s: post_max_size %2$s: upload_max_filesize */ + /* translators: 1: post_max_size, 2: upload_max_filesize */ __( 'The settings for %1$s and %2$s are not the same, this could cause some problems when trying to upload files.' ), 'post_max_size', 'upload_max_filesize'