Plugin Directory

Changeset 878668

Timestamp:
03/20/2014 10:43:51 AM (10 years ago)
Author:
eoigal
Message:

Add support for an akismet text domain - https://core.trac.wordpress.org/ticket/20882

Location:
akismet/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • akismet/trunk/akismet.php

    r875752 r878668  
    1111Author URI: http://automattic.com/wordpress-plugins/
    1212License: GPLv2 or later
     13
    1314*/
    1415
  • akismet/trunk/class.akismet-admin.php

    r877118 r878668  
    4646
    4747    public static function admin_init() {
    48         add_meta_box( 'akismet-status', __('Comment History'), array( 'Akismet_Admin', 'comment_status_meta_box' ), 'comment', 'normal' );
     48        load_plugin_textdomain( 'akismet' );
     49        add_meta_box( 'akismet-status', __('Comment History', 'akismet'), array( 'Akismet_Admin', 'comment_status_meta_box' ), 'comment', 'normal' );
    4950    }
    5051
     
    6364    public static function load_menu() {
    6465        if ( class_exists( 'Jetpack' ) )
    65             $hook = add_submenu_page( 'jetpack', __( 'Akismet' ), __( 'Akismet' ), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );
     66            $hook = add_submenu_page( 'jetpack', __( 'Akismet' ), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );
    6667        else
    67             $hook = add_options_page( __('Akismet'), __('Akismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );
     68            $hook = add_options_page( __('Akismet'kismet'), 'manage_options', 'akismet-key-config', array( 'Akismet_Admin', 'display_page' ) );
    6869
    6970        if ( version_compare( $GLOBALS['wp_version'], '3.3', '>=' ) ) {
     
    9192                'comment_author_url_nonce' => wp_create_nonce( 'comment_author_url_nonce' ),
    9293                'strings' => array(
    93                     'Remove this URL' => __( 'Remove this URL' ),
    94                     'Removing...' => __( 'Removing...' ),
    95                     'URL removed' => __( 'URL removed' ),
    96                     '(undo)' => __( '(undo)' ),
    97                     'Re-adding...' => __( 'Re-adding...' ),
     94                    'Remove this URL' => __( 'Remove this URL' ),
     95                    'Removing...' => __( 'Removing...' ),
     96                    'URL removed' => __( 'URL removed' ),
     97                    '(undo)' => __( '(undo)' ),
     98                    'Re-adding...' => __( 'Re-adding...' ),
    9899                )
    99100            ) );
     
    116117                    array(
    117118                        'id'        => 'overview',
    118                         'title'     => __( 'Overview' ),
     119                        'title'     => __( 'Overview' ),
    119120                        'content'   =>
    120                             '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' .
    121                             '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' .
    122                             '<p>' . esc_html__( 'On this page, you are able to setup the Akismet plugin.' ) . '</p>',
     121                            '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' .
     122                            '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' .
     123                            '<p>' . esc_html__( 'On this page, you are able to setup the Akismet plugin.' ) . '</p>',
    123124                    )
    124125                );
     
    127128                    array(
    128129                        'id'        => 'setup-signup',
    129                         'title'     => __( 'New to Akismet' ),
     130                        'title'     => __( 'New to Akismet' ),
    130131                        'content'   =>
    131                             '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' .
    132                             '<p>' . esc_html__( 'You need to enter an API key to activate the Akismet service on your site.' ) . '</p>' .
    133                             '<p>' . sprintf( __( 'Signup for an account on %s to get an API Key.' ), '<a href="https://akismet.com/plugin-signup/" target="_blank">Akismet.com</a>' ) . '</p>',
     132                            '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' .
     133                            '<p>' . esc_html__( 'You need to enter an API key to activate the Akismet service on your site.' ) . '</p>' .
     134                            '<p>' . sprintf( __( 'Signup for an account on %s to get an API Key.' ), '<a href="https://akismet.com/plugin-signup/" target="_blank">Akismet.com</a>' ) . '</p>',
    134135                    )
    135136                );
     
    138139                    array(
    139140                        'id'        => 'setup-manual',
    140                         'title'     => __( 'Enter an API Key' ),
     141                        'title'     => __( 'Enter an API Key' ),
    141142                        'content'   =>
    142                             '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' .
    143                             '<p>' . esc_html__( 'If you already have an API key' ) . '</p>' .
     143                            '<p><strong>' . esc_html__( 'Akismet Setup' ) . '</strong></p>' .
     144                            '<p>' . esc_html__( 'If you already have an API key' ) . '</p>' .
    144145                            '<ol>' .
    145                                 '<li>' . esc_html__( 'Copy and paste the API key into the text field.' ) . '</li>' .
    146                                 '<li>' . esc_html__( 'Click the Use this Key button.' ) . '</li>' .
     146                                '<li>' . esc_html__( 'Copy and paste the API key into the text field.' ) . '</li>' .
     147                                '<li>' . esc_html__( 'Click the Use this Key button.' ) . '</li>' .
    147148                            '</ol>',
    148149                    )
     
    154155                    array(
    155156                        'id'        => 'overview',
    156                         'title'     => __( 'Overview' ),
     157                        'title'     => __( 'Overview' ),
    157158                        'content'   =>
    158                             '<p><strong>' . esc_html__( 'Akismet Stats' ) . '</strong></p>' .
    159                             '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' .
    160                             '<p>' . esc_html__( 'On this page, you are able to view stats on spam filtered on your site.' ) . '</p>',
     159                            '<p><strong>' . esc_html__( 'Akismet Stats' ) . '</strong></p>' .
     160                            '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' .
     161                            '<p>' . esc_html__( 'On this page, you are able to view stats on spam filtered on your site.' ) . '</p>',
    161162                    )
    162163                );
     
    167168                    array(
    168169                        'id'        => 'overview',
    169                         'title'     => __( 'Overview' ),
     170                        'title'     => __( 'Overview' ),
    170171                        'content'   =>
    171                             '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' .
    172                             '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' .
    173                             '<p>' . esc_html__( 'On this page, you are able to enter/remove an API key, view account information and view spam stats.' ) . '</p>',
     172                            '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' .
     173                            '<p>' . esc_html__( 'Akismet filters out your comment and trackback spam for you, so you can focus on more important things.' ) . '</p>' .
     174                            '<p>' . esc_html__( 'On this page, you are able to enter/remove an API key, view account information and view spam stats.' ) . '</p>',
    174175                    )
    175176                );
     
    178179                    array(
    179180                        'id'        => 'settings',
    180                         'title'     => __( 'Settings' ),
     181                        'title'     => __( 'Settings' ),
    181182                        'content'   =>
    182                             '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' .
    183                             '<p><strong>' . esc_html__( 'API Key' ) . '</strong> - ' . esc_html__( 'Enter/remove an API key.' ) . '</p>' .
    184                             '<p><strong>' . esc_html__( 'Delete spam on posts more than a month old' ) . '</strong> - ' . esc_html__( 'Automatically delete spam comments on posts that are older than a month old.' ) . '</p>' .
    185                             '<p><strong>' . esc_html__( 'Show the number of approved comments beside each comment author' ) . '</strong> - ' . esc_html__( 'Show the number of approved comments beside each comment author in the comments list page.' ) . '</p>',
     183                            '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' .
     184                            '<p><strong>' . esc_html__( 'API Key' ) . '</p>' .
     185                            '<p><strong>' . esc_html__( 'Delete spam on posts more than a month old' ) . '</p>' .
     186                            '<p><strong>' . esc_html__( 'Show the number of approved comments beside each comment author' ) . '</p>',
    186187                    )
    187188                );
     
    190191                    array(
    191192                        'id'        => 'account',
    192                         'title'     => __( 'Account' ),
     193                        'title'     => __( 'Account' ),
    193194                        'content'   =>
    194                             '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' .
    195                             '<p><strong>' . esc_html__( 'Subscription Type' ) . '</strong> - ' . esc_html__( 'The Akismet subscription plan' ) . '</p>' .
    196                             '<p><strong>' . esc_html__( 'Status' ) . '</strong> - ' . esc_html__( 'The subscription status - active, cancelled or suspended' ) . '</p>',
     195                            '<p><strong>' . esc_html__( 'Akismet Configuration' ) . '</strong></p>' .
     196                            '<p><strong>' . esc_html__( 'Subscription Type' ) . '</p>' .
     197                            '<p><strong>' . esc_html__( 'Status' ) . '</p>',
    197198                    )
    198199                );
     
    202203        // Help Sidebar
    203204        $current_screen->set_help_sidebar(
    204             '<p><strong>' . esc_html__( 'For more information:' ) . '</strong></p>' .
    205             '<p><a href="https://akismet.com/faq/" target="_blank">'     . esc_html__( 'Akismet FAQ' ) . '</a></p>' .
    206             '<p><a href="https://akismet.com/support/" target="_blank">' . esc_html__( 'Akismet Support' ) . '</a></p>'
     205            '<p><strong>' . esc_html__( 'For more information:' ) . '</strong></p>' .
     206            '<p><a href="https://akismet.com/faq/" target="_blank">'     . esc_html__( 'Akismet FAQ' ) . '</a></p>' .
     207            '<p><a href="https://akismet.com/support/" target="_blank">' . esc_html__( 'Akismet Support' ) . '</a></p>'
    207208        );
    208209    }
     
    210211    public static function enter_api_key() {
    211212        if ( function_exists('current_user_can') && !current_user_can('manage_options') )
    212             die(__('Cheatin&#8217; uh?'));
     213            die(__('Cheatin&#8217; uh?'));
    213214
    214215        if ( !wp_verify_nonce( $_POST['_wpnonce'], self::NONCE ) )
     
    258259        global $submenu;
    259260
    260         echo '<h3>' . esc_html( _x( 'Spam', 'comments' ) ) . '</h3>';
     261        echo '<h3>' . esc_html( _x( 'Spam', 'comments' ) ) . '</h3>';
    261262
    262263        echo '<p>'.sprintf( _n(
     
    264265                '<a href="%1$s">Akismet</a> has protected your site from <a href="%2$s">%3$s spam comments</a>.',
    265266                $count
    266             ), 'http://akismet.com/?return=true', esc_url( add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php' ) ) ), number_format_i18n($count) ).'</p>';
     267            ), 'http://akismet.com/?return=true', esc_url( add_query_arg( array( 'page' => 'akismet-admin' ), admin_url( isset( $submenu['edit-comments.php'] ) ? 'edit-comments.php' : 'edit.php' ) ) ), number_format_i18n($count) ).'</p>';
    267268    }
    268269
     
    283284                '<a href="%1$s">Akismet</a> has protected your site from %2$s spam comments already. ',
    284285                $count
    285             ), 'http://akismet.com/?return=true', number_format_i18n( $count ) );
     286            ), 'http://akismet.com/?return=true', number_format_i18n( $count ) );
    286287        } else {
    287             $intro = sprintf( __('<a href="%s">Akismet</a> blocks spam from getting to your blog. '), 'http://akismet.com/?return=true' );
     288            $intro = sprintf( __('<a href="%s">Akismet</a> blocks spam from getting to your blog. '), 'http://akismet.com/?return=true' );
    288289        }
    289290
     
    294295                'There are <a href="%2$s">%1$s comments</a> in your spam queue right now.',
    295296                $queue_count
    296             ), number_format_i18n( $queue_count ), $link );
     297            ), number_format_i18n( $queue_count ), $link );
    297298        } else {
    298             $queue_text = sprintf( __( "There&#8217;s nothing in your <a href='%s'>spam queue</a> at the moment." ), $link );
     299            $queue_text = sprintf( __( "There&#8217;s nothing in your <a href='%s'>spam queue</a> at the moment." ), $link );
    299300        }
    300301
     
    312313            $link = add_query_arg( array( 'page' => 'akismet-admin', 'recheckqueue' => 'true', 'noheader' => 'true' ), admin_url( 'edit-comments.php' ) );
    313314
    314         echo '</div><div class="alignleft"><a class="button-secondary checkforspam" href="' . esc_url( $link ) . '">' . esc_html__('Check for Spam') . '</a>';
     315        echo '</div><div class="alignleft"><a class="button-secondary checkforspam" href="' . esc_url( $link ) . '">' . esc_html__('Check for Spam') . '</a>';
    315316        echo '<img src="' . esc_url( admin_url( 'images/wpspin_light.gif' ) ) . '" class="checkforspam-spinner" />';
    316317    }
     
    356357        }
    357358
    358         Akismet::update_comment_history( $comment->comment_ID, sprintf( __('%1$s changed the comment status to %2$s'), $reporter, $new_status ), 'status-' . $new_status );
     359        Akismet::update_comment_history( $comment->comment_ID, sprintf( __('%1$s changed the comment status to %2$s'), $reporter, $new_status ), 'status-' . $new_status );
    359360    }
    360361
     
    396397                update_comment_meta( $c['comment_ID'], 'akismet_result', 'true' );
    397398                delete_comment_meta( $c['comment_ID'], 'akismet_error' );
    398                 Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and caught this comment as spam'), 'check-spam' );
     399                Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and caught this comment as spam'), 'check-spam' );
    399400
    400401            } elseif ( 'false' == $response[1] ) {
    401402                update_comment_meta( $c['comment_ID'], 'akismet_result', 'false' );
    402403                delete_comment_meta( $c['comment_ID'], 'akismet_error' );
    403                 Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and cleared this comment'), 'check-ham' );
     404                Akismet::update_comment_history( $c['comment_ID'], __('Akismet re-checked and cleared this comment'), 'check-ham' );
    404405            // abnormal result: error
    405406            } else {
    406407                update_comment_meta( $c['comment_ID'], 'akismet_result', 'error' );
    407                 Akismet::update_comment_history( $c['comment_ID'], sprintf( __('Akismet was unable to re-check this comment (response: %s)'), substr($response[1], 0, 50)), 'check-error' );
     408                Akismet::update_comment_history( $c['comment_ID'], sprintf( __('Akismet was unable to re-check this comment (response: %s)'), substr($response[1], 0, 50)), 'check-error' );
    408409            }
    409410
     
    459460        $desc = null;
    460461        if ( $akismet_error ) {
    461             $desc = __( 'Awaiting spam check' );
     462            $desc = __( 'Awaiting spam check' );
    462463        } elseif ( !$user_result || $user_result == $akismet_result ) {
    463464            // Show the original Akismet result if the user hasn't overridden it, or if their decision was the same
    464465            if ( $akismet_result == 'true' && $comment_status != 'spam' && $comment_status != 'trash' )
    465                 $desc = __( 'Flagged as spam by Akismet' );
     466                $desc = __( 'Flagged as spam by Akismet' );
    466467            elseif ( $akismet_result == 'false' && $comment_status == 'spam' )
    467                 $desc = __( 'Cleared by Akismet' );
     468                $desc = __( 'Cleared by Akismet' );
    468469        } else {
    469470            $who = get_comment_meta( $comment->comment_ID, 'akismet_user', true );
    470471            if ( $user_result == 'true' )
    471                 $desc = sprintf( __('Flagged as spam by %s'), $who );
     472                $desc = sprintf( __('Flagged as spam by %s'), $who );
    472473            else
    473                 $desc = sprintf( __('Un-spammed by %s'), $who );
     474                $desc = sprintf( __('Un-spammed by %s'), $who );
    474475        }
    475476
     
    483484                    || ( $k == 'unspam' && $GLOBALS['wp_version'] >= 3.4 )
    484485                ) {
    485                     $b['history'] = '<a href="comment.php?action=editcomment&amp;c='.$comment->comment_ID.'#akismet-status" title="'. esc_attr__( 'View comment history' ) . '"> '. esc_html__('History') . '</a>';
     486                    $b['history'] = '<a href="comment.php?action=editcomment&amp;c='.$comment->comment_ID.'#akismet-status" title="'. esc_attr__( 'View comment history' ') . '</a>';
    486487                }
    487488            }
     
    491492
    492493        if ( $desc )
    493             echo '<span class="akismet-status" commentid="'.$comment->comment_ID.'"><a href="comment.php?action=editcomment&amp;c='.$comment->comment_ID.'#akismet-status" title="' . esc_attr__( 'View comment history' ) . '">'.esc_html( $desc ).'</a></span>';
     494            echo '<span class="akismet-status" commentid="'.$comment->comment_ID.'"><a href="comment.php?action=editcomment&amp;c='.$comment->comment_ID.'#akismet-status" title="' . esc_attr__( 'View comment history' ) . '">'.esc_html( $desc ).'</a></span>';
    494495
    495496        if ( apply_filters( 'akismet_show_user_comments_approved', get_option('akismet_show_user_comments_approved') ) == 'true' ) {
    496497            $comment_count = Akismet::get_user_comments_approved( $comment->user_id, $comment->comment_author_email, $comment->comment_author, $comment->comment_author_url );
    497498            $comment_count = intval( $comment_count );
    498             echo '<span class="akismet-user-comment-count" commentid="'.$comment->comment_ID.'" style="display:none;"><br><span class="akismet-user-comment-counts">'. sprintf( esc_html( _n( '%s approved', '%s approved', $comment_count ) ), number_format_i18n( $comment_count ) ) . '</span></span>';
     499            echo '<span class="akismet-user-comment-count" commentid="'.$comment->comment_ID.'" style="display:none;"><br><span class="akismet-user-comment-counts">'. sprintf( esc_html( _n( '%s approved', '%s approved', $comment_count ) ), number_format_i18n( $comment_count ) ) . '</span></span>';
    499500        }
    500501
     
    509510            foreach ( $history as $row ) {
    510511                $time = date( 'D d M Y @ h:i:m a', $row['time'] ) . ' GMT';
    511                 echo '<div style="margin-bottom: 13px;"><span style="color: #999;" alt="' . $time . '" title="' . $time . '">' . sprintf( esc_html__('%s ago'), human_time_diff( $row['time'] ) ) . '</span> - ';
     512                echo '<div style="margin-bottom: 13px;"><span style="color: #999;" alt="' . $time . '" title="' . $time . '">' . sprintf( esc_html__('%s ago'), human_time_diff( $row['time'] ) ) . '</span> - ';
    512513                echo esc_html( $row['message'] ) . '</div>';
    513514            }
     
    518519    public static function plugin_action_links( $links, $file ) {
    519520        if ( $file == plugin_basename( AKISMET__PLUGIN_URL . '/akismet.php' ) ) {
    520             $links[] = '<a href="' . esc_url( self::get_page_url() ) . '">'.esc_html__( 'Settings' ).'</a>';
     521            $links[] = '<a href="' . esc_url( self::get_page_url() ) . '">'.esc_html__( 'Settings' ).'</a>';
    521522        }
    522523
     
    578579        $response = Akismet::http_post( http_build_query( $comment ), 'submit-spam' );
    579580        if ( $comment->reporter ) {
    580             Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as spam'), $comment->reporter ), 'report-spam' );
     581            Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as spam'), $comment->reporter ), 'report-spam' );
    581582            update_comment_meta( $comment_id, 'akismet_user_result', 'true' );
    582583            update_comment_meta( $comment_id, 'akismet_user', $comment->reporter );
     
    624625        $response = Akismet::http_post( http_build_query( $comment ), 'submit-ham' );
    625626        if ( $comment->reporter ) {
    626             Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as not spam'), $comment->reporter ), 'report-ham' );
     627            Akismet::update_comment_history( $comment_id, sprintf( __('%s reported this comment as not spam'), $comment->reporter ), 'report-ham' );
    627628            update_comment_meta( $comment_id, 'akismet_user_result', 'false' );
    628629            update_comment_meta( $comment_id, 'akismet_user', $comment->reporter );
     
    794795        }
    795796
    796         echo '<h2 class="ak-header">'.esc_html__('Akismet').'</h2>';
     797        echo '<h2 class="ak-header">'.esc_html__('Akismet').'</h2>';
    797798
    798799        self::display_status();
     
    833834                    $total_in_hours   = round( $total_in_minutes / 60 );
    834835                    $total_in_days    = round( $total_in_hours / 8 );
    835                     $cleaning_up      = __( 'Cleaning up spam takes time.' );
     836                    $cleaning_up      = __( 'Cleaning up spam takes time.' );
    836837
    837838                    if ( $total_in_days > 1 )
    838                         $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %s days!' ), number_format_i18n( $total_in_days ) );
     839                        $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %s days!' ), number_format_i18n( $total_in_days ) );
    839840                    elseif ( $total_in_hours > 1 )
    840                         $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d hours!' ), $total_in_hours );
     841                        $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d hours!' ), $total_in_hours );
    841842                    elseif ( $total_in_minutes >= 30 )
    842                         $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d minutes!' ), $total_in_minutes );
     843                        $time_saved = $cleaning_up . ' ' . sprintf( __( 'Since you joined us, Akismet has saved you %d minutes!' ), $total_in_minutes );
    843844                }
    844845
  • akismet/trunk/class.akismet-widget.php

    r875752 r878668  
    66
    77    function __construct() {
     8
     9
    810        parent::__construct(
    911            'akismet_widget',
    10             __( 'Akismet Widget' ),
    11             array( 'description' => __( 'Display the number of spam comments Akismet has caught' ) )
     12            __( 'Akismet Widget' ),
     13            array( 'description' => __( 'Display the number of spam comments Akismet has caught' ) )
    1214        );
    1315
     
    6567        }
    6668        else {
    67             $title = __( 'Spam Blocked' );
     69            $title = __( 'Spam Blocked' );
    6870        }
    6971?>
    7072
    7173        <p>
    72         <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' ); ?></label>
     74        <label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title:' ); ?></label>
    7375        <input class="widefat" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" />
    7476        </p>
     
    9496
    9597    <div class="a-stats">
    96         <a href="http://akismet.com" target="_blank" title=""><?php printf( _n( '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', $count ), number_format_i18n( $count ) ); ?></a>
     98        <a href="http://akismet.com" target="_blank" title=""><?php printf( _n( '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', '<strong class="count">%1$s spam</strong> blocked by <strong>Akismet</strong>', $count ), number_format_i18n( $count ) ); ?></a>
    9799    </div>
    98100
  • akismet/trunk/class.akismet.php

    r876682 r878668  
    191191                && self::$last_comment['comment_author'] == $comment->comment_author
    192192                && self::$last_comment['comment_author_email'] == $comment->comment_author_email ) {
     193
     194
     195
    193196                    // normal result: true or false
    194197                    if ( self::$last_comment['akismet_result'] == 'true' ) {
    195198                        update_comment_meta( $comment->comment_ID, 'akismet_result', 'true' );
    196                         self::update_comment_history( $comment->comment_ID, __('Akismet caught this comment as spam'), 'check-spam' );
     199                        self::update_comment_history( $comment->comment_ID, __('Akismet caught this comment as spam'), 'check-spam' );
    197200                        if ( $comment->comment_approved != 'spam' )
    198                             self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s'), $comment->comment_approved), 'status-changed'.$comment->comment_approved );
     201                            self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s'), $comment->comment_approved), 'status-changed'.$comment->comment_approved );
    199202                    }
    200203                    elseif ( self::$last_comment['akismet_result'] == 'false' ) {
    201204                        update_comment_meta( $comment->comment_ID, 'akismet_result', 'false' );
    202                         self::update_comment_history( $comment->comment_ID, __('Akismet cleared this comment'), 'check-ham' );
     205                        self::update_comment_history( $comment->comment_ID, __('Akismet cleared this comment'), 'check-ham' );
    203206                        if ( $comment->comment_approved == 'spam' ) {
    204207                            if ( wp_blacklist_check($comment->comment_author, $comment->comment_author_email, $comment->comment_author_url, $comment->comment_content, $comment->comment_author_IP, $comment->comment_agent) )
    205                                 self::update_comment_history( $comment->comment_ID, __('Comment was caught by wp_blacklist_check'), 'wp-blacklisted' );
     208                                self::update_comment_history( $comment->comment_ID, __('Comment was caught by wp_blacklist_check'), 'wp-blacklisted' );
    206209                            else
    207                                 self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s'), $comment->comment_approved), 'status-changed-'.$comment->comment_approved );
     210                                self::update_comment_history( $comment->comment_ID, sprintf( __('Comment status was changed to %s'), $comment->comment_approved), 'status-changed-'.$comment->comment_approved );
    208211                        }
    209212                    } // abnormal result: error
    210213                    else {
    211214                        update_comment_meta( $comment->comment_ID, 'akismet_error', time() );
    212                         self::update_comment_history( $comment->comment_ID, sprintf( __('Akismet was unable to check this comment (response: %s), will automatically retry again later.'), substr(self::$last_comment['akismet_result'], 0, 50)), 'check-error' );
     215                        self::update_comment_history( $comment->comment_ID, sprintf( __('Akismet was unable to check this comment (response: %s), will automatically retry again later.'), substr(self::$last_comment['akismet_result'], 0, 50)), 'check-error' );
    213216                    }
    214217
     
    360363
    361364        $comment_errors = $wpdb->get_col( "SELECT comment_id FROM {$wpdb->commentmeta} WHERE meta_key = 'akismet_error' LIMIT 100" );
     365
     366
    362367
    363368        foreach ( (array) $comment_errors as $comment_id ) {
     
    374379            $msg = '';
    375380            if ( $status == 'true' ) {
    376                 $msg = __( 'Akismet caught this comment as spam during an automatic retry.' );
     381                $msg = __( 'Akismet caught this comment as spam during an automatic retry.' );
    377382            } elseif ( $status == 'false' ) {
    378                 $msg = __( 'Akismet cleared this comment during an automatic retry.' );
     383                $msg = __( 'Akismet cleared this comment during an automatic retry.' );
    379384            }
    380385
     
    654659            $$key = $val;
    655660        }
     661
     662
    656663
    657664        $file = AKISMET__PLUGIN_DIR . 'views/'. $name . '.php';
     
    666673    public static function plugin_activation() {
    667674        if ( version_compare( $GLOBALS['wp_version'], AKISMET__MINIMUM_WP_VERSION, '<' ) ) {
    668             $message = '<strong>'.sprintf(esc_html__( 'Akismet %s requires WordPress %s or higher.' ), AKISMET_VERSION, AKISMET__MINIMUM_WP_VERSION ).'</strong> '.sprintf(__('Please <a href="%1$s">upgrade WordPress</a> to a current version, or <a href="%2$s">downgrade to version 2.4 of the Akismet plugin</a>.'), 'http://codex.wordpress.org/Upgrading_WordPress', 'http://wordpress.org/extend/plugins/akismet/download/');
     675            load_theme_textdomain( 'akismet' );
     676           
     677            $message = '<strong>'.sprintf(esc_html__( 'Akismet %s requires WordPress %s or higher.' , 'akismet'), AKISMET_VERSION, AKISMET__MINIMUM_WP_VERSION ).'</strong> '.sprintf(__('Please <a href="%1$s">upgrade WordPress</a> to a current version, or <a href="%2$s">downgrade to version 2.4 of the Akismet plugin</a>.', 'akismet'), 'http://codex.wordpress.org/Upgrading_WordPress', 'http://wordpress.org/extend/plugins/akismet/download/');
    669678
    670679            Akismet::bail_on_activation( $message );
  • akismet/trunk/views/config.php

    r875752 r878668  
    11<div class="wrap">
    22
    3     <h2><?php esc_html_e( 'Akismet' );?></h2>
     3    <h2><?php esc_html_e( 'Akismet' );?></h2>
    44
    55    <div class="have-key">
     
    1010
    1111                <span style="float:right;margin:10px 15px -5px 0px">
    12                     <a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>" class=""><?php esc_html_e( 'Summaries' );?></a>
     12                    <a href="<?php echo esc_url( Akismet_Admin::get_page_url( 'stats' ) ); ?>" class=""><?php esc_html_e( 'Summaries' );?></a>
    1313                </span>
    1414
     
    1616                <ul>
    1717                    <li>
    18                         <h3><?php esc_html_e( 'Past six months' );?></h3>
     18                        <h3><?php esc_html_e( 'Past six months' );?></h3>
    1919                        <span><?php echo number_format( $stat_totals['6-months']->spam );?></span>
    20                         <?php esc_html_e( 'Spam blocked' );?>
     20                        <?php esc_html_e( 'Spam blocked' );?>
    2121                    </li>
    2222                    <li>
    23                         <h3><?php esc_html_e( 'All time' );?></h3>
     23                        <h3><?php esc_html_e( 'All time' );?></h3>
    2424                        <span><?php echo number_format( $stat_totals['all']->spam );?></span>
    25                         <?php esc_html_e( 'Spam blocked' );?>
     25                        <?php esc_html_e( 'Spam blocked' );?>
    2626                    </li>
    2727                    <li>
    28                         <h3><?php esc_html_e( 'Accuracy' );?></h3>
     28                        <h3><?php esc_html_e( 'Accuracy' );?></h3>
    2929                        <span><?php echo $stat_totals['all']->accuracy; ?>%</span>
    3030                        <?php printf(
    3131                            esc_html(
    32                                 _n( '%s missed spam, %s false positive', '%s missed spam, %s false positives', $stat_totals['all']->false_positives )
     32                                _n( '%s missed spam, %s false positive', '%s missed spam, %s false positives', $stat_totals['all']->false_positives )
    3333                            ),
    3434                            number_format( $stat_totals['all']->missed_spam ),
     
    5858                        <div id="referrers" class="postbox ">
    5959                            <div class="handlediv" title="Click to toggle"><br></div>
    60                             <h3 class="hndle"><span><?php esc_html_e( 'Settings' );?></span></h3>
     60                            <h3 class="hndle"><span><?php esc_html_e( 'Settings' );?></span></h3>
    6161                            <form name="akismet_conf" id="akismet-conf" action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="POST">
    6262                                <div class="inside">
     
    6565                                            <?php if ( !defined( 'WPCOM_API_KEY' ) ):?>
    6666                                            <tr>
    67                                                 <th scope="row" align="left" width="10%"><?php esc_html_e('API Key');?></th>
     67                                                <th scope="row" align="left" width="10%"><?php esc_html_e('API Key');?></th>
    6868                                                <td width="5%"/>
    6969                                                <td align="left">
     
    7777                                                <td>
    7878                                                    <p>
    79                                                         <label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' ); ?>"><input name="akismet_show_user_comments_approved" id="akismet_show_user_comments_approved" value="true" type="checkbox" <?php echo get_option('akismet_show_user_comments_approved') == 'true' ? 'checked="checked"':''; ?>> <?php esc_html_e('Show the number of approved comments beside each comment author'); ?></label>
     79                                                        <label for="akismet_show_user_comments_approved" title="<?php esc_attr_e( 'Show approved comments' '); ?></label>
    8080                                                    </p>
    8181                                                    <p>
    82                                                         <label for="akismet_discard_month" title="<?php esc_attr_e( 'Auto-detete spam from old posts' ); ?>"><input name="akismet_discard_month" id="akismet_discard_month" value="true" type="checkbox" <?php echo get_option('akismet_discard_month') == 'true' ? 'checked="checked"':''; ?>> <?php esc_html_e('Automatically delete spam from posts older than 30 days'); ?></label><span class="note"><strong><?php esc_html_e('Note:');?></strong> <?php printf( __( 'Spam in the <a href="%s">spam folder</a> older than 15 days is deleted automatically.' ), admin_url( 'edit-comments.php?type=spam' ) );?></span><div class="clear"></div>
     82                                                        <label for="akismet_discard_month" title="<?php esc_attr_e( 'Auto-detete spam from old posts' ), admin_url( 'edit-comments.php?type=spam' ) );?></span><div class="clear"></div>
    8383                                                    </p>
    8484                                                </td>
     
    9090                                    <?php if ( !defined( 'WPCOM_API_KEY' ) ):?>
    9191                                    <div id="delete-action">
    92                                         <a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e('Disconnect this account'); ?></a>
     92                                        <a class="submitdelete deletion" href="<?php echo esc_url( Akismet_Admin::get_page_url( 'delete_key' ) ); ?>"><?php esc_html_e('Disconnect this account'); ?></a>
    9393                                    </div>
    9494                                    <?php endif; ?>
     
    9696                                    <div id="publishing-action">
    9797                                            <input type="hidden" name="action" value="enter-key">
    98                                             <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e('Save Changes');?>">
     98                                            <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php esc_attr_e('Save Changes');?>">
    9999
    100100                                    </div>
     
    109109                        <div id="referrers" class="postbox ">
    110110                            <div class="handlediv" title="Click to toggle"><br></div>
    111                             <h3 class="hndle"><span><?php esc_html_e( 'Account' );?></span></h3>
     111                            <h3 class="hndle"><span><?php esc_html_e( 'Account' );?></span></h3>
    112112                            <div class="inside">
    113113                                <table cellspacing="0">
    114114                                    <tbody>
    115115                                        <tr>
    116                                             <th scope="row" align="left"><?php esc_html_e( 'Subscription Type' );?></th>
     116                                            <th scope="row" align="left"><?php esc_html_e( 'Subscription Type' );?></th>
    117117                                            <td width="5%"/>
    118118                                            <td align="left">
     
    121121                                        </tr>
    122122                                        <tr>
    123                                             <th scope="row" align="left"><?php esc_html_e( 'Status' );?></th>
     123                                            <th scope="row" align="left"><?php esc_html_e( 'Status' );?></th>
    124124                                            <td width="5%"/>
    125125                                            <td align="left">
     
    129129                                        <?php if ( $akismet_user->next_billing_date ) : ?>
    130130                                        <tr>
    131                                             <th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' );?></th>
     131                                            <th scope="row" align="left"><?php esc_html_e( 'Next Billing Date' );?></th>
    132132                                            <td width="5%"/>
    133133                                            <td align="left">
     
    141141                            <div id="major-publishing-actions">
    142142                                <div id="publishing-action">
    143                                     <?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type == 'free-api-key' ? __( 'Upgrade' ) : __( 'Change' ) ), 'redirect' => 'upgrade' ) ); ?>
     143                                    <?php Akismet::view( 'get', array( 'text' => ( $akismet_user->account_type == 'free-api-key' ? __( 'Upgrade' ) ), 'redirect' => 'upgrade' ) ); ?>
    144144                                </div>
    145145                                <div class="clear"></div>
  • akismet/trunk/views/notice.php

    r877118 r878668  
    99            <div class="aa_button_container" onclick="document.akismet_activate.submit();">
    1010                <div class="aa_button_border">
    11                     <div class="aa_button"><?php esc_html_e('Activate your Akismet account');?></div>
     11                    <div class="aa_button"><?php esc_html_e('Activate your Akismet account');?></div>
    1212                </div>
    1313            </div>
    14             <div class="aa_description"><?php _e('<strong>Almost done</strong> - activate your account and say goodbye to comment spam');?></div>
     14            <div class="aa_description"><?php _e('<strong>Almost done</strong> - activate your account and say goodbye to comment spam');?></div>
    1515        </div>
    1616    </form>
    1717</div>
    1818<?php elseif ( $type == 'spam-check' ) :?>
    19 <div id="akismet-warning" class="updated fade"><p><strong><?php esc_html_e('Akismet has detected a problem.');?></strong> <?php printf( __('Some comments have not yet been checked for spam by Akismet. They have been temporarily held for moderation. Please check your <a href="%s">Akismet configuration</a> and contact your web host if problems persist.'), esc_url( Akismet_Admin::get_page_url() ) );?></p></div>
     19<div id="akismet-warning" class="updated fade"><p><strong><?php esc_html_e('Akismet has detected a problem.''), esc_url( Akismet_Admin::get_page_url() ) );?></p></div>
    2020<?php elseif ( $type == 'version' ) :?>
    21 <div id="akismet-warning" class="updated fade"><p><strong><?php printf( esc_html__('Akismet %s requires WordPress 3.0 or higher.'), AKISMET_VERSION);?></strong> <?php printf(__('Please <a href="%1$s">upgrade WordPress</a> to a current version, or <a href="%2$s">downgrade to version 2.4 of the Akismet plugin</a>.'), 'https://codex.wordpress.org/Upgrading_WordPress', 'https://wordpress.org/extend/plugins/akismet/download/');?></p></div>
     21<div id="akismet-warning" class="updated fade"><p><strong><?php printf( esc_html__('Akismet %s requires WordPress 3.0 or higher.''), 'https://codex.wordpress.org/Upgrading_WordPress', 'https://wordpress.org/extend/plugins/akismet/download/');?></p></div>
    2222<?php elseif ( $type == 'alert' ) :?>
    2323<div class='error'>
    24     <p><strong><?php printf( esc_html__( 'Akismet Error Code: %s', $code ) ); ?></strong></p>
     24    <p><strong><?php printf( esc_html__( 'Akismet Error Code: %s', $code ) ); ?></strong></p>
    2525    <p><?php echo esc_html( $msg ); ?></p>
    2626    <p><?php
    2727
    2828    /* translators: the placeholder is a clickable URL that leads to more information regarding an error code. */
    29     printf( esc_html__( 'For more information: %s' ), '<a href="https://akismet.com/errors/' . $code . '">https://akismet.com/errors/' . $code . '</a>' );
     29    printf( esc_html__( 'For more information: %s' ), '<a href="https://akismet.com/errors/' . $code . '">https://akismet.com/errors/' . $code . '</a>' );
    3030
    3131    ?>
     
    3434<?php elseif ( $type == 'missing-functions' ) :?>
    3535<div class="wrap alert critical">
    36     <h3 class="key-status failed"><?php esc_html_e('Network functions are disabled.'); ?></h3>
    37     <p class="description"><?php printf( __('Your web host or server administrator has disabled PHP&#8217;s <code>fsockopen</code> or <code>gethostbynamel</code> functions.  <strong>Akismet cannot work correctly until this is fixed.</strong>  Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet&#8217;s system requirements</a>.'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
     36    <h3 class="key-status failed"><?php esc_html_e('Network functions are disabled.'); ?></h3>
     37    <p class="description"><?php printf( __('Your web host or server administrator has disabled PHP&#8217;s <code>fsockopen</code> or <code>gethostbynamel</code> functions.  <strong>Akismet cannot work correctly until this is fixed.</strong>  Please contact your web host or firewall administrator and give them <a href="%s" target="_blank">this information about Akismet&#8217;s system requirements</a>.'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
    3838</div>
    3939<?php elseif ( $type == 'servers-be-down' ) :?>
    4040<div class="wrap alert critical">
    41     <h3 class="key-status failed"><?php esc_html_e("We can&#8217;t connect to your site."); ?></h3>
    42     <p class="description"><?php printf( __('Your firewall may be blocking us. Please contact your host and refer to <a href="%s" target="_blank">our guide about firewalls</a>.'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
     41    <h3 class="key-status failed"><?php esc_html_e("We can&#8217;t connect to your site."); ?></h3>
     42    <p class="description"><?php printf( __('Your firewall may be blocking us. Please contact your host and refer to <a href="%s" target="_blank">our guide about firewalls</a>.'), 'https://blog.akismet.com/akismet-hosting-faq/'); ?></p>
    4343</div>
    4444<?php elseif ( $type == 'overdue' ) :?>
    4545<div class="wrap alert critical">
    46     <h3 class="key-status"><?php esc_html_e("Please update your payment details."); ?></h3>
    47     <p class="description"><?php printf( __('We cannot process your transaction. Please contact your bank for assistance, and <a href="%s" target="_blank">update your payment details</a>.'), 'https://akismet.com/account/'); ?></p>
     46    <h3 class="key-status"><?php esc_html_e("Please update your payment details."); ?></h3>
     47    <p class="description"><?php printf( __('We cannot process your transaction. Please contact your bank for assistance, and <a href="%s" target="_blank">update your payment details</a>.'), 'https://akismet.com/account/'); ?></p>
    4848</div>
    4949<?php elseif ( $type == 'cancelled' ) :?>
    5050<div class="wrap alert critical">
    51     <h3 class="key-status"><?php esc_html_e("Your subscription is cancelled."); ?></h3>
    52     <p class="description"><?php printf( __('Please visit the <a href="%s" target="_blank">Akismet account page</a> to reactivate your subscription.'), 'https://akismet.com/account/'); ?></p>
     51    <h3 class="key-status"><?php esc_html_e("Your subscription is cancelled."); ?></h3>
     52    <p class="description"><?php printf( __('Please visit the <a href="%s" target="_blank">Akismet account page</a> to reactivate your subscription.'), 'https://akismet.com/account/'); ?></p>
    5353</div>
    5454<?php elseif ( $type == 'suspended' ) :?>
    5555<div class="wrap alert critical">
    56     <h3 class="key-status failed"><?php esc_html_e("Your subscription is suspended."); ?></h3>
    57     <p class="description"><?php printf( __('Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.'), 'https://akismet.com/contact/'); ?></p>
     56    <h3 class="key-status failed"><?php esc_html_e("Your subscription is suspended."); ?></h3>
     57    <p class="description"><?php printf( __('Please contact <a href="%s" target="_blank">Akismet support</a> for assistance.'), 'https://akismet.com/contact/'); ?></p>
    5858</div>
    5959<?php elseif ( $type == 'active-notice' && $time_saved ) :?>
    6060<div class="wrap alert active">
    6161    <h3 class="key-status"><?php echo esc_html( $time_saved ); ?></h3>
    62     <p class="description"><?php printf( __('You can help us fight spam and upgrade your account by <a href="%s" target="_blank">contributing a token amount</a>.'), 'https://akismet.com/account/upgrade/'); ?></p>
     62    <p class="description"><?php printf( __('You can help us fight spam and upgrade your account by <a href="%s" target="_blank">contributing a token amount</a>.'), 'https://akismet.com/account/upgrade/'); ?></p>
    6363</div>
    6464<?php elseif ( $type == 'new-key-valid' ) :?>
    6565<div class="wrap alert active">
    66     <h3 class="key-status"><?php esc_html_e('Your Akismet account has been successfully set up and activated. Happy blogging!'); ?></h3>
     66    <h3 class="key-status"><?php esc_html_e('Your Akismet account has been successfully set up and activated. Happy blogging!'); ?></h3>
    6767</div>
    6868<?php elseif ( $type == 'new-key-invalid' ) :?>
    6969<div class="wrap alert critical">
    70     <h3 class="key-status"><?php esc_html_e( 'The key you entered is invalid. Please double-check it.' ); ?></h3>
     70    <h3 class="key-status"><?php esc_html_e( 'The key you entered is invalid. Please double-check it.' ); ?></h3>
    7171</div>
    7272<?php elseif ( $type == 'new-key-failed' ) :?>
    7373<div class="wrap alert critical">
    74     <h3 class="key-status"><?php esc_html_e( 'The key you entered could not be verified because a connection to akismet.com could not be established. Please check your server configuration.' ); ?></h3>
     74    <h3 class="key-status"><?php esc_html_e( 'The key you entered could not be verified because a connection to akismet.com could not be established. Please check your server configuration.' ); ?></h3>
    7575</div>
    7676<?php endif;?>
  • akismet/trunk/views/start.php

    r875752 r878668  
    22    if ( $akismet_user ) :
    33        if ( $akismet_user->status == 'active' ) : // ask do they want to use akismet account found using jetpack wpcom connection ?>
    4 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. To setup Akismet, select one of the options below.'); ?></p>
     4<p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. To setup Akismet, select one of the options below.'); ?></p>
    55<div class="activate-highlight activate-option">
    66    <div class="option-description">
    7         <strong class="small-heading"><?php esc_html_e('Connected via Jetpack'); ?></strong>
     7        <strong class="small-heading"><?php esc_html_e('Connected via Jetpack'); ?></strong>
    88        <?php echo esc_attr( $akismet_user->user_email ); ?>
    99    </div>
     
    1212        <input type="hidden" name="action" value="enter-key">
    1313        <?php wp_nonce_field( Akismet_Admin::NONCE ) ?>
    14         <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Use this Akismet account' ); ?>"/>
     14        <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Use this Akismet account' ); ?>"/>
    1515    </form>
    1616</div>
    1717<div class="activate-highlight secondary activate-option">
    1818    <div class="option-description">
    19         <strong><?php esc_html_e('Create a new API key with a different email address'); ?></strong>
    20         <p><?php esc_html_e('Use this option if you want to setup a new Akismet account.'); ?></p>
     19        <strong><?php esc_html_e('Create a new API key with a different email address'); ?></strong>
     20        <p><?php esc_html_e('Use this option if you want to setup a new Akismet account.'); ?></p>
    2121    </div>
    22     <?php Akismet::view( 'get', array( 'text' => __( 'Register a different email address' ), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?>
     22    <?php Akismet::view( 'get', array( 'text' => __( 'Register a different email address' ), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?>
    2323</div>
    2424<div class="activate-highlight secondary activate-option">
    2525    <div class="option-description">
    26         <strong><?php esc_html_e('Manually enter an API key'); ?></strong>
    27         <p><?php esc_html_e('If you have another API key you want to use.'); ?></p>
     26        <strong><?php esc_html_e('Manually enter an API key'); ?></strong>
     27        <p><?php esc_html_e('If you have another API key you want to use.'); ?></p>
    2828    </div>
    2929    <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-enter-api-key" class="right">
     
    3131        <input type="hidden" name="action" value="enter-key">
    3232        <?php wp_nonce_field( Akismet_Admin::NONCE ) ?>
    33         <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key');?>">
     33        <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key');?>">
    3434    </form>
    3535</div>
    3636<?php elseif ( $akismet_user->status == 'no-account' ) : //no akismet account, ask do they want to use jetpack wpcom account to create one, then redirect to plans page?>
    37 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. Register your email address below to get started.'); ?></p>
     37<p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. Register your email address below to get started.'); ?></p>
    3838<div class="activate-highlight activate-option">
    3939    <div class="option-description">
    40         <strong class="small-heading"><?php esc_html_e('Connected via Jetpack'); ?></strong>
     40        <strong class="small-heading"><?php esc_html_e('Connected via Jetpack'); ?></strong>
    4141        <?php echo esc_attr( $akismet_user->user_email ); ?>
    4242    </div>
     
    4545        <input type="hidden" name="auto-connect" value="<?php echo $akismet_user->ID;?>"/>
    4646        <input type="hidden" name="redirect" value="plugin-signup"/>
    47         <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Register Akismet' ); ?>"/>
     47        <input type="submit" class="button button-primary" value="<?php esc_attr_e( 'Register Akismet' ); ?>"/>
    4848    </form>
    4949</div>
    5050<div class="activate-highlight secondary activate-option">
    5151    <div class="option-description">
    52         <strong><?php esc_html_e('Create a new API key with a different email address'); ?></strong>
    53         <p><?php esc_html_e('Use this option if you want to setup a new Akismet account.'); ?></p>
     52        <strong><?php esc_html_e('Create a new API key with a different email address'); ?></strong>
     53        <p><?php esc_html_e('Use this option if you want to setup a new Akismet account.'); ?></p>
    5454    </div>
    55     <?php Akismet::view( 'get', array( 'text' => __( 'Register a different email address' ), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?>
     55    <?php Akismet::view( 'get', array( 'text' => __( 'Register a different email address' ), 'classes' => array( 'right', 'button', 'button-secondary' ) ) ); ?>
    5656</div>
    5757<div class="activate-highlight secondary activate-option">
    5858    <div class="option-description">
    59         <strong><?php esc_html_e('Manually enter an API key'); ?></strong>
    60         <p><?php esc_html_e('If you have another API key you want to use.'); ?></p>
     59        <strong><?php esc_html_e('Manually enter an API key'); ?></strong>
     60        <p><?php esc_html_e('If you have another API key you want to use.'); ?></p>
    6161    </div>
    6262    <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-enter-api-key" class="right">
     
    6464        <input type="hidden" name="action" value="enter-key">
    6565        <?php wp_nonce_field( Akismet_Admin::NONCE ) ?>
    66         <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key');?>">
     66        <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key');?>">
    6767    </form>
    6868</div>
    6969<?php elseif ( $akismet_user->status == 'suspended' ) : //has an akismet account but the key is suspended, need to upgrade their account to unsuspend key ?>
    70 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site.'); ?></p>
     70<p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site.'); ?></p>
    7171<div class="activate-highlight centered activate-option">
    72     <strong class="small-heading"><?php esc_html_e( 'Connected via Jetpack' ); ?></strong>
    73     <h3 class="alert-text" s><?php printf( esc_html__( 'Your subscription for %s is suspended' ), $akismet_user->user_email ); ?></h3>
    74     <p><?php esc_html_e('No worries! Get in touch and we&#8217;ll help sort this out.'); ?></p>
    75     <a href="https://akismet.com/contact" class="button button-primary"><?php esc_html_e( 'Contact Akismet support' ); ?></a>
     72    <strong class="small-heading"><?php esc_html_e( 'Connected via Jetpack' ); ?></strong>
     73    <h3 class="alert-text" s><?php printf( esc_html__( 'Your subscription for %s is suspended' ), $akismet_user->user_email ); ?></h3>
     74    <p><?php esc_html_e('No worries! Get in touch and we&#8217;ll help sort this out.'); ?></p>
     75    <a href="https://akismet.com/contact" class="button button-primary"><?php esc_html_e( 'Contact Akismet support' ); ?></a>
    7676
    7777</div><?php
    7878        endif;
    7979    else :?>
    80 <p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. To setup Akismet, select one of the options below.'); ?></p>
     80<p><?php esc_html_e('Akismet eliminates the comment and trackback spam you get on your site. To setup Akismet, select one of the options below.'); ?></p>
    8181<div class="activate-highlight activate-option">
    8282    <div class="option-description">
    83         <strong><?php esc_html_e( 'New to Akismet?' );?></strong>
    84         <p><?php esc_html_e('Get started now to squash the comment and trackback spam you get.'); ?></p>
     83        <strong><?php esc_html_e( 'New to Akismet?' );?></strong>
     84        <p><?php esc_html_e('Get started now to squash the comment and trackback spam you get.'); ?></p>
    8585    </div>
    86     <?php Akismet::view( 'get', array( 'text' => __( 'Get an Akismet account' ), 'classes' => array( 'right', 'button', 'button-primary' ) ) ); ?>
     86    <?php Akismet::view( 'get', array( 'text' => __( 'Get an Akismet account' ), 'classes' => array( 'right', 'button', 'button-primary' ) ) ); ?>
    8787</div>
    8888<div class="activate-highlight secondary activate-option">
    8989    <div class="option-description">
    90         <strong><?php esc_html_e('Manually enter an API key'); ?></strong>
    91         <p><?php esc_html_e('If you have another API key you want to use.'); ?></p>
     90        <strong><?php esc_html_e('Manually enter an API key'); ?></strong>
     91        <p><?php esc_html_e('If you have another API key you want to use.'); ?></p>
    9292    </div>
    9393    <form action="<?php echo esc_url( Akismet_Admin::get_page_url() ); ?>" method="post" id="akismet-enter-api-key" class="right">
     
    9595        <input type="hidden" name="action" value="enter-key">
    9696        <?php wp_nonce_field( Akismet_Admin::NONCE ); ?>
    97         <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key');?>">
     97        <input type="submit" name="submit" id="submit" class="button button-secondary" value="<?php esc_attr_e('Use this key');?>">
    9898    </form>
    9999</div><?php
  • akismet/trunk/views/stats.php

    r874104 r878668  
    11<div class="wrap">
    2     <h2><?php esc_html_e( 'Akismet Stats' );?><?php if ( !isset( $hide_settings_link ) ): ?> <a href="<?php echo esc_url( Akismet_Admin::get_page_url() );?>" class="add-new-h2"><?php esc_html_e( 'Settings' );?></a><?php endif;?></h2>
     2    <h2><?php esc_html_e( 'Akismet Stats' );?></a><?php endif;?></h2>
    33    <iframe src="<?php echo esc_url( sprintf( '%s://akismet.com/web/1.0/user-stats.php?blog=%s&api_key=%s', is_ssl()?'https':'http', urlencode( get_bloginfo('url') ), Akismet::get_api_key() ) ); ?>" width="100%" height="2500px" frameborder="0" id="akismet-stats-frame"></iframe>
    44</div>
  • akismet/trunk/views/strict.php

    r873760 r878668  
    11<tr valign="top">
    2     <th scope="row"><?php esc_html_e('Akismet anti-spam strictness'); ?></th>
    3     <td><fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness'); ?></span></legend>
    4     <p><label for="akismet_strictness_1"><input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked('1', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Strict: silently discard the worst and most pervasive spam.'); ?></label></p>
    5     <p><label for="akismet_strictness_0"><input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked('0', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Safe: always put spam in the Spam folder for review.'); ?></label></p>
     2    <th scope="row"><?php esc_html_e('Akismet anti-spam strictness'); ?></th>
     3    <td><fieldset><legend class="screen-reader-text"><span><?php esc_html_e('Akismet anti-spam strictness'); ?></span></legend>
     4    <p><label for="akismet_strictness_1"><input type="radio" name="akismet_strictness" id="akismet_strictness_1" value="1" <?php checked('1', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Strict: silently discard the worst and most pervasive spam.'); ?></label></p>
     5    <p><label for="akismet_strictness_0"><input type="radio" name="akismet_strictness" id="akismet_strictness_0" value="0" <?php checked('0', get_option('akismet_strictness')); ?> /> <?php esc_html_e('Safe: always put spam in the Spam folder for review.'); ?></label></p>
    66    </fieldset></td>
    77</tr>
Note: See TracChangeset for help on using the changeset viewer.