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
This commit is contained in:
parent
9a64276184
commit
e0bda3a704
|
@ -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>';
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue