From e0bda3a7042cb228fbf26bd3253638194717f34f Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 2 Feb 2021 12:17:04 +0000 Subject: [PATCH] Users: Use consistent strings for error messages in `wp-admin/users.php`. Use `_n()` for a string with plural forms. Follow-up to [50129]. See #34281. Built from https://develop.svn.wordpress.org/trunk@50139 git-svn-id: http://core.svn.wordpress.org/trunk@49818 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/users.php | 8 ++++---- wp-includes/version.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-admin/users.php b/wp-admin/users.php index 3828b36561..87bfe90cf8 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -211,7 +211,7 @@ switch ( $wp_list_table->current_action() ) { case 'resetpassword': check_admin_referer( 'bulk-users' ); if ( ! current_user_can( 'edit_users' ) ) { - $errors = new WP_Error( 'edit_users', __( 'You can’t edit users.' ) ); + $errors = new WP_Error( 'edit_users', __( 'Sorry, you are not allowed to edit users.' ) ); } if ( empty( $_REQUEST['users'] ) ) { wp_redirect( $redirect ); @@ -223,7 +223,7 @@ switch ( $wp_list_table->current_action() ) { foreach ( $userids as $id ) { if ( ! current_user_can( 'edit_user', $id ) ) { - wp_die( __( 'You can’t edit that user.' ) ); + wp_die( __( 'Sorry, you are not allowed to edit this user.' ) ); } if ( $id === $current_user->ID ) { @@ -552,9 +552,9 @@ switch ( $wp_list_table->current_action() ) { $message = __( 'Password reset link sent.' ); } else { /* translators: %s: Number of users. */ - $message = sprintf( __( 'Password reset links sent to %s users.' ), $reset_count ); + $message = _n( 'Password reset links sent to %s user.', 'Password reset links sent to %s users.', $reset_count ); } - $messages[] = '

' . $message . '

'; + $messages[] = '

' . sprintf( $message, number_format_i18n( $reset_count ) ) . '

'; break; case 'promote': $messages[] = '

' . __( 'Changed roles.' ) . '

'; diff --git a/wp-includes/version.php b/wp-includes/version.php index ca93fefa6f..adf2f7754c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-alpha-50138'; +$wp_version = '5.7-alpha-50139'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.