Changeset 39238
- Timestamp:
- 11/15/2016 04:27:49 AM (8 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/rest-api.php
r39222 r39238 1050 1050 case 'ipv4' : 1051 1051 if ( ! rest_is_ip_address( $value ) ) { 1052 return new WP_Error( 'rest_invalid_param', sprintf( __( '%s is not a valid IP address.' ), $value ) );1052 return new WP_Error( 'rest_invalid_param', sprintf( __( /* translators: %s: IP address */ '%s is not a valid IP address.' ), $value ) ); 1053 1053 } 1054 1054 break; … … 1059 1059 if ( isset( $args['minimum'] ) && ! isset( $args['maximum'] ) ) { 1060 1060 if ( ! empty( $args['exclusiveMinimum'] ) && $value <= $args['minimum'] ) { 1061 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be greater than %2$d (exclusive)' ), $param, $args['minimum'] ) );1061 return new WP_Error( 'rest_invalid_param', sprintf( __( /* translators: 1: parameter, 2: minimum number */ '%1$s must be greater than %2$d (exclusive)' ), $param, $args['minimum'] ) ); 1062 1062 } elseif ( empty( $args['exclusiveMinimum'] ) && $value < $args['minimum'] ) { 1063 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be greater than %2$d (inclusive)' ), $param, $args['minimum'] ) );1063 return new WP_Error( 'rest_invalid_param', sprintf( __( /* translators: 1: parameter, 2: minimum number */ '%1$s must be greater than %2$d (inclusive)' ), $param, $args['minimum'] ) ); 1064 1064 } 1065 1065 } elseif ( isset( $args['maximum'] ) && ! isset( $args['minimum'] ) ) { 1066 1066 if ( ! empty( $args['exclusiveMaximum'] ) && $value >= $args['maximum'] ) { 1067 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be less than %2$d (exclusive)' ), $param, $args['maximum'] ) );1067 return new WP_Error( 'rest_invalid_param', sprintf( __( /* translators: 1: parameter, 2: maximum number */ '%1$s must be less than %2$d (exclusive)' ), $param, $args['maximum'] ) ); 1068 1068 } elseif ( empty( $args['exclusiveMaximum'] ) && $value > $args['maximum'] ) { 1069 return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must be less than %2$d (inclusive)' ), $param, $args['maximum'] ) );1069 return new WP_Error( 'rest_invalid_param', sprintf( __( /* translators: 1: parameter, 2: maximum number */ '%1$s must be less than %2$d (inclusive)' ), $param, $args['maximum'] ) ); 1070 1070 } 1071 1071 } elseif ( isset( $args['maximum'] ) && isset( $args['minimum'] ) ) { -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
r39223 r39238 1224 1224 foreach ( $avatar_sizes as $size ) { 1225 1225 $avatar_properties[ $size ] = array( 1226 'description' => sprintf( __( 'Avatar URL with image size of %d pixels.' ), $size ),1226 'description' => sprintf( __( /* translators: %d: avatar image size in pixels */ 'Avatar URL with image size of %d pixels.' ), $size ), 1227 1227 'type' => 'string', 1228 1228 'format' => 'uri', -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
r39182 r39238 1934 1934 $base = ! empty( $taxonomy->rest_base ) ? $taxonomy->rest_base : $taxonomy->name; 1935 1935 $schema['properties'][ $base ] = array( 1936 'description' => sprintf( __( 'The terms assigned to the object in the %s taxonomy.' ), $taxonomy->name ),1936 'description' => sprintf( __( /* translators: %s: taxonomy name */ 'The terms assigned to the object in the %s taxonomy.' ), $taxonomy->name ), 1937 1937 'type' => 'array', 1938 1938 'items' => array( … … 2089 2089 2090 2090 $params[ $base ] = array( 2091 'description' => sprintf( __( 'Limit result set to all items that have the specified term assigned in the %s taxonomy.' ), $base ),2091 'description' => sprintf( __( /* translators: %s: taxonomy name */ 'Limit result set to all items that have the specified term assigned in the %s taxonomy.' ), $base ), 2092 2092 'type' => 'array', 2093 2093 'items' => array( … … 2098 2098 2099 2099 $params[ $base . '_exclude' ] = array( 2100 'description' => sprintf( __( 'Limit result set to all items except those that have the specified term assigned in the %s taxonomy.' ), $base ),2100 'description' => sprintf( __( /* translators: %s: taxonomy name */ 'Limit result set to all items except those that have the specified term assigned in the %s taxonomy.' ), $base ), 2101 2101 'type' => 'array', 2102 2102 'items' => array( -
trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php
r39223 r39238 975 975 976 976 if ( ! isset( $wp_roles->role_objects[ $role ] ) ) { 977 return new WP_Error( 'rest_user_invalid_role', sprintf( __( 'The role %s does not exist.' ), $role ), array( 'status' => 400 ) );977 return new WP_Error( 'rest_user_invalid_role', sprintf( __( /* translators: %s: role key */ 'The role %s does not exist.' ), $role ), array( 'status' => 400 ) ); 978 978 } 979 979 … … 1207 1207 foreach ( $avatar_sizes as $size ) { 1208 1208 $avatar_properties[ $size ] = array( 1209 'description' => sprintf( __( 'Avatar URL with image size of %d pixels.' ), $size ),1209 'description' => sprintf( __( /* translators: %d: avatar image size in pixels */ 'Avatar URL with image size of %d pixels.' ), $size ), 1210 1210 'type' => 'string', 1211 1211 'format' => 'uri', -
trunk/src/wp-includes/rest-api/fields/class-wp-rest-meta-fields.php
r39222 r39238 177 177 return new WP_Error( 178 178 'rest_cannot_delete', 179 sprintf( __( 'You do not have permission to edit the %s custom field.' ), $name ),179 sprintf( __( /* translators: %s: custom field key */ 'You do not have permission to edit the %s custom field.' ), $name ), 180 180 array( 'key' => $name, 'status' => rest_authorization_required_code() ) 181 181 ); … … 211 211 return new WP_Error( 212 212 'rest_cannot_update', 213 sprintf( __( 'You do not have permission to edit the %s custom field.' ), $name ),213 sprintf( __( /* translators: %s: custom field key */ 'You do not have permission to edit the %s custom field.' ), $name ), 214 214 array( 'key' => $name, 'status' => rest_authorization_required_code() ) 215 215 ); … … 281 281 return new WP_Error( 282 282 'rest_cannot_update', 283 sprintf( __( 'You do not have permission to edit the %s custom field.' ), $name ),283 sprintf( __( /* translators: %s: custom field key */ 'You do not have permission to edit the %s custom field.' ), $name ), 284 284 array( 'key' => $name, 'status' => rest_authorization_required_code() ) 285 285 );
Note: See TracChangeset
for help on using the changeset viewer.