Make WordPress Core

Changeset 48765


Ignore:
Timestamp:
08/09/2020 01:44:29 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use consistent formatting for translator comments in wp-includes/rest-api.php.

See #50767.

Location:
trunk/src/wp-includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-recovery-mode-email-service.php

    r48590 r48765  
    7676
    7777        $err_message = sprintf(
    78             /* translators: 1. Last sent as a human time diff, 2. Wait time as a human time diff. */
     78            /* translators: 1: Last sent as a human time diff, 2: Wait time as a human time diff. */
    7979            __( 'A recovery link was already sent %1$s ago. Please wait another %2$s before requesting a new email.' ),
    8080            human_time_diff( $last_sent ),
  • trunk/src/wp-includes/rest-api.php

    r48590 r48765  
    9494                __FUNCTION__,
    9595                sprintf(
    96                     /* translators: 1. The REST API route being registered. 2. The argument name. 3. The suggested function name. */
     96                    /* translators: 1: The REST API route being registered, 2: The argument name, 3: The suggested function name. */
    9797                    __( 'The REST API route definition for %1$s is missing the required %2$s argument. For REST API routes that are intended to be public, use %3$s as the permission callback.' ),
    9898                    '<code>' . $clean_namespace . '/' . trim( $route, '/' ) . '</code>',
     
    14621462        _doing_it_wrong(
    14631463            __FUNCTION__,
    1464             /* translators: 1. Parameter. 2. List of allowed types. */
     1464            /* translators: 1: Parameter, 2: List of allowed types. */
    14651465            wp_sprintf( __( 'The "type" schema keyword for %1$s can only contain the built-in types: %2$l.' ), $param, $allowed_types ),
    14661466            '5.5.0'
     
    15611561
    15621562    if ( ! isset( $args['type'] ) ) {
    1563         /* translators: 1. Parameter */
     1563        /* translators: %s: Parameter. */
    15641564        _doing_it_wrong( __FUNCTION__, sprintf( __( 'The "type" schema keyword for %s is required.' ), $param ), '5.5.0' );
    15651565    }
     
    15791579        _doing_it_wrong(
    15801580            __FUNCTION__,
    1581             /* translators: 1. Parameter 2. The list of allowed types. */
     1581            /* translators: 1: Parameter, 2: The list of allowed types. */
    15821582            wp_sprintf( __( 'The "type" schema keyword for %1$s can only be on of the built-in types: %2$l.' ), $param, $allowed_types ),
    15831583            '5.5.0'
     
    16131613
    16141614        if ( ! empty( $args['uniqueItems'] ) && ! rest_validate_array_contains_unique_items( $value ) ) {
    1615             /* translators: 1: Parameter */
     1615            /* translators: 1: Parameter. */
    16161616            return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s has duplicate items.' ), $param ) );
    16171617        }
     
    17651765            case 'uuid':
    17661766                if ( ! wp_is_uuid( $value ) ) {
    1767                     /* translators: %s is the name of a JSON field expecting a valid uuid. */
     1767                    /* translators: %s: The name of a JSON field expecting a valid UUID. */
    17681768                    return new WP_Error( 'rest_invalid_uuid', sprintf( __( '%s is not a valid UUID.' ), $param ) );
    17691769                }
     
    18321832
    18331833    if ( ! isset( $args['type'] ) ) {
    1834         /* translators: 1. Parameter */
     1834        /* translators: %s: Parameter. */
    18351835        _doing_it_wrong( __FUNCTION__, sprintf( __( 'The "type" schema keyword for %s is required.' ), $param ), '5.5.0' );
    18361836    }
     
    18491849        _doing_it_wrong(
    18501850            __FUNCTION__,
    1851             /* translators: 1. Parameter. 2. The list of allowed types. */
     1851            /* translators: 1: Parameter, 2: The list of allowed types. */
    18521852            wp_sprintf( __( 'The "type" schema keyword for %1$s can only be on of the built-in types: %2$l.' ), $param, $allowed_types ),
    18531853            '5.5.0'
     
    18651865
    18661866        if ( ! empty( $args['uniqueItems'] ) && ! rest_validate_array_contains_unique_items( $value ) ) {
    1867             /* translators: 1: Parameter */
     1867            /* translators: 1: Parameter. */
    18681868            return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s has duplicate items.' ), $param ) );
    18691869        }
  • trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php

    r48613 r48765  
    23812381                    'register_taxonomy',
    23822382                    sprintf(
    2383                         /* translators: 1. The taxonomy name, 2. The property name, either 'rest_base' or 'name', 3. The conflicting value. */
     2383                        /* translators: 1: The taxonomy name, 2: The property name, either 'rest_base' or 'name', 3: The conflicting value. */
    23842384                        __( 'The "%1$s" taxonomy "%2$s" property (%3$s) conflicts with an existing property on the REST API Posts Controller. Specify a custom "rest_base" when registering the taxonomy to avoid this error.' ),
    23852385                        $taxonomy->name,
Note: See TracChangeset for help on using the changeset viewer.