<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[14407] trunk/wp-admin: Differentiate spam strings by subject: comments,
sites, and users.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/14407">14407</a></dd>
<dt>Author</dt> <dd>nbachiyski</dd>
<dt>Date</dt> <dd>2010-05-03 20:37:07 +0000 (Mon, 03 May 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Differentiate spam strings by subject: comments, sites, and users. Props dimadin. Fixes <a href="http://trac.wordpress.org/ticket/13199">#13199</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadmineditcommentsphp">trunk/wp-admin/edit-comments.php</a></li>
<li><a href="#trunkwpadminincludesdashboardphp">trunk/wp-admin/includes/dashboard.php</a></li>
<li><a href="#trunkwpadminincludestemplatephp">trunk/wp-admin/includes/template.php</a></li>
<li><a href="#trunkwpadminmssitesphp">trunk/wp-admin/ms-sites.php</a></li>
<li><a href="#trunkwpadminmsusersphp">trunk/wp-admin/ms-users.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmineditcommentsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-comments.php (14406 => 14407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-comments.php        2010-05-03 20:34:49 UTC (rev 14406)
+++ trunk/wp-admin/edit-comments.php        2010-05-03 20:37:07 UTC (rev 14407)
</span><span class="lines">@@ -316,12 +316,12 @@
</span><span class="cx"> <option value="approve"><?php _e('Approve'); ?></option>
</span><span class="cx"> <?php endif; ?>
</span><span class="cx"> <?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?>
</span><del>-<option value="spam"><?php _e('Mark as Spam'); ?></option>
</del><ins>+<option value="spam"><?php echo _x('Mark as Spam', 'comment'); ?></option>
</ins><span class="cx"> <?php endif; ?>
</span><span class="cx"> <?php if ( 'trash' == $comment_status ): ?>
</span><span class="cx"> <option value="untrash"><?php _e('Restore'); ?></option>
</span><span class="cx"> <?php elseif ( 'spam' == $comment_status ): ?>
</span><del>-<option value="unspam"><?php _e('Not Spam'); ?></option>
</del><ins>+<option value="unspam"><?php echo _x('Not Spam', 'comment'); ?></option>
</ins><span class="cx"> <?php endif; ?>
</span><span class="cx"> <?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
</span><span class="cx"> <option value="delete"><?php _e('Delete Permanently'); ?></option>
</span><span class="lines">@@ -413,7 +413,7 @@
</span><span class="cx"> <option value="approve"><?php _e('Approve'); ?></option>
</span><span class="cx"> <?php endif; ?>
</span><span class="cx"> <?php if ( 'all' == $comment_status || 'approved' == $comment_status || 'moderated' == $comment_status ): ?>
</span><del>-<option value="spam"><?php _e('Mark as Spam'); ?></option>
</del><ins>+<option value="spam"><?php echo _x('Mark as Spam', 'comment'); ?></option>
</ins><span class="cx"> <?php endif; ?>
</span><span class="cx"> <?php if ( 'trash' == $comment_status ): ?>
</span><span class="cx"> <option value="untrash"><?php _e('Restore'); ?></option>
</span><span class="lines">@@ -421,7 +421,7 @@
</span><span class="cx"> <?php if ( 'trash' == $comment_status || 'spam' == $comment_status || !EMPTY_TRASH_DAYS ): ?>
</span><span class="cx"> <option value="delete"><?php _e('Delete Permanently'); ?></option>
</span><span class="cx"> <?php elseif ( 'spam' == $comment_status ): ?>
</span><del>-<option value="unspam"><?php _e('Not Spam'); ?></option>
</del><ins>+<option value="unspam"><?php echo _x('Not Spam', 'comment'); ?></option>
</ins><span class="cx"> <?php else: ?>
</span><span class="cx"> <option value="trash"><?php _e('Move to Trash'); ?></option>
</span><span class="cx"> <?php endif; ?>
</span></span></pre></div>
<a id="trunkwpadminincludesdashboardphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/dashboard.php (14406 => 14407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/dashboard.php        2010-05-03 20:34:49 UTC (rev 14406)
+++ trunk/wp-admin/includes/dashboard.php        2010-05-03 20:37:07 UTC (rev 14407)
</span><span class="lines">@@ -328,7 +328,7 @@
</span><span class="cx">
</span><span class="cx">         // Spam Comments
</span><span class="cx">         $num = number_format_i18n($num_comm->spam);
</span><del>-        $text = _n( 'Spam', 'Spam', $num_comm->spam );
</del><ins>+        $text = _nx( 'Spam', 'Spam', $num_comm->spam, 'comment' );
</ins><span class="cx">         if ( current_user_can( 'moderate_comments' ) ) {
</span><span class="cx">                 $num = "<a href='edit-comments.php?comment_status=spam'><span class='spam-count'>$num</span></a>";
</span><span class="cx">                 $text = "<a class='spam' href='edit-comments.php?comment_status=spam'>$text</a>";
</span></span></pre></div>
<a id="trunkwpadminincludestemplatephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/template.php (14406 => 14407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/template.php        2010-05-03 20:34:49 UTC (rev 14406)
+++ trunk/wp-admin/includes/template.php        2010-05-03 20:37:07 UTC (rev 14407)
</span><span class="lines">@@ -2110,7 +2110,7 @@
</span><span class="cx">                                         if ( 'spam' != $the_comment_status && 'trash' != $the_comment_status ) {
</span><span class="cx">                                                 $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>';
</span><span class="cx">                                         } elseif ( 'spam' == $the_comment_status ) {
</span><del>-                                                $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>';
</del><ins>+                                                $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>';
</ins><span class="cx">                                         } elseif ( 'trash' == $the_comment_status ) {
</span><span class="cx">                                                 $actions['untrash'] = "<a href='$untrash_url' class='delete:the-comment-list:comment-$comment->comment_ID:66cc66:untrash=1 vim-z vim-destructive'>" . __( 'Restore' ) . '</a>';
</span><span class="cx">                                         }
</span></span></pre></div>
<a id="trunkwpadminmssitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-sites.php (14406 => 14407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-sites.php        2010-05-03 20:34:49 UTC (rev 14406)
+++ trunk/wp-admin/ms-sites.php        2010-05-03 20:37:07 UTC (rev 14407)
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">                                                         <?php } ?>
</span><span class="cx">                                                 </tr>
</span><span class="cx">                                                 <tr class="form-field">
</span><del>-                                                        <th scope="row"><?php _e( 'Registered') ?></th>
</del><ins>+                                                        <th scope="row"><?php echo _x( 'Registered', 'site' ) ?></th>
</ins><span class="cx">                                                         <td><input name="blog[registered]" type="text" id="blog_registered" value="<?php echo esc_attr( $details->registered ) ?>" size="40" /></td>
</span><span class="cx">                                                 </tr>
</span><span class="cx">                                                 <tr class="form-field">
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx">                                                 $radio_fields = array( 'public' => __( 'Public' ) );
</span><span class="cx">                                                 if ( ! $is_main_site ) {
</span><span class="cx">                                                         $radio_fields['archived'] = __( 'Archived' );
</span><del>-                                                        $radio_fields['spam'] = __( 'Spam' );
</del><ins>+                                                        $radio_fields['spam'] = _x( 'Spam', 'site' );
</ins><span class="cx">                                                         $radio_fields['deleted'] = __( 'Deleted' );
</span><span class="cx">                                                 }
</span><span class="cx">                                                 $radio_fields['mature'] = __( 'Mature' );
</span><span class="lines">@@ -414,8 +414,8 @@
</span><span class="cx">                         <select name="action">
</span><span class="cx">                                 <option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option>
</span><span class="cx">                                 <option value="delete"><?php _e( 'Delete' ); ?></option>
</span><del>-                                <option value="spam"><?php _e( 'Mark as Spam' ); ?></option>
-                                <option value="notspam"><?php _e( 'Not Spam' ); ?></option>
</del><ins>+                                <option value="spam"><?php echo _x( 'Mark as Spam', 'site' ); ?></option>
+                                <option value="notspam"><?php echo _x( 'Not Spam', 'site' ); ?></option>
</ins><span class="cx">                         </select>
</span><span class="cx">                         <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" />
</span><span class="cx">                         <?php wp_nonce_field( 'bulk-ms-sites' ); ?>
</span><span class="lines">@@ -448,7 +448,7 @@
</span><span class="cx">                         'id' => __( 'ID' ),
</span><span class="cx">                         'blogname' => $blogname_columns,
</span><span class="cx">                         'lastupdated' => __( 'Last Updated'),
</span><del>-                        'registered' => __( 'Registered' ),
</del><ins>+                        'registered' => _x( 'Registered', 'site' ),
</ins><span class="cx">                         'users' => __( 'Users' )
</span><span class="cx">                 );
</span><span class="cx">
</span><span class="lines">@@ -489,7 +489,7 @@
</span><span class="cx">                         </tfoot>
</span><span class="cx">                         <tbody id="the-site-list" class="list:site">
</span><span class="cx">                         <?php
</span><del>-                        $status_list = array( 'archived' => array( 'site-archived', __( 'Archived' ) ), 'spam' => array( 'site-spammed', __( 'Spam' ) ), 'deleted' => array( 'site-deleted', __( 'Deleted' ) ), 'mature' => array( 'site-mature', __( 'Mature' ) ) );
</del><ins>+                        $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' ) ) );
</ins><span class="cx">                         if ( $blog_list ) {
</span><span class="cx">                                 $class = '';
</span><span class="cx">                                 foreach ( $blog_list as $blog ) {
</span><span class="lines">@@ -534,7 +534,7 @@
</span><span class="cx">                                                                         <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>
</span><span class="cx">                                                                         <?php
</span><span class="cx">                                                                         if ( 'list' != $mode )
</span><del>-                                                                                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>';
</del><ins>+                                                                                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>';
</ins><span class="cx">
</span><span class="cx">                                                                         // Preordered.
</span><span class="cx">                                                                         $actions = array(
</span><span class="lines">@@ -557,12 +557,12 @@
</span><span class="cx">                                                                                 if ( get_blog_status( $blog['blog_id'], 'archived' ) == '1' )
</span><span class="cx">                                                                                         $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>';
</span><span class="cx">                                                                                 else
</span><del>-                                                                                        $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>';
</del><ins>+                                                                                        $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>';
</ins><span class="cx">
</span><span class="cx">                                                                                 if ( get_blog_status( $blog['blog_id'], 'spam' ) == '1' )
</span><del>-                                                                                        $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>';
</del><ins>+                                                                                        $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>';
</ins><span class="cx">                                                                                 else
</span><del>-                                                                                        $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>';
</del><ins>+                                                                                        $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>';
</ins><span class="cx">
</span><span class="cx">                                                                                 $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>';
</span><span class="cx">                                                                         }
</span><span class="lines">@@ -665,8 +665,8 @@
</span><span class="cx">                         <select name="action2">
</span><span class="cx">                                 <option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option>
</span><span class="cx">                                 <option value="delete"><?php _e( 'Delete' ); ?></option>
</span><del>-                                <option value="spam"><?php _e( 'Mark as Spam' ); ?></option>
-                                <option value="notspam"><?php _e( 'Not Spam' ); ?></option>
</del><ins>+                                <option value="spam"><?php echo _x( 'Mark as Spam', 'site' ); ?></option>
+                                <option value="notspam"><?php echo _x( 'Not Spam', 'site' ); ?></option>
</ins><span class="cx">                         </select>
</span><span class="cx">                         <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
</span><span class="cx">                         </div>
</span></span></pre></div>
<a id="trunkwpadminmsusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-users.php (14406 => 14407)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-users.php        2010-05-03 20:34:49 UTC (rev 14406)
+++ trunk/wp-admin/ms-users.php        2010-05-03 20:37:07 UTC (rev 14407)
</span><span class="lines">@@ -130,8 +130,8 @@
</span><span class="cx">                                 <select name="action">
</span><span class="cx">                                         <option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option>
</span><span class="cx">                                         <option value="delete"><?php _e( 'Delete' ); ?></option>
</span><del>-                                        <option value="spam"><?php _e( 'Mark as Spam' ); ?></option>
-                                        <option value="notspam"><?php _e( 'Not Spam' ); ?></option>
</del><ins>+                                        <option value="spam"><?php echo _x( 'Mark as Spam', 'user' ); ?></option>
+                                        <option value="notspam"><?php echo _x( 'Not Spam', 'user' ); ?></option>
</ins><span class="cx">                                 </select>
</span><span class="cx">                                 <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction" id="doaction" class="button-secondary action" />
</span><span class="cx">                                 <?php wp_nonce_field( 'bulk-ms-users' ); ?>
</span><span class="lines">@@ -162,7 +162,7 @@
</span><span class="cx">                         'login' => __( 'Username' ),
</span><span class="cx">                         'name' => __( 'Name' ),
</span><span class="cx">                         'email' => __( 'E-mail' ),
</span><del>-                        'registered' => __( 'Registered' ),
</del><ins>+                        'registered' => _x( 'Registered', 'user' ),
</ins><span class="cx">                         'blogs' => __( 'Sites' )
</span><span class="cx">                 );
</span><span class="cx">                 $users_columns = apply_filters( 'wpmu_users_columns', $users_columns );
</span><span class="lines">@@ -324,8 +324,8 @@
</span><span class="cx">                                 <select name="action2">
</span><span class="cx">                                         <option value="-1" selected="selected"><?php _e( 'Bulk Actions' ); ?></option>
</span><span class="cx">                                         <option value="delete"><?php _e( 'Delete' ); ?></option>
</span><del>-                                        <option value="spam"><?php _e( 'Mark as Spam' ); ?></option>
-                                        <option value="notspam"><?php _e( 'Not Spam' ); ?></option>
</del><ins>+                                        <option value="spam"><?php echo _x( 'Mark as Spam', 'user' ); ?></option>
+                                        <option value="notspam"><?php echo _x( 'Not Spam', 'user' ); ?></option>
</ins><span class="cx">                                 </select>
</span><span class="cx">                                 <input type="submit" value="<?php esc_attr_e( 'Apply' ); ?>" name="doaction2" id="doaction2" class="button-secondary action" />
</span><span class="cx">                         </div>
</span></span></pre>
</div>
</div>
</body>
</html>