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

See #50767.

git-svn-id: https://develop.svn.wordpress.org/trunk@48765 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-08-09 01:44:29 +00:00
parent 18c0692773
commit f09aab7232
3 changed files with 11 additions and 11 deletions

View File

@ -75,7 +75,7 @@ final class WP_Recovery_Mode_Email_Service {
}
$err_message = sprintf(
/* translators: 1. Last sent as a human time diff, 2. Wait time as a human time diff. */
/* translators: 1: Last sent as a human time diff, 2: Wait time as a human time diff. */
__( 'A recovery link was already sent %1$s ago. Please wait another %2$s before requesting a new email.' ),
human_time_diff( $last_sent ),
human_time_diff( $last_sent + $rate_limit )

View File

@ -93,7 +93,7 @@ function register_rest_route( $namespace, $route, $args = array(), $override = f
_doing_it_wrong(
__FUNCTION__,
sprintf(
/* translators: 1. The REST API route being registered. 2. The argument name. 3. The suggested function name. */
/* translators: 1: The REST API route being registered, 2: The argument name, 3: The suggested function name. */
__( '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.' ),
'<code>' . $clean_namespace . '/' . trim( $route, '/' ) . '</code>',
'<code>permission_callback</code>',
@ -1461,7 +1461,7 @@ function rest_handle_multi_type_schema( $value, $args, $param = '' ) {
if ( $invalid_types ) {
_doing_it_wrong(
__FUNCTION__,
/* translators: 1. Parameter. 2. List of allowed types. */
/* translators: 1: Parameter, 2: List of allowed types. */
wp_sprintf( __( 'The "type" schema keyword for %1$s can only contain the built-in types: %2$l.' ), $param, $allowed_types ),
'5.5.0'
);
@ -1560,7 +1560,7 @@ function rest_validate_value_from_schema( $value, $args, $param = '' ) {
$allowed_types = array( 'array', 'object', 'string', 'number', 'integer', 'boolean', 'null' );
if ( ! isset( $args['type'] ) ) {
/* translators: 1. Parameter */
/* translators: %s: Parameter. */
_doing_it_wrong( __FUNCTION__, sprintf( __( 'The "type" schema keyword for %s is required.' ), $param ), '5.5.0' );
}
@ -1578,7 +1578,7 @@ function rest_validate_value_from_schema( $value, $args, $param = '' ) {
if ( ! in_array( $args['type'], $allowed_types, true ) ) {
_doing_it_wrong(
__FUNCTION__,
/* translators: 1. Parameter 2. The list of allowed types. */
/* translators: 1: Parameter, 2: The list of allowed types. */
wp_sprintf( __( 'The "type" schema keyword for %1$s can only be on of the built-in types: %2$l.' ), $param, $allowed_types ),
'5.5.0'
);
@ -1612,7 +1612,7 @@ function rest_validate_value_from_schema( $value, $args, $param = '' ) {
}
if ( ! empty( $args['uniqueItems'] ) && ! rest_validate_array_contains_unique_items( $value ) ) {
/* translators: 1: Parameter */
/* translators: 1: Parameter. */
return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s has duplicate items.' ), $param ) );
}
}
@ -1764,7 +1764,7 @@ function rest_validate_value_from_schema( $value, $args, $param = '' ) {
break;
case 'uuid':
if ( ! wp_is_uuid( $value ) ) {
/* translators: %s is the name of a JSON field expecting a valid uuid. */
/* translators: %s: The name of a JSON field expecting a valid UUID. */
return new WP_Error( 'rest_invalid_uuid', sprintf( __( '%s is not a valid UUID.' ), $param ) );
}
break;
@ -1831,7 +1831,7 @@ function rest_sanitize_value_from_schema( $value, $args, $param = '' ) {
$allowed_types = array( 'array', 'object', 'string', 'number', 'integer', 'boolean', 'null' );
if ( ! isset( $args['type'] ) ) {
/* translators: 1. Parameter */
/* translators: %s: Parameter. */
_doing_it_wrong( __FUNCTION__, sprintf( __( 'The "type" schema keyword for %s is required.' ), $param ), '5.5.0' );
}
@ -1848,7 +1848,7 @@ function rest_sanitize_value_from_schema( $value, $args, $param = '' ) {
if ( ! in_array( $args['type'], $allowed_types, true ) ) {
_doing_it_wrong(
__FUNCTION__,
/* translators: 1. Parameter. 2. The list of allowed types. */
/* translators: 1: Parameter, 2: The list of allowed types. */
wp_sprintf( __( 'The "type" schema keyword for %1$s can only be on of the built-in types: %2$l.' ), $param, $allowed_types ),
'5.5.0'
);
@ -1864,7 +1864,7 @@ function rest_sanitize_value_from_schema( $value, $args, $param = '' ) {
}
if ( ! empty( $args['uniqueItems'] ) && ! rest_validate_array_contains_unique_items( $value ) ) {
/* translators: 1: Parameter */
/* translators: 1: Parameter. */
return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s has duplicate items.' ), $param ) );
}

View File

@ -2380,7 +2380,7 @@ class WP_REST_Posts_Controller extends WP_REST_Controller {
_doing_it_wrong(
'register_taxonomy',
sprintf(
/* translators: 1. The taxonomy name, 2. The property name, either 'rest_base' or 'name', 3. The conflicting value. */
/* translators: 1: The taxonomy name, 2: The property name, either 'rest_base' or 'name', 3: The conflicting value. */
__( '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.' ),
$taxonomy->name,
$taxonomy_field_name_with_conflict,