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
This commit is contained in:
Sergey Biryukov 2021-02-07 12:44:04 +00:00
parent 48469c6a8f
commit b88325dbc6
12 changed files with 40 additions and 29 deletions

View File

@ -41,8 +41,8 @@ get_current_screen()->add_help_tab(
);
$privacy_policy_guide = '<p>' . 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 <a href="%1$s">Privacy Policy Guide</a>.' ),
/* 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 <a href="%s">Privacy Policy Guide</a>.' ),
admin_url( 'options-privacy.php?tab=policyguide' )
) . '</p>';

View File

@ -41,8 +41,8 @@ get_current_screen()->add_help_tab(
);
$privacy_policy_guide = '<p>' . 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 <a href="%1$s">Privacy Policy Guide</a>.' ),
/* 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 <a href="%s">Privacy Policy Guide</a>.' ),
admin_url( 'options-privacy.php?tab=policyguide' )
) . '</p>';

View File

@ -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 {

View File

@ -1403,8 +1403,8 @@ function wp_print_community_events_templates() {
<li class="event-none">
<?php
printf(
/* translators: 1: Localized meetup organization documentation URL. */
__( 'Want more events? <a href="%1$s">Help organize the next one</a>!' ),
/* translators: %s: Localized meetup organization documentation URL. */
__( 'Want more events? <a href="%s">Help organize the next one</a>!' ),
__( 'https://make.wordpress.org/community/organize-event-landing-page/' )
);
?>

View File

@ -623,7 +623,7 @@ endif;
</div>
<p class="description">
<?php
/* translators: 1: User's display name. */
/* translators: %s: User's display name. */
printf( __( 'Send %s a link to reset their password. This will not change their password, nor will it force a change.' ), esc_html( $profileuser->display_name ) );
?>
</p>

View File

@ -22,8 +22,8 @@
printf(
'<p>' . wp_kses(
/* translators: 1: Link to WP admin new post page. */
__( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentynineteen' ),
/* translators: %s: Link to WP admin new post page. */
__( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentynineteen' ),
array(
'a' => array(
'href' => array(),

View File

@ -39,8 +39,8 @@
<?php
printf(
'<p>' . wp_kses(
/* translators: 1: Link to WP admin new post page. */
__( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'twentytwentyone' ),
/* translators: %s: Link to WP admin new post page. */
__( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwentyone' ),
array(
'a' => array(
'href' => array(),

View File

@ -12,14 +12,25 @@
<div class="author-bio <?php echo get_option( 'show_avatars' ) ? 'show-avatars' : ''; ?>">
<?php echo get_avatar( get_the_author_meta( 'ID' ), '85' ); ?>
<div class="author-bio-content">
<h2 class="author-title"><?php printf( /* translators: 1: Author name. */ esc_html__( 'By %s', 'twentytwentyone' ), get_the_author() ); ?></h2>
<h2 class="author-title">
<?php
printf(
/* translators: %s: Author name. */
esc_html__( 'By %s', 'twentytwentyone' ),
get_the_author()
);
?>
</h2>
<p class="author-description"> <?php the_author_meta( 'description' ); ?></p><!-- .author-description -->
<?php
printf(
/* translators: 1: Link to authors posts. 2: Author name. */
'<a class="author-link" href="%1$s" rel="author">' . esc_html__( 'View all of %2$s\'s posts.', 'twentytwentyone' ) . '</a>',
'<a class="author-link" href="%1$s" rel="author">%2$s</a>',
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()
)
);
?>
</div><!-- .author-bio-content -->

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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.