Make WordPress Core


Ignore:
Timestamp:
09/01/2022 12:17:02 AM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-site-health.php

    r54043 r54044  
    17031703                        $result['status'] = 'recommended';
    17041704                        $error_info       = sprintf(
    1705                         /* translators: 1 is error message, 2 is error code */
     1705                        /* translators: 1: Error message, 2: Error code. */
    17061706                                __( '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)' ),
    17071707                                $page_cache_detail->get_error_message(),
    … …  
    17381738                        if ( $page_cache_detail['response_time'] < $threshold ) {
    17391739                                $page_cache_test_summary[] = '<span class="dashicons dashicons-yes-alt"></span> ' . sprintf(
    1740                                         /* translators: 1: The response time in milliseconds. 2: The recommended threshold milliseconds. */
     1740                                        /* translators: 1: The response time in milliseconds, 2: The recommended threshold in milliseconds. */
    17411741                                        __( 'Median server response time was %1$s milliseconds. This is less than the recommended %2$s milliseconds threshold.' ),
    17421742                                        number_format_i18n( $page_cache_detail['response_time'] ),
    … …  
    17451745                        } else {
    17461746                                $page_cache_test_summary[] = '<span class="dashicons dashicons-warning"></span> ' . sprintf(
    1747                                         /* translators: 1: The response time in milliseconds. 2: The recommended threshold milliseconds. */
     1747                                        /* translators: 1: The response time in milliseconds, 2: The recommended threshold in milliseconds. */
    17481748                                        __( 'Median server response time was %1$s milliseconds. It should be less than the recommended %2$s milliseconds threshold.' ),
    17491749                                        number_format_i18n( $page_cache_detail['response_time'] ),
    … …  
    17561756                        } else {
    17571757                                $headers_summary  = '<span class="dashicons dashicons-yes-alt"></span>';
    1758                                 $headers_summary .= sprintf(
    1759                                 /* translators: Placeholder is number of caching headers */
     1758                                $headers_summary .= ' ' . sprintf(
     1759                                        /* translators: %d: Number of caching headers. */
    17601760                                        _n(
    1761                                                 ' There was %d client caching response header detected: ',
    1762                                                 ' There were %d client caching response headers detected: ',
     1761                                                'There was %d client caching response header detected:',
     1762                                                'There were %d client caching response headers detected:',
    17631763                                                count( $page_cache_detail['headers'] )
    17641764                                        ),
    17651765                                        count( $page_cache_detail['headers'] )
    17661766                                );
    1767                                 $headers_summary          .= '<code>' . implode( '</code>, <code>', $page_cache_detail['headers'] ) . '</code>.';
     1767                                $headers_summary          .= ' <code>' . implode( '</code>, <code>', $page_cache_detail['headers'] ) . '</code>.';
    17681768                                $page_cache_test_summary[] = $headers_summary;
    17691769                        }
    … …  
    24112411                        'description' => sprintf(
    24122412                                '<p>%s</p>',
    2413                                 __( "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." )
     2413                                __( 'A persistent object cache makes your site&#8217;s database more efficient, resulting in faster load times because WordPress can retrieve your site&#8217;s content and settings much more quickly.' )
    24142414                        ),
    24152415                        'actions'     => sprintf(
Note: See TracChangeset for help on using the changeset viewer.