mirror of
git://develop.git.wordpress.org/
synced 2025-02-22 15:42:29 +01:00
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
This commit is contained in:
parent
97d15fc6e0
commit
d331daa9a0
@ -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[] = '<div id="message" class="updated notice is-dismissible"><p>' . $message . '</p></div>';
|
||||
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . sprintf( $message, number_format_i18n( $reset_count ) ) . '</p></div>';
|
||||
break;
|
||||
case 'promote':
|
||||
$messages[] = '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Changed roles.' ) . '</p></div>';
|
||||
|
Loading…
x
Reference in New Issue
Block a user