Differentiate spam strings by subject: comments, sites, and users. Props dimadin. Fixes #13199

git-svn-id: http://svn.automattic.com/wordpress/trunk@14407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nbachiyski 2010-05-03 20:37:07 +00:00
parent 0cd84fba21
commit bebd1b8ea6
5 changed files with 23 additions and 23 deletions

View File

@ -316,12 +316,12 @@ $page_links = paginate_links( array(
<option value="approve"><?php _e('Approve'); ?></option>
<?php endif; ?>
<?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?>
<option value="spam"><?php _e('Mark as Spam'); ?></option>
<option value="spam"><?php echo _x('Mark as Spam', 'comment'); ?></option>
<?php endif; ?>
<?php if ( 'trash' == $comment_status ): ?>
<option value="untrash"><?php _e('Restore'); ?></option>
<?php elseif ( 'spam' == $comment_status ): ?>
<option value="unspam"><?php _e('Not Spam'); ?></option>
<option value="unspam"><?php echo _x('Not Spam', 'comment'); ?></option>
<?php endif; ?>
<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
<option value="delete"><?php _e('Delete Permanently'); ?></option>
@ -413,7 +413,7 @@ if ( $page_links )
<option value="approve"><?php _e('Approve'); ?></option>
<?php endif; ?>
<?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?>
<option value="spam"><?php _e('Mark as Spam'); ?></option>
<option value="spam"><?php echo _x('Mark as Spam', 'comment'); ?></option>
<?php endif; ?>
<?php if ( 'trash' == $comment_status ): ?>
<option value="untrash"><?php _e('Restore'); ?></option>
@ -421,7 +421,7 @@ if ( $page_links )
<?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
<option value="delete"><?php _e('Delete Permanently'); ?></option>
<?php elseif ( 'spam' == $comment_status ): ?>
<option value="unspam"><?php _e('Not Spam'); ?></option>
<option value="unspam"><?php echo _x('Not Spam', 'comment'); ?></option>
<?php else: ?>
<option value="trash"><?php _e('Move to Trash'); ?></option>
<?php endif; ?>

View File

@ -328,7 +328,7 @@ function wp_dashboard_right_now() {
// Spam Comments
$num = number_format_i18n($num_comm->spam);
$text = _n( 'Spam', 'Spam', $num_comm->spam );
$text = _nx( 'Spam', 'Spam', $num_comm->spam, 'comment' );
if ( current_user_can( 'moderate_comments' ) ) {
$num = "<a href='edit-comments.php?comment_status=spam'><span class='spam-count'>$num</span></a>";
$text = "<a class='spam' href='edit-comments.php?comment_status=spam'>$text</a>";

View File

@ -2110,7 +2110,7 @@ function _wp_comment_row( $comment_id, $mode, $comment_status, $checkbox = true,
if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
$actions['spam'] = "<a href='$spam_url' class='delete:the-comment-list:comment-$comment->comment_ID::spam=1 vim-s vim-destructive' title='" . esc_attr__( 'Mark this comment as spam' ) . "'>" . /* translators: mark as spam link */ _x( 'Spam', 'verb' ) . '</a>';
} elseif ( 'spam' == $the_comment_status ) {
$actions['unspam'] = "<a href='$unspam_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1 vim-z vim-destructive'>" . __( 'Not Spam' ) . '</a>';
$actions['unspam'] = "<a href='$unspam_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:unspam=1 vim-z vim-destructive'>" . _x( 'Not Spam', 'comment' ) . '</a>';
} elseif ( 'trash' == $the_comment_status ) {
$actions['untrash'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1 vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';
}

View File

@ -113,7 +113,7 @@ switch ( $action ) {
<?php } ?>
</tr>
<tr class="form-field">
<th scope="row"><?php _e( 'Registered') ?></th>
<th scope="row"><?php echo _x( 'Registered', 'site' ) ?></th>
<td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ) ?>" size="40" /></td>
</tr>
<tr class="form-field">
@ -124,7 +124,7 @@ switch ( $action ) {
$radio_fields = array( 'public' => __( 'Public' ) );
if ( ! $is_main_site ) {
$radio_fields['archived'] = __( 'Archived' );
$radio_fields['spam'] = __( 'Spam' );
$radio_fields['spam'] = _x( 'Spam', 'site' );
$radio_fields['deleted'] = __( 'Deleted' );
}
$radio_fields['mature'] = __( 'Mature' );
@ -414,8 +414,8 @@ switch ( $action ) {
<select name="action">
<option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option>
<option value="delete"><?php _e( 'Delete' ); ?></option>
<option value="spam"><?php _e( 'Mark as Spam' ); ?></option>
<option value="notspam"><?php _e( 'Not Spam' ); ?></option>
<option value="spam"><?php echo _x( 'Mark as Spam', 'site' ); ?></option>
<option value="notspam"><?php echo _x( 'Not Spam', 'site' ); ?></option>
</select>
<input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" />
<?php wp_nonce_field( 'bulk-ms-sites' ); ?>
@ -448,7 +448,7 @@ switch ( $action ) {
'id' => __( 'ID' ),
'blogname' => $blogname_columns,
'lastupdated' => __( 'Last Updated'),
'registered' => __( 'Registered' ),
'registered' => _x( 'Registered', 'site' ),
'users' => __( 'Users' )
);
@ -489,7 +489,7 @@ switch ( $action ) {
</tfoot>
<tbody id="the-site-list" class="list:site">
<?php
$status_list = array( 'archived' => array( 'site-archived', __( 'Archived' ) ), 'spam' => array( 'site-spammed', __( 'Spam' ) ), 'deleted' => array( 'site-deleted', __( 'Deleted' ) ), 'mature' => array( 'site-mature', __( 'Mature' ) ) );
$status_list = array( 'archived' => array( 'site-archived', __( 'Archived' ) ), 'spam' => array( 'site-spammed', _x( 'Spam', 'site' ) ), 'deleted' => array( 'site-deleted', __( 'Deleted' ) ), 'mature' => array( 'site-mature', __( 'Mature' ) ) );
if ( $blog_list ) {
$class = '';
foreach ( $blog_list as $blog ) {
@ -534,7 +534,7 @@ switch ( $action ) {
<a href="<?php echo esc_url( admin_url( 'ms-sites.php?action=editblog&amp;id=' . $blog['blog_id'] ) ); ?>" class="edit"><?php echo $blogname . $blog_state; ?></a>
<?php
if ( 'list' != $mode )
echo '<p>' . sprintf( _x( '%1$s &#8211; <em>%2$s', '%1$s: site name. %2$s: site tagline.' ), get_blog_option( $blog['blog_id'], 'blogname' ), get_blog_option( $blog['blog_id'], 'blogdescription ' ) ) . '</em></p>';
echo '<p>' . sprintf( _x( '%1$s &#8211; <em>%2$s</em>', '%1$s: site name. %2$s: site tagline.' ), get_blog_option( $blog['blog_id'], 'blogname' ), get_blog_option( $blog['blog_id'], 'blogdescription ' ) ) . '</p>';
// Preordered.
$actions = array(
@ -557,12 +557,12 @@ switch ( $action ) {
if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' )
$actions['unarchive'] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=unarchiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unarchive the site %s.' ), $blogname ) ) ) ) . '">' . __( 'Unarchive' ) . '</a></span>';
else
$actions['archive'] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=archiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to archive the site %s.' ), $blogname ) ) ) ) . '">' . __( 'Archive' ) . '</a></span>';
$actions['archive'] = '<span class="archive"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=archiveblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to archive the site %s.' ), $blogname ) ) ) ) . '">' . _x( 'Archive', 'verb; site' ) . '</a></span>';
if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' )
$actions['unspam'] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=unspamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unspam the site %s.' ), $blogname ) ) ) ) . '">' . __( 'Not Spam' ) . '</a></span>';
$actions['unspam'] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=unspamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to unspam the site %s.' ), $blogname ) ) ) ) . '">' . _x( 'Not Spam', 'site' ) . '</a></span>';
else
$actions['spam'] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=spamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to mark the site %s as spam.' ), $blogname ) ) ) ) . '">' . __( 'Spam' ) . '</a></span>';
$actions['spam'] = '<span class="spam"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=spamblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to mark the site %s as spam.' ), $blogname ) ) ) ) . '">' . _x( 'Spam', 'site' ) . '</a></span>';
$actions['delete'] = '<span class="delete"><a href="' . esc_url( admin_url( 'ms-edit.php?action=confirm&amp;action2=deleteblog&amp;id=' . $blog['blog_id'] . '&amp;msg=' . urlencode( sprintf( __( 'You are about to delete the site %s.' ), $blogname ) ) ) ) . '">' . __( 'Delete' ) . '</a></span>';
}
@ -665,8 +665,8 @@ switch ( $action ) {
<select name="action2">
<option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option>
<option value="delete"><?php _e( 'Delete' ); ?></option>
<option value="spam"><?php _e( 'Mark as Spam' ); ?></option>
<option value="notspam"><?php _e( 'Not Spam' ); ?></option>
<option value="spam"><?php echo _x( 'Mark as Spam', 'site' ); ?></option>
<option value="notspam"><?php echo _x( 'Not Spam', 'site' ); ?></option>
</select>
<input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
</div>

View File

@ -130,8 +130,8 @@ if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['
<select name="action">
<option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option>
<option value="delete"><?php _e( 'Delete' ); ?></option>
<option value="spam"><?php _e( 'Mark as Spam' ); ?></option>
<option value="notspam"><?php _e( 'Not Spam' ); ?></option>
<option value="spam"><?php echo _x( 'Mark as Spam', 'user' ); ?></option>
<option value="notspam"><?php echo _x( 'Not Spam', 'user' ); ?></option>
</select>
<input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" />
<?php wp_nonce_field( 'bulk-ms-users' ); ?>
@ -162,7 +162,7 @@ if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['
'login' => __( 'Username' ),
'name' => __( 'Name' ),
'email' => __( 'E-mail' ),
'registered' => __( 'Registered' ),
'registered' => _x( 'Registered', 'user' ),
'blogs' => __( 'Sites' )
);
$users_columns = apply_filters( 'wpmu_users_columns', $users_columns );
@ -324,8 +324,8 @@ if ( isset( $_GET['updated'] ) && $_GET['updated'] == 'true' && ! empty( $_GET['
<select name="action2">
<option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option>
<option value="delete"><?php _e( 'Delete' ); ?></option>
<option value="spam"><?php _e( 'Mark as Spam' ); ?></option>
<option value="notspam"><?php _e( 'Not Spam' ); ?></option>
<option value="spam"><?php echo _x( 'Mark as Spam', 'user' ); ?></option>
<option value="notspam"><?php echo _x( 'Not Spam', 'user' ); ?></option>
</select>
<input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
</div>