Singular and plural strings for bulk user delete. Props nacin. fixes #16360

git-svn-id: http://svn.automattic.com/wordpress/trunk@17673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2011-04-21 16:48:12 +00:00
parent 9a003fc529
commit 8515d203d3
1 changed files with 6 additions and 6 deletions

View File

@ -150,7 +150,7 @@ case 'delete':
if ( empty($_REQUEST['users']) ) if ( empty($_REQUEST['users']) )
$userids = array(intval($_REQUEST['user'])); $userids = array(intval($_REQUEST['user']));
else else
$userids = $_REQUEST['users']; $userids = (array) $_REQUEST['users'];
include ('admin-header.php'); include ('admin-header.php');
?> ?>
@ -161,24 +161,24 @@ case 'delete':
<div class="wrap"> <div class="wrap">
<?php screen_icon(); ?> <?php screen_icon(); ?>
<h2><?php _e('Delete Users'); ?></h2> <h2><?php _e('Delete Users'); ?></h2>
<p><?php _e('You have specified these users for deletion:'); ?></p> <p><?php echo _n( 'You have specified this user for deletion:', 'You have specified these users for deletion:', count( $userids ) ); ?></p>
<ul> <ul>
<?php <?php
$go_delete = false; $go_delete = 0;
foreach ( (array) $userids as $id ) { foreach ( $userids as $id ) {
$id = (int) $id; $id = (int) $id;
$user = new WP_User($id); $user = new WP_User($id);
if ( $id == $current_user->ID ) { if ( $id == $current_user->ID ) {
echo "<li>" . sprintf(__('ID #%1s: %2s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n"; echo "<li>" . sprintf(__('ID #%1s: %2s <strong>The current user will not be deleted.</strong>'), $id, $user->user_login) . "</li>\n";
} else { } else {
echo "<li><input type=\"hidden\" name=\"users[]\" value=\"" . esc_attr($id) . "\" />" . sprintf(__('ID #%1s: %2s'), $id, $user->user_login) . "</li>\n"; echo "<li><input type=\"hidden\" name=\"users[]\" value=\"" . esc_attr($id) . "\" />" . sprintf(__('ID #%1s: %2s'), $id, $user->user_login) . "</li>\n";
$go_delete = true; $go_delete++;
} }
} }
?> ?>
</ul> </ul>
<?php if ( $go_delete ) : ?> <?php if ( $go_delete ) : ?>
<fieldset><p><legend><?php _e('What should be done with posts and links owned by this user?'); ?></legend></p> <fieldset><p><legend><?php echo _n( 'What should be done with posts and links owned by this user?', 'What should be done with posts and links owned by these users?', $go_delete ); ?></legend></p>
<ul style="list-style:none;"> <ul style="list-style:none;">
<li><label><input type="radio" id="delete_option0" name="delete_option" value="delete" checked="checked" /> <li><label><input type="radio" id="delete_option0" name="delete_option" value="delete" checked="checked" />
<?php _e('Delete all posts and links.'); ?></label></li> <?php _e('Delete all posts and links.'); ?></label></li>