mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@50234 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -60,8 +60,8 @@ final class WP_Block_Pattern_Categories_Registry {
|
||||
*/
|
||||
public function unregister( $category_name ) {
|
||||
if ( ! $this->is_registered( $category_name ) ) {
|
||||
/* translators: 1: Block pattern name. */
|
||||
$message = sprintf( __( 'Block pattern category "%1$s" not found.' ), $category_name );
|
||||
/* translators: %s: Block pattern name. */
|
||||
$message = sprintf( __( 'Block pattern category "%s" not found.' ), $category_name );
|
||||
_doing_it_wrong( __METHOD__, $message, '5.5.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -73,8 +73,8 @@ final class WP_Block_Patterns_Registry {
|
||||
*/
|
||||
public function unregister( $pattern_name ) {
|
||||
if ( ! $this->is_registered( $pattern_name ) ) {
|
||||
/* translators: 1: Pattern name. */
|
||||
$message = sprintf( __( 'Pattern "%1$s" not found.' ), $pattern_name );
|
||||
/* translators: %s: Pattern name. */
|
||||
$message = sprintf( __( 'Pattern "%s" not found.' ), $pattern_name );
|
||||
_doing_it_wrong( __METHOD__, $message, '5.5.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1785,8 +1785,8 @@ function rest_get_combining_operation_error( $value, $param, $errors ) {
|
||||
return new WP_Error( 'rest_no_matching_schema', wp_sprintf( __( '%1$s is not a valid %2$l.' ), $param, $schema_titles ) );
|
||||
}
|
||||
|
||||
/* translators: 1: Parameter. */
|
||||
return new WP_Error( 'rest_no_matching_schema', sprintf( __( '%1$s does not match any of the expected formats.' ), $param ) );
|
||||
/* translators: %s: Parameter. */
|
||||
return new WP_Error( 'rest_no_matching_schema', sprintf( __( '%s does not match any of the expected formats.' ), $param ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1889,8 +1889,8 @@ function rest_find_one_matching_schema( $value, $args, $param, $stop_after_first
|
||||
|
||||
return new WP_Error(
|
||||
'rest_one_of_multiple_matches',
|
||||
/* translators: 1: Parameter. */
|
||||
sprintf( __( '%1$s matches more than one of the expected formats.' ), $param ),
|
||||
/* translators: %s: Parameter. */
|
||||
sprintf( __( '%s matches more than one of the expected formats.' ), $param ),
|
||||
array( 'positions' => $schema_positions )
|
||||
);
|
||||
}
|
||||
@@ -2380,8 +2380,8 @@ function rest_validate_array_value_from_schema( $value, $args, $param ) {
|
||||
}
|
||||
|
||||
if ( ! empty( $args['uniqueItems'] ) && ! rest_validate_array_contains_unique_items( $value ) ) {
|
||||
/* translators: 1: Parameter. */
|
||||
return new WP_Error( 'rest_duplicate_items', sprintf( __( '%1$s has duplicate items.' ), $param ) );
|
||||
/* translators: %s: Parameter. */
|
||||
return new WP_Error( 'rest_duplicate_items', sprintf( __( '%s has duplicate items.' ), $param ) );
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -2682,8 +2682,8 @@ function rest_sanitize_value_from_schema( $value, $args, $param = '' ) {
|
||||
}
|
||||
|
||||
if ( ! empty( $args['uniqueItems'] ) && ! rest_validate_array_contains_unique_items( $value ) ) {
|
||||
/* translators: 1: Parameter. */
|
||||
return new WP_Error( 'rest_duplicate_items', sprintf( __( '%1$s has duplicate items.' ), $param ) );
|
||||
/* translators: %s: Parameter. */
|
||||
return new WP_Error( 'rest_duplicate_items', sprintf( __( '%s has duplicate items.' ), $param ) );
|
||||
}
|
||||
|
||||
return $value;
|
||||
|
||||
Reference in New Issue
Block a user