Make WordPress Core

Changeset 50234


Ignore:
Timestamp:
02/07/2021 12:42:06 PM (4 years ago)
Author:
SergeyBiryukov
Message:

I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.

Adjust some newly introduced strings to remove unnecessary numbered placeholders for consistency.

Follow-up to [42827].

See #51800.

Location:
trunk/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/erase-personal-data.php

    r50181 r50234  
    4242
    4343$privacy_policy_guide = '<p>' . sprintf(
    44     /* translators: 1: URL to Privacy Policy Guide screen. */
    45     __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Eraser tool. This information may be available in the <a href="%1$s">Privacy Policy Guide</a>.' ),
     44    /* translators: %s: URL to Privacy Policy Guide screen. */
     45    __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Eraser tool. This information may be available in the <a href="%s">Privacy Policy Guide</a>.' ),
    4646    admin_url( 'options-privacy.php?tab=policyguide' )
    4747) . '</p>';
  • trunk/src/wp-admin/export-personal-data.php

    r50181 r50234  
    4242
    4343$privacy_policy_guide = '<p>' . sprintf(
    44     /* translators: 1: URL to Privacy Policy Guide screen. */
    45     __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Exporter tool. This information may be available in the <a href="%1$s">Privacy Policy Guide</a>.' ),
     44    /* translators: %s: URL to Privacy Policy Guide screen. */
     45    __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Exporter tool. This information may be available in the <a href="%s">Privacy Policy Guide</a>.' ),
    4646    admin_url( 'options-privacy.php?tab=policyguide' )
    4747) . '</p>';
  • trunk/src/wp-admin/includes/ajax-actions.php

    r50153 r50234  
    54305430    if ( true === $results ) {
    54315431        wp_send_json_success(
    5432             /* translators: 1: User's display name. */
     5432            /* translators: %s: User's display name. */
    54335433            sprintf( __( 'A password reset link was emailed to %s.' ), $user->display_name )
    54345434        );
  • trunk/src/wp-admin/includes/dashboard.php

    r50133 r50234  
    14041404                <?php
    14051405                printf(
    1406                     /* translators: 1: Localized meetup organization documentation URL. */
    1407                     __( 'Want more events? <a href="%1$s">Help organize the next one</a>!' ),
     1406                    /* translators: %s: Localized meetup organization documentation URL. */
     1407                    __( 'Want more events? <a href="%s">Help organize the next one</a>!' ),
    14081408                    __( 'https://make.wordpress.org/community/organize-event-landing-page/' )
    14091409                );
  • trunk/src/wp-admin/user-edit.php

    r50129 r50234  
    624624            <p class="description">
    625625                <?php
    626                 /* translators: 1: User's display name. */
     626                /* translators: %s: User's display name. */
    627627                printf( __( 'Send %s a link to reset their password. This will not change their password, nor will it force a change.' ), esc_html( $profileuser->display_name ) );
    628628                ?>
  • trunk/src/wp-content/themes/twentynineteen/template-parts/content/content-none.php

    r46827 r50234  
    2323            printf(
    2424                '<p>' . wp_kses(
    25                     /* translators: 1: Link to WP admin new post page. */
    26                     __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentynineteen' ),
     25                    /* translators: %s: Link to WP admin new post page. */
     26                    __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentynineteen' ),
    2727                    array(
    2828                        'a' => array(
  • trunk/src/wp-content/themes/twentytwentyone/template-parts/content/content-none.php

    r50233 r50234  
    4040            printf(
    4141                '<p>' . wp_kses(
    42                     /* translators: 1: Link to WP admin new post page. */
    43                     __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentytwentyone' ),
     42                    /* translators: %s: Link to WP admin new post page. */
     43                    __( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwentyone' ),
    4444                    array(
    4545                        'a' => array(
  • trunk/src/wp-content/themes/twentytwentyone/template-parts/post/author-bio.php

    r49826 r50234  
    1313        <?php echo get_avatar( get_the_author_meta( 'ID' ), '85' ); ?>
    1414        <div class="author-bio-content">
    15             <h2 class="author-title"><?php printf( /* translators: 1: Author name. */ esc_html__( 'By %s', 'twentytwentyone' ), get_the_author() ); ?></h2>
     15            <h2 class="author-title">
     16            <?php
     17            printf(
     18                /* translators: %s: Author name. */
     19                esc_html__( 'By %s', 'twentytwentyone' ),
     20                get_the_author()
     21            );
     22            ?>
     23            </h2>
    1624            <p class="author-description"> <?php the_author_meta( 'description' ); ?></p><!-- .author-description -->
    1725            <?php
    1826            printf(
    19                 /* translators: 1: Link to authors posts. 2: Author name. */
    20                 '<a class="author-link" href="%1$s" rel="author">' . esc_html__( 'View all of %2$s\'s posts.', 'twentytwentyone' ) . '</a>',
     27                '<a class="author-link" href="%1$s" rel="author">%2$s</a>',
    2128                esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    22                 get_the_author()
     29                sprintf(
     30                    /* translators: %s: Author name. */
     31                    esc_html__( 'View all of %s\'s posts.', 'twentytwentyone' ),
     32                    get_the_author()
     33                )
    2334            );
    2435            ?>
  • trunk/src/wp-includes/class-wp-block-pattern-categories-registry.php

    r49311 r50234  
    6161    public function unregister( $category_name ) {
    6262        if ( ! $this->is_registered( $category_name ) ) {
    63             /* translators: 1: Block pattern name. */
    64             $message = sprintf( __( 'Block pattern category "%1$s" not found.' ), $category_name );
     63            /* translators: %s: Block pattern name. */
     64            $message = sprintf( __( 'Block pattern category "%s" not found.' ), $category_name );
    6565            _doing_it_wrong( __METHOD__, $message, '5.5.0' );
    6666            return false;
  • trunk/src/wp-includes/class-wp-block-patterns-registry.php

    r49311 r50234  
    7474    public function unregister( $pattern_name ) {
    7575        if ( ! $this->is_registered( $pattern_name ) ) {
    76             /* translators: 1: Pattern name. */
    77             $message = sprintf( __( 'Pattern "%1$s" not found.' ), $pattern_name );
     76            /* translators: %s: Pattern name. */
     77            $message = sprintf( __( 'Pattern "%s" not found.' ), $pattern_name );
    7878            _doing_it_wrong( __METHOD__, $message, '5.5.0' );
    7979            return false;
  • trunk/src/wp-includes/rest-api.php

    r50150 r50234  
    17861786    }
    17871787
    1788     /* translators: 1: Parameter. */
    1789     return new WP_Error( 'rest_no_matching_schema', sprintf( __( '%1$s does not match any of the expected formats.' ), $param ) );
     1788    /* translators: %s: Parameter. */
     1789    return new WP_Error( 'rest_no_matching_schema', sprintf( __( '%s does not match any of the expected formats.' ), $param ) );
    17901790}
    17911791
     
    18901890        return new WP_Error(
    18911891            'rest_one_of_multiple_matches',
    1892             /* translators: 1: Parameter. */
    1893             sprintf( __( '%1$s matches more than one of the expected formats.' ), $param ),
     1892            /* translators: %s: Parameter. */
     1893            sprintf( __( '%s matches more than one of the expected formats.' ), $param ),
    18941894            array( 'positions' => $schema_positions )
    18951895        );
     
    23812381
    23822382    if ( ! empty( $args['uniqueItems'] ) && ! rest_validate_array_contains_unique_items( $value ) ) {
    2383         /* translators: 1: Parameter. */
    2384         return new WP_Error( 'rest_duplicate_items', sprintf( __( '%1$s has duplicate items.' ), $param ) );
     2383        /* translators: %s: Parameter. */
     2384        return new WP_Error( 'rest_duplicate_items', sprintf( __( '%s has duplicate items.' ), $param ) );
    23852385    }
    23862386
     
    26832683
    26842684        if ( ! empty( $args['uniqueItems'] ) && ! rest_validate_array_contains_unique_items( $value ) ) {
    2685             /* translators: 1: Parameter. */
    2686             return new WP_Error( 'rest_duplicate_items', sprintf( __( '%1$s has duplicate items.' ), $param ) );
     2685            /* translators: %s: Parameter. */
     2686            return new WP_Error( 'rest_duplicate_items', sprintf( __( '%s has duplicate items.' ), $param ) );
    26872687        }
    26882688
Note: See TracChangeset for help on using the changeset viewer.