From 100672924737d3f3dbca43cf53b36fc6cedb2642 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 1 Sep 2022 00:17:02 +0000 Subject: [PATCH] Site Health: Minor i18n cleanup in page cache and persistent object cache tests. Includes: * Moving leading and trailing spaces out of a translatable string. * Using the established format for translator comments. * Using a consistent typography for the apostrophe. Follow-up to [53955], [54043]. See #56041. git-svn-id: https://develop.svn.wordpress.org/trunk@54044 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-site-health.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index 6926736cd7..70f5b7c6ad 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -1702,7 +1702,7 @@ class WP_Site_Health { $result['label'] = __( 'Unable to detect the presence of page cache' ); $result['status'] = 'recommended'; $error_info = sprintf( - /* translators: 1 is error message, 2 is error code */ + /* translators: 1: Error message, 2: Error code. */ __( 'Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: %1$s (Code: %2$s)' ), $page_cache_detail->get_error_message(), $page_cache_detail->get_error_code() @@ -1737,14 +1737,14 @@ class WP_Site_Health { $threshold = $this->get_good_response_time_threshold(); if ( $page_cache_detail['response_time'] < $threshold ) { $page_cache_test_summary[] = ' ' . sprintf( - /* translators: 1: The response time in milliseconds. 2: The recommended threshold milliseconds. */ + /* translators: 1: The response time in milliseconds, 2: The recommended threshold in milliseconds. */ __( 'Median server response time was %1$s milliseconds. This is less than the recommended %2$s milliseconds threshold.' ), number_format_i18n( $page_cache_detail['response_time'] ), number_format_i18n( $threshold ) ); } else { $page_cache_test_summary[] = ' ' . sprintf( - /* translators: 1: The response time in milliseconds. 2: The recommended threshold milliseconds. */ + /* translators: 1: The response time in milliseconds, 2: The recommended threshold in milliseconds. */ __( 'Median server response time was %1$s milliseconds. It should be less than the recommended %2$s milliseconds threshold.' ), number_format_i18n( $page_cache_detail['response_time'] ), number_format_i18n( $threshold ) @@ -1755,16 +1755,16 @@ class WP_Site_Health { $page_cache_test_summary[] = ' ' . __( 'No client caching response headers were detected.' ); } else { $headers_summary = ''; - $headers_summary .= sprintf( - /* translators: Placeholder is number of caching headers */ + $headers_summary .= ' ' . sprintf( + /* translators: %d: Number of caching headers. */ _n( - ' There was %d client caching response header detected: ', - ' There were %d client caching response headers detected: ', + 'There was %d client caching response header detected:', + 'There were %d client caching response headers detected:', count( $page_cache_detail['headers'] ) ), count( $page_cache_detail['headers'] ) ); - $headers_summary .= '' . implode( ', ', $page_cache_detail['headers'] ) . '.'; + $headers_summary .= ' ' . implode( ', ', $page_cache_detail['headers'] ) . '.'; $page_cache_test_summary[] = $headers_summary; } } @@ -2410,7 +2410,7 @@ class WP_Site_Health { 'label' => __( 'A persistent object cache is being used' ), 'description' => sprintf( '

%s

', - __( "A persistent object cache makes your site's database more efficient, resulting in faster load times because WordPress can retrieve your site's content and settings much more quickly." ) + __( 'A persistent object cache makes your site’s database more efficient, resulting in faster load times because WordPress can retrieve your site’s content and settings much more quickly.' ) ), 'actions' => sprintf( '

%s %s

',