Skip to:
Content

BuddyPress.org

Changeset 12586


Ignore:
Timestamp:
03/28/2020 01:31:24 PM (5 years ago)
Author:
imath
Message:

BP Activity: add missing /* translators */ comments

See #8260

Location:
trunk/src/bp-activity
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/actions/feeds.php

    r11885 r12586  
    2525        'id'            => 'sitewide',
    2626
    27         /* translators: Sitewide activity RSS title - "[Site Name] | Site Wide Activity" */
     27        /* translators: %s Site Name */
    2828        'title'         => sprintf( __( '%s | Site-Wide Activity', 'buddypress' ), bp_get_site_name() ),
    29 
    3029        'link'          => bp_get_activity_directory_permalink(),
    3130        'description'   => __( 'Activity feed for the entire site.', 'buddypress' ),
     
    5150        'id'            => 'personal',
    5251
    53         /* translators: Personal activity RSS title - "[Site Name] | [User Display Name] | Activity" */
    54         'title'         => sprintf( __( '%1$s | %2$s | Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
     52        /* translators: 1: Site Name. 2: User Display Name. */
     53        'title'         => sprintf( _x( '%1$s | %2$s | Activity', 'Personal activity feed title', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
     54        'link'          => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() ),
    5555
    56         'link'          => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() ),
     56        /* translators: %s: User Display Name */
    5757        'description'   => sprintf( __( 'Activity feed for %s.', 'buddypress' ), bp_get_displayed_user_fullname() ),
    5858        'activity_args' => 'user_id=' . bp_displayed_user_id()
     
    7777        'id'            => 'friends',
    7878
    79         /* translators: Friends activity RSS title - "[Site Name] | [User Display Name] | Friends Activity" */
     79        /* translators: 1: Site Name 2: User Display Name */
    8080        'title'         => sprintf( __( '%1$s | %2$s | Friends Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
     81        'link'          => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() ),
    8182
    82         'link'          => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() ),
     83        /* translators: %s: User Display Name */
    8384        'description'   => sprintf( __( "Activity feed for %s's friends.", 'buddypress' ), bp_get_displayed_user_fullname() ),
    8485        'activity_args' => 'scope=friends'
     
    107108        'id'            => 'mygroups',
    108109
    109         /* translators: Member groups activity RSS title - "[Site Name] | [User Display Name] | Groups Activity" */
     110        /* translators: 1: Site Name 2: User Display Name */
    110111        'title'         => sprintf( __( '%1$s | %2$s | Group Activity', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
     112        'link'          => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() ),
    111113
    112         'link'          => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() ),
     114        /* translators: %s: User Display Name */
    113115        'description'   => sprintf( __( "Public group activity feed of which %s is a member.", 'buddypress' ), bp_get_displayed_user_fullname() ),
    114116        'activity_args' => array(
     
    141143        'id'            => 'mentions',
    142144
    143         /* translators: User mentions activity RSS title - "[Site Name] | [User Display Name] | Mentions" */
     145        /* translators: 1: Site Name 2: User Display Name */
    144146        'title'         => sprintf( __( '%1$s | %2$s | Mentions', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
     147        'link'          => bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/',
    145148
    146         'link'          => bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/',
     149        /* translators: %s: User Display Name */
    147150        'description'   => sprintf( __( "Activity feed mentioning %s.", 'buddypress' ), bp_get_displayed_user_fullname() ),
    148151        'activity_args' => array(
     
    173176        'id'            => 'favorites',
    174177
    175         /* translators: User activity favorites RSS title - "[Site Name] | [User Display Name] | Favorites" */
     178        /* translators: 1: Site Name 2: User Display Name */
    176179        'title'         => sprintf( __( '%1$s | %2$s | Favorites', 'buddypress' ), bp_get_site_name(), bp_get_displayed_user_fullname() ),
     180        'link'          => bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/',
    177181
    178         'link'          => bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/',
     182        /* translators: %s: User Display Name */
    179183        'description'   => sprintf( __( "Activity feed of %s's favorites.", 'buddypress' ), bp_get_displayed_user_fullname() ),
    180184        'activity_args' => 'include=' . $fav_ids
  • trunk/src/bp-activity/bp-activity-admin.php

    r12542 r12586  
    661661
    662662    <div class="wrap">
    663         <h1><?php printf( __( 'Editing Activity (ID #%s)', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) ); ?></h1>
     663        <h1>
     664            <?php
     665            /* translators: %s: the activity ID */
     666            printf( __( 'Editing Activity (ID #%s)', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) );
     667            ?>
     668        </h1>
    664669
    665670        <?php if ( ! empty( $activity ) ) : ?>
     
    762767                    $date  = date_i18n( $datef, strtotime( $item->date_recorded ) );
    763768                    ?>
    764                     <span id="timestamp"><?php printf( __( 'Submitted on: %s', 'buddypress' ), '<strong>' . $date . '</strong>' ); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e( 'Edit', 'buddypress' ); ?></a>
     769                    <span id="timestamp">
     770                        <?php
     771                        /* translators: %s: the date the activity was submitted on */
     772                        printf( __( 'Submitted on: %s', 'buddypress' ), '<strong>' . $date . '</strong>' );
     773                        ?>
     774                    </span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e( 'Edit', 'buddypress' ); ?></a>
    765775
    766776                    <div id='timestampdiv' class='hide-if-js'>
     
    900910     */
    901911    if ( ! isset( $actions[ $selected ] ) ) {
    902         _doing_it_wrong( __FUNCTION__, sprintf( __( 'This activity item has a type (%s) that is not registered using bp_activity_set_action(), so no label is available.', 'buddypress' ), $selected ), '2.0.0' );
     912        _doing_it_wrong(
     913            __FUNCTION__,
     914            sprintf(
     915                /* translators: %s: the name of the activity type */
     916                __( 'This activity item has a type (%s) that is not registered using bp_activity_set_action(), so no label is available.', 'buddypress' ),
     917                $selected
     918            ),
     919            '2.0.0'
     920        );
     921
    903922        $actions[ $selected ] = $selected;
    904923    }
     
    974993        $errors = array_values( $errors );
    975994
    976         if ( $deleted > 0 )
     995        if ( $deleted > 0 ) {
     996            /* translators: %s: the number of permanently deleted activities */
    977997            $messages[] = sprintf( _n( '%s activity item has been permanently deleted.', '%s activity items have been permanently deleted.', $deleted, 'buddypress' ), number_format_i18n( $deleted ) );
     998        }
    978999
    9791000        if ( ! empty( $errors ) ) {
    9801001            if ( 1 == count( $errors ) ) {
     1002                /* translators: %s: the ID of the activity which errored during an update */
    9811003                $messages[] = sprintf( __( 'An error occurred when trying to update activity ID #%s.', 'buddypress' ), number_format_i18n( $errors[0] ) );
    9821004
     
    9871009                // Display each error as a list item.
    9881010                foreach ( $errors as $error ) {
    989                     // Translators: This is a bulleted list of item IDs.
     1011                    /* Translators: %s: the activity ID */
    9901012                    $error_msg .= '<li>' . sprintf( __( '#%s', 'buddypress' ), number_format_i18n( $error ) ) . '</li>';
    9911013                }
     
    9961018        }
    9971019
    998         if ( $spammed > 0 )
     1020        if ( $spammed > 0 ) {
     1021            /* translators: %s: the number of activities successfully marked as spam */
    9991022            $messages[] = sprintf( _n( '%s activity item has been successfully spammed.', '%s activity items have been successfully spammed.', $spammed, 'buddypress' ), number_format_i18n( $spammed ) );
    1000 
    1001         if ( $unspammed > 0 )
     1023        }
     1024
     1025        if ( $unspammed > 0 ) {
     1026            /* translators: %s: the number of activities successfully marked as ham */
    10021027            $messages[] = sprintf( _n( '%s activity item has been successfully unspammed.', '%s activity items have been successfully unspammed.', $unspammed, 'buddypress' ), number_format_i18n( $unspammed ) );
    1003 
    1004         if ( $updated > 0 )
     1028        }
     1029
     1030        if ( $updated > 0 ) {
    10051031            $messages[] = __( 'The activity item has been updated successfully.', 'buddypress' );
     1032        }
    10061033    }
    10071034
     
    10211048        <h1>
    10221049            <?php if ( !empty( $_REQUEST['aid'] ) ) : ?>
    1023                 <?php printf( __( 'Activity related to ID #%s', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) ); ?>
     1050                <?php
     1051                /* translators: %s: the activity ID */
     1052                printf( __( 'Activity related to ID #%s', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) );
     1053                ?>
    10241054            <?php else : ?>
    10251055                <?php _ex( 'Activity', 'Admin SWA page', 'buddypress' ); ?>
     
    10271057
    10281058            <?php if ( !empty( $_REQUEST['s'] ) ) : ?>
    1029                 <span class="subtitle"><?php printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) ); ?></span>
     1059                <span class="subtitle">
     1060                    <?php
     1061                    /* translators: %s: the activity search terms */
     1062                    printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) );
     1063                    ?>
     1064                </span>
    10301065            <?php endif; ?>
    10311066        </h1>
  • trunk/src/bp-activity/bp-activity-embeds.php

    r12542 r12586  
    282282            // Show author info.
    283283            if ( isset( $oembed->provider_name ) && isset( $oembed->author_name ) ) {
    284                 /* translators: By [oEmbed author] on [oEmbed provider]. eg. By BuddyPress on YouTube. */
     284                /* translators: 1: oEmbed author. 2: oEmbed provider. eg. By BuddyPress on YouTube. */
    285285                $anchor_text = sprintf( __( 'By %1$s on %2$s', 'buddypress' ), $oembed->author_name, $oembed->provider_name );
    286286
    287287            } elseif ( isset( $oembed->provider_name ) ) {
     288                /* translators: %s: oEmbed provider. */
    288289                $anchor_text = sprintf( __( 'View on %s', 'buddypress' ), $oembed->provider_name );
    289290            }
  • trunk/src/bp-activity/bp-activity-functions.php

    r12542 r12586  
    15241524 */
    15251525function bp_activity_format_activity_action_activity_update( $action, $activity ) {
    1526     $action = sprintf( esc_html__( '%s posted an update', 'buddypress' ), bp_core_get_userlink( $activity->user_id ) );
     1526    $action = sprintf(
     1527        /* translators: %s: the activity author user link */
     1528        esc_html__( '%s posted an update', 'buddypress' ),
     1529        bp_core_get_userlink( $activity->user_id )
     1530    );
    15271531
    15281532    /**
     
    15471551 */
    15481552function bp_activity_format_activity_action_activity_comment( $action, $activity ) {
    1549     $action = sprintf( esc_html__( '%s posted a new activity comment', 'buddypress' ), bp_core_get_userlink( $activity->user_id ) );
     1553    $action = sprintf(
     1554        /* translators: %s: the activity author user link */
     1555        esc_html__( '%s posted a new activity comment', 'buddypress' ),
     1556        bp_core_get_userlink( $activity->user_id )
     1557    );
    15501558
    15511559    /**
     
    15981606            $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_action_ms, $user_link, esc_url( $post_url ), $blog_link );
    15991607        } else {
    1600 
     1608            /* translators: 1: the activity author user link. 2: the post link. 3: the blog link. */
    16011609            $action = sprintf( esc_html_x( '%1$s wrote a new %2$s, on the site %3$s', 'Activity Custom Post Type post action', 'buddypress' ), $user_link, $post_link, $blog_link );
    16021610        }
     
    16051613            $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_action, $user_link, $post_url );
    16061614        } else {
     1615            /* translators: 1: the activity author user link. 2: the post link. */
    16071616            $action = sprintf( esc_html_x( '%1$s wrote a new %2$s', 'Activity Custom Post Type post action', 'buddypress' ), $user_link, $post_link );
    16081617        }
     
    16511660            $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_comment_action_ms, $user_link, $activity->primary_link, $blog_link );
    16521661        } else {
     1662            /* translators: 1: the activity author user link. 2: the post link. 3: the blog link. */
    16531663            $action = sprintf( esc_html_x( '%1$s commented on the %2$s, on the site %3$s', 'Activity Custom Post Type comment action', 'buddypress' ), $user_link, $post_link, $blog_link );
    16541664        }
     
    16571667            $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_comment_action, $user_link, $activity->primary_link );
    16581668        } else {
     1669            /* translators: 1: the activity author user link. 2: the post link. */
    16591670            $action = sprintf( esc_html_x( '%1$s commented on the %2$s', 'Activity Custom Post Type post comment action', 'buddypress' ), $user_link, $post_link );
    16601671        }
  • trunk/src/bp-activity/bp-activity-notifications.php

    r12222 r12586  
    3535            $action_filter = 'at_mentions';
    3636            $link          = bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/';
    37             $title         = sprintf( __( '@%s Mentions', 'buddypress' ), bp_get_loggedin_user_username() );
    38             $amount        = 'single';
     37
     38            /* translators: %s: the current user display name */
     39            $title  = sprintf( __( '@%s Mentions', 'buddypress' ), bp_get_loggedin_user_username() );
     40            $amount = 'single';
    3941
    4042            if ( (int) $total_items > 1 ) {
     43                /* translators: 1: the number of activity mentions */
    4144                $text   = sprintf( __( 'You have %1$d new mentions', 'buddypress' ), (int) $total_items );
    4245                $amount = 'multiple';
    4346            } else {
     47                /* translators: 1: the user display name */
    4448                $text = sprintf( __( '%1$s mentioned you', 'buddypress' ), $user_fullname );
    4549            }
     
    5256
    5357            if ( (int) $total_items > 1 ) {
    54                 $link   = add_query_arg( 'type', $action, $link );
     58                $link = add_query_arg( 'type', $action, $link );
     59
     60                /* translators: 1: the number of activity replies */
    5561                $text   = sprintf( __( 'You have %1$d new replies', 'buddypress' ), (int) $total_items );
    5662                $amount = 'multiple';
    5763            } else {
    5864                $link = add_query_arg( 'rid', (int) $id, bp_activity_get_permalink( $activity_id ) );
     65
     66                /* translators: 1: the user display name */
    5967                $text = sprintf( __( '%1$s commented on one of your updates', 'buddypress' ), $user_fullname );
    6068            }
     
    6775
    6876            if ( (int) $total_items > 1 ) {
    69                 $link   = add_query_arg( 'type', $action, $link );
     77                $link = add_query_arg( 'type', $action, $link );
     78
     79                /* translators: 1: the number of activity comment replies */
    7080                $text   = sprintf( __( 'You have %1$d new comment replies', 'buddypress' ), (int) $total_items );
    7181                $amount = 'multiple';
    7282            } else {
    7383                $link = add_query_arg( 'crid', (int) $id, bp_activity_get_permalink( $activity_id ) );
     84
     85                /* translators: 1: the user display name */
    7486                $text = sprintf( __( '%1$s replied to one of your activity comments', 'buddypress' ), $user_fullname );
    7587            }
     
    397409                <tr id="activity-notification-settings-mentions">
    398410                    <td>&nbsp;</td>
    399                     <td><?php printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) ) ?></td>
     411                    <td>
     412                        <?php
     413                        /* translators: %s: the displayed user username */
     414                        printf( __( 'A member mentions you in an update using "@%s"', 'buddypress' ), bp_core_get_username( bp_displayed_user_id() ) );
     415                        ?>
     416                    </td>
    400417                    <td class="yes"><input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-yes" value="yes" <?php checked( $mention, 'yes', true ) ?>/><label for="notification-activity-new-mention-yes" class="bp-screen-reader-text"><?php
    401418                        /* translators: accessibility text */
    402                         _e( 'Yes, send email', 'buddypress' );
     419                        esc_html_e( 'Yes, send email', 'buddypress' );
    403420                    ?></label></td>
    404421                    <td class="no"><input type="radio" name="notifications[notification_activity_new_mention]" id="notification-activity-new-mention-no" value="no" <?php checked( $mention, 'no', true ) ?>/><label for="notification-activity-new-mention-no" class="bp-screen-reader-text"><?php
    405422                        /* translators: accessibility text */
    406                         _e( 'No, do not send email', 'buddypress' );
     423                        esc_html_e( 'No, do not send email', 'buddypress' );
    407424                    ?></label></td>
    408425                </tr>
     
    414431                <td class="yes"><input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-yes" value="yes" <?php checked( $reply, 'yes', true ) ?>/><label for="notification-activity-new-reply-yes" class="bp-screen-reader-text"><?php
    415432                    /* translators: accessibility text */
    416                     _e( 'Yes, send email', 'buddypress' );
     433                    esc_html_e( 'Yes, send email', 'buddypress' );
    417434                ?></label></td>
    418435                <td class="no"><input type="radio" name="notifications[notification_activity_new_reply]" id="notification-activity-new-reply-no" value="no" <?php checked( $reply, 'no', true ) ?>/><label for="notification-activity-new-reply-no" class="bp-screen-reader-text"><?php
    419436                    /* translators: accessibility text */
    420                     _e( 'No, do not send email', 'buddypress' );
     437                    esc_html_e( 'No, do not send email', 'buddypress' );
    421438                ?></label></td>
    422439            </tr>
  • trunk/src/bp-activity/bp-activity-template.php

    r12564 r12586  
    453453            $message = __( 'Viewing 1 item', 'buddypress' );
    454454        } else {
     455            /* translators: 1: the from number item. 2: the to number item. 3: the total number of items. */
    455456            $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s item', 'Viewing %1$s - %2$s of %3$s items', $activities_template->total_activity_count, 'buddypress' ), $from_num, $to_num, $total );
    456457        }
     
    10351036
    10361037        // Prepend some descriptive text to alt.
    1037         $alt_default = !empty( $dn_default ) ? sprintf( __( 'Profile picture of %s', 'buddypress' ), $dn_default ) : __( 'Profile picture', 'buddypress' );
     1038        $alt_default = __( 'Profile picture', 'buddypress' );
     1039        if ( ! empty( $dn_default ) ) {
     1040            /* translators: %s: member name */
     1041            $alt_default = sprintf( __( 'Profile picture of %s', 'buddypress' ), $dn_default );
     1042        }
    10381043
    10391044        $defaults = array(
     
    11831188
    11841189                    if ( ! empty( $name ) ) {
     1190                        /* translators: %s: the Group name */
    11851191                        $alt = sprintf( __( 'Group logo of %s', 'buddypress' ), $name );
    11861192                    }
     
    11941200
    11951201                if ( empty( $alt ) ) {
     1202                    /* translators: %s: the blog name */
    11961203                    $alt = sprintf( __( 'Profile picture of the author of the site %s', 'buddypress' ), get_blog_option( $item_id, 'blogname' ) );
    11971204                }
     
    12041211
    12051212                if ( empty( $alt ) ) {
     1213                    /* translators: %s: member name */
    12061214                    $alt = sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $activities_template->activity->secondary_item_id ) );
    12071215                }
     
    12151223
    12161224                if ( empty( $alt ) ) {
     1225                    /* translators: %s: member name */
    12171226                    $alt = sprintf( __( 'Profile picture of %s', 'buddypress' ), $activities_template->activity->display_name );
    12181227                }
     
    21722181        // Deprecated notice about $args.
    21732182        if ( ! empty( $deprecated ) ) {
    2174             _deprecated_argument( __FUNCTION__, '1.2', sprintf( __( '%1$s no longer accepts arguments. See the inline documentation at %2$s for more details.', 'buddypress' ), __FUNCTION__, __FILE__ ) );
     2183            _deprecated_argument(
     2184                __FUNCTION__,
     2185                '1.2',
     2186                sprintf(
     2187                    /* translators: 1: the name of the function. 2: the name of the file. */
     2188                    __( '%1$s no longer accepts arguments. See the inline documentation at %2$s for more details.', 'buddypress' ),
     2189                    __FUNCTION__,
     2190                    __FILE__
     2191                )
     2192            );
    21752193        }
    21762194
  • trunk/src/bp-activity/classes/class-bp-activity-activity.php

    r12426 r12586  
    365365        // Backward compatibility with old method of passing arguments.
    366366        if ( !is_array( $args ) || count( $function_args ) > 1 ) {
    367             _deprecated_argument( __METHOD__, '1.6', sprintf( __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ), __METHOD__, __FILE__ ) );
     367            _deprecated_argument(
     368                __METHOD__,
     369                '1.6',
     370                sprintf(
     371                    /* translators: 1: the name of the method. 2: the name of the file. */
     372                    __( 'Arguments passed to %1$s should be in an associative array. See the inline documentation at %2$s for more details.', 'buddypress' ),
     373                    __METHOD__,
     374                    __FILE__
     375                )
     376            );
    368377
    369378            $old_args_keys = array(
  • trunk/src/bp-activity/classes/class-bp-activity-component.php

    r12542 r12586  
    432432                    'item_id' => bp_displayed_user_id(),
    433433                    'type'    => 'thumb',
    434                     'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() )
     434                    'alt'     => sprintf(
     435                        /* translators: %s: member name */
     436                        __( 'Profile picture of %s', 'buddypress' ),
     437                        bp_get_displayed_user_fullname()
     438                    ),
    435439                ) );
    436440                $bp->bp_options_title  = bp_get_displayed_user_fullname();
  • trunk/src/bp-activity/classes/class-bp-activity-list-table.php

    r12563 r12586  
    605605            echo $actions[ $item['type'] ];
    606606        } else {
     607            /* translators: %s: the name of the activity type */
    607608            printf( __( 'Unregistered action - %s', 'buddypress' ), $item['type'] );
    608609        }
  • trunk/src/bp-activity/classes/class-bp-akismet.php

    r11950 r12586  
    9393            $who = bp_activity_get_meta( $activity['id'], '_bp_akismet_user' );
    9494
    95             if ( 'true' == $user_result )
     95            if ( 'true' == $user_result ) {
     96                /* translators: %s: the name of the user */
    9697                $desc = sprintf( __( 'Flagged as spam by %s', 'buddypress' ), $who );
    97             else
     98            } else {
     99                /* translators: %s: the name of the user */
    98100                $desc = sprintf( __( 'Un-spammed by %s', 'buddypress' ), $who );
     101            }
    99102        }
    100103
     
    443446            return;
    444447
    445         $this->update_activity_history( $activity->id, sprintf( __( '%s reported this activity as spam', 'buddypress' ), bp_get_loggedin_user_username() ), 'report-spam' );
     448        $this->update_activity_history(
     449            $activity->id,
     450            sprintf(
     451                /* translators: %s: the current user username */
     452                __( '%s reported this activity as spam', 'buddypress' ),
     453                bp_get_loggedin_user_username()
     454            ),
     455            'report-spam'
     456        );
     457
    446458        bp_activity_update_meta( $activity->id, '_bp_akismet_user_result', 'true' );
    447459        bp_activity_update_meta( $activity->id, '_bp_akismet_user', bp_get_loggedin_user_username() );
     
    460472            return;
    461473
    462         $this->update_activity_history( $activity->id, sprintf( __( '%s reported this activity as not spam', 'buddypress' ), bp_get_loggedin_user_username() ), 'report-ham' );
     474        $this->update_activity_history(
     475            $activity->id,
     476            sprintf(
     477                /* translators: %s: the current user username */
     478                __( '%s reported this activity as not spam', 'buddypress' ),
     479                bp_get_loggedin_user_username()
     480            ),
     481            'report-ham'
     482        );
     483
    463484        bp_activity_update_meta( $activity->id, '_bp_akismet_user_result', 'false' );
    464485        bp_activity_update_meta( $activity->id, '_bp_akismet_user', bp_get_loggedin_user_username() );
     
    494515        } else {
    495516            bp_activity_update_meta( $activity->id, '_bp_akismet_error', bp_core_current_time() );
    496             $this->update_activity_history( $activity->id, sprintf( __( 'Akismet was unable to check this item (response: %s), will automatically retry again later.', 'buddypress' ), $this->last_activity->akismet_submission['bp_as_result'] ), 'check-error' );
     517            $this->update_activity_history(
     518                $activity->id,
     519                sprintf(
     520                    /* translators: %s the akismet result */
     521                    __( 'Akismet was unable to check this item (response: %s), will automatically retry again later.', 'buddypress' ),
     522                    $this->last_activity->akismet_submission['bp_as_result']
     523                ),
     524                'check-error'
     525            );
    497526        }
    498527
     
    619648
    620649        echo '<div class="akismet-history"><div>';
     650        /* translators: 1: the human diff time. 2: the akismet history data. */
    621651        printf( _x( '%1$s &mdash; %2$s', 'x hours ago - akismet cleared this item', 'buddypress' ), '<span>' . bp_core_time_since( $history[2] ) . '</span>', esc_html( $history[1] ) );
    622652        echo '</div></div>';
Note: See TracChangeset for help on using the changeset viewer.