From b88325dbc69e36a7a7337319d2add2d88ce96f30 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 7 Feb 2021 12:44:04 +0000 Subject: [PATCH] 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. Built from https://develop.svn.wordpress.org/trunk@50234 git-svn-id: http://core.svn.wordpress.org/trunk@49895 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/erase-personal-data.php | 4 ++-- wp-admin/export-personal-data.php | 4 ++-- wp-admin/includes/ajax-actions.php | 2 +- wp-admin/includes/dashboard.php | 4 ++-- wp-admin/user-edit.php | 2 +- .../template-parts/content/content-none.php | 4 ++-- .../template-parts/content/content-none.php | 4 ++-- .../template-parts/post/author-bio.php | 19 +++++++++++++++---- ...s-wp-block-pattern-categories-registry.php | 4 ++-- .../class-wp-block-patterns-registry.php | 4 ++-- wp-includes/rest-api.php | 16 ++++++++-------- wp-includes/version.php | 2 +- 12 files changed, 40 insertions(+), 29 deletions(-) diff --git a/wp-admin/erase-personal-data.php b/wp-admin/erase-personal-data.php index cc731d44f1..b79b34fc12 100644 --- a/wp-admin/erase-personal-data.php +++ b/wp-admin/erase-personal-data.php @@ -41,8 +41,8 @@ get_current_screen()->add_help_tab( ); $privacy_policy_guide = '

' . sprintf( - /* translators: 1: URL to Privacy Policy Guide screen. */ - __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Eraser tool. This information may be available in the Privacy Policy Guide.' ), + /* translators: %s: URL to Privacy Policy Guide screen. */ + __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Eraser tool. This information may be available in the Privacy Policy Guide.' ), admin_url( 'options-privacy.php?tab=policyguide' ) ) . '

'; diff --git a/wp-admin/export-personal-data.php b/wp-admin/export-personal-data.php index 94dad25075..e1f4fd255f 100644 --- a/wp-admin/export-personal-data.php +++ b/wp-admin/export-personal-data.php @@ -41,8 +41,8 @@ get_current_screen()->add_help_tab( ); $privacy_policy_guide = '

' . sprintf( - /* translators: 1: URL to Privacy Policy Guide screen. */ - __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Exporter tool. This information may be available in the Privacy Policy Guide.' ), + /* translators: %s: URL to Privacy Policy Guide screen. */ + __( 'If you are not sure, check the plugin documentation or contact the plugin author to see if the plugin collects data and if it supports the Data Exporter tool. This information may be available in the Privacy Policy Guide.' ), admin_url( 'options-privacy.php?tab=policyguide' ) ) . '

'; diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 6f91c3a7ea..d1d27f704d 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -5429,7 +5429,7 @@ function wp_ajax_send_password_reset() { if ( true === $results ) { wp_send_json_success( - /* translators: 1: User's display name. */ + /* translators: %s: User's display name. */ sprintf( __( 'A password reset link was emailed to %s.' ), $user->display_name ) ); } else { diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index b475900fac..c7d6a00f44 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -1403,8 +1403,8 @@ function wp_print_community_events_templates() {
  • Help organize the next one!' ), + /* translators: %s: Localized meetup organization documentation URL. */ + __( 'Want more events? Help organize the next one!' ), __( 'https://make.wordpress.org/community/organize-event-landing-page/' ) ); ?> diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index 4b46af00e8..1df6cdd150 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -623,7 +623,7 @@ endif;

    display_name ) ); ?>

    diff --git a/wp-content/themes/twentynineteen/template-parts/content/content-none.php b/wp-content/themes/twentynineteen/template-parts/content/content-none.php index f18b5a75e7..f529814a12 100644 --- a/wp-content/themes/twentynineteen/template-parts/content/content-none.php +++ b/wp-content/themes/twentynineteen/template-parts/content/content-none.php @@ -22,8 +22,8 @@ printf( '

    ' . wp_kses( - /* translators: 1: Link to WP admin new post page. */ - __( 'Ready to publish your first post? Get started here.', 'twentynineteen' ), + /* translators: %s: Link to WP admin new post page. */ + __( 'Ready to publish your first post? Get started here.', 'twentynineteen' ), array( 'a' => array( 'href' => array(), diff --git a/wp-content/themes/twentytwentyone/template-parts/content/content-none.php b/wp-content/themes/twentytwentyone/template-parts/content/content-none.php index b724f2b37f..7d34f47adc 100644 --- a/wp-content/themes/twentytwentyone/template-parts/content/content-none.php +++ b/wp-content/themes/twentytwentyone/template-parts/content/content-none.php @@ -39,8 +39,8 @@ ' . wp_kses( - /* translators: 1: Link to WP admin new post page. */ - __( 'Ready to publish your first post? Get started here.', 'twentytwentyone' ), + /* translators: %s: Link to WP admin new post page. */ + __( 'Ready to publish your first post? Get started here.', 'twentytwentyone' ), array( 'a' => array( 'href' => array(), diff --git a/wp-content/themes/twentytwentyone/template-parts/post/author-bio.php b/wp-content/themes/twentytwentyone/template-parts/post/author-bio.php index caae0c1dfb..7920edeb51 100644 --- a/wp-content/themes/twentytwentyone/template-parts/post/author-bio.php +++ b/wp-content/themes/twentytwentyone/template-parts/post/author-bio.php @@ -12,14 +12,25 @@

    -

    +

    + +

    ' . esc_html__( 'View all of %2$s\'s posts.', 'twentytwentyone' ) . '', + '', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), - get_the_author() + sprintf( + /* translators: %s: Author name. */ + esc_html__( 'View all of %s\'s posts.', 'twentytwentyone' ), + get_the_author() + ) ); ?>
    diff --git a/wp-includes/class-wp-block-pattern-categories-registry.php b/wp-includes/class-wp-block-pattern-categories-registry.php index 44c07054d4..740ab0dc8f 100644 --- a/wp-includes/class-wp-block-pattern-categories-registry.php +++ b/wp-includes/class-wp-block-pattern-categories-registry.php @@ -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; } diff --git a/wp-includes/class-wp-block-patterns-registry.php b/wp-includes/class-wp-block-patterns-registry.php index 95756de778..a8db1e667f 100644 --- a/wp-includes/class-wp-block-patterns-registry.php +++ b/wp-includes/class-wp-block-patterns-registry.php @@ -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; } diff --git a/wp-includes/rest-api.php b/wp-includes/rest-api.php index 6eed4e2b08..4d80b5459d 100644 --- a/wp-includes/rest-api.php +++ b/wp-includes/rest-api.php @@ -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; diff --git a/wp-includes/version.php b/wp-includes/version.php index 347a2c98cc..d7c92837b5 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-beta1-50233'; +$wp_version = '5.7-beta1-50234'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.