WordPress.org

Make WordPress Core


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

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

See #50767.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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        }
Note: See TracChangeset for help on using the changeset viewer.