Make WordPress Core


Ignore:
Timestamp:
02/07/2021 12:42:06 PM (3 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.