From d331daa9a043497430f003e4c34ca2e991f8b481 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 2 Feb 2021 12:15:22 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@50139 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/users.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/users.php b/src/wp-admin/users.php index 3828b36561..87bfe90cf8 100644 --- a/src/wp-admin/users.php +++ b/src/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.' ) . '

';