Changeset 12586
- Timestamp:
- 03/28/2020 01:31:24 PM (5 years ago)
- Location:
- trunk/src/bp-activity
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/actions/feeds.php
r11885 r12586 25 25 'id' => 'sitewide', 26 26 27 /* translators: Sitewide activity RSS title - "[Site Name] | Site Wide Activity"*/27 /* translators: %s Site Name */ 28 28 'title' => sprintf( __( '%s | Site-Wide Activity', 'buddypress' ), bp_get_site_name() ), 29 30 29 'link' => bp_get_activity_directory_permalink(), 31 30 'description' => __( 'Activity feed for the entire site.', 'buddypress' ), … … 51 50 'id' => 'personal', 52 51 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() ), 55 55 56 'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() ),56 /* translators: %s: User Display Name */ 57 57 'description' => sprintf( __( 'Activity feed for %s.', 'buddypress' ), bp_get_displayed_user_fullname() ), 58 58 'activity_args' => 'user_id=' . bp_displayed_user_id() … … 77 77 'id' => 'friends', 78 78 79 /* translators: Friends activity RSS title - "[Site Name] | [User Display Name] | Friends Activity"*/79 /* translators: 1: Site Name 2: User Display Name */ 80 80 '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() ), 81 82 82 'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() ),83 /* translators: %s: User Display Name */ 83 84 'description' => sprintf( __( "Activity feed for %s's friends.", 'buddypress' ), bp_get_displayed_user_fullname() ), 84 85 'activity_args' => 'scope=friends' … … 107 108 'id' => 'mygroups', 108 109 109 /* translators: Member groups activity RSS title - "[Site Name] | [User Display Name] | Groups Activity"*/110 /* translators: 1: Site Name 2: User Display Name */ 110 111 '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() ), 111 113 112 'link' => trailingslashit( bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() ),114 /* translators: %s: User Display Name */ 113 115 'description' => sprintf( __( "Public group activity feed of which %s is a member.", 'buddypress' ), bp_get_displayed_user_fullname() ), 114 116 'activity_args' => array( … … 141 143 'id' => 'mentions', 142 144 143 /* translators: User mentions activity RSS title - "[Site Name] | [User Display Name] | Mentions"*/145 /* translators: 1: Site Name 2: User Display Name */ 144 146 '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/', 145 148 146 'link' => bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/',149 /* translators: %s: User Display Name */ 147 150 'description' => sprintf( __( "Activity feed mentioning %s.", 'buddypress' ), bp_get_displayed_user_fullname() ), 148 151 'activity_args' => array( … … 173 176 'id' => 'favorites', 174 177 175 /* translators: User activity favorites RSS title - "[Site Name] | [User Display Name] | Favorites"*/178 /* translators: 1: Site Name 2: User Display Name */ 176 179 '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/', 177 181 178 'link' => bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/',182 /* translators: %s: User Display Name */ 179 183 'description' => sprintf( __( "Activity feed of %s's favorites.", 'buddypress' ), bp_get_displayed_user_fullname() ), 180 184 'activity_args' => 'include=' . $fav_ids -
trunk/src/bp-activity/bp-activity-admin.php
r12542 r12586 661 661 662 662 <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> 664 669 665 670 <?php if ( ! empty( $activity ) ) : ?> … … 762 767 $date = date_i18n( $datef, strtotime( $item->date_recorded ) ); 763 768 ?> 764 <span id="timestamp"><?php printf( __( 'Submitted on: %s', 'buddypress' ), '<strong>' . $date . '</strong>' ); ?></span> <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> <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e( 'Edit', 'buddypress' ); ?></a> 765 775 766 776 <div id='timestampdiv' class='hide-if-js'> … … 900 910 */ 901 911 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 903 922 $actions[ $selected ] = $selected; 904 923 } … … 974 993 $errors = array_values( $errors ); 975 994 976 if ( $deleted > 0 ) 995 if ( $deleted > 0 ) { 996 /* translators: %s: the number of permanently deleted activities */ 977 997 $messages[] = sprintf( _n( '%s activity item has been permanently deleted.', '%s activity items have been permanently deleted.', $deleted, 'buddypress' ), number_format_i18n( $deleted ) ); 998 } 978 999 979 1000 if ( ! empty( $errors ) ) { 980 1001 if ( 1 == count( $errors ) ) { 1002 /* translators: %s: the ID of the activity which errored during an update */ 981 1003 $messages[] = sprintf( __( 'An error occurred when trying to update activity ID #%s.', 'buddypress' ), number_format_i18n( $errors[0] ) ); 982 1004 … … 987 1009 // Display each error as a list item. 988 1010 foreach ( $errors as $error ) { 989 / / Translators: This is a bulleted list of item IDs.1011 /* Translators: %s: the activity ID */ 990 1012 $error_msg .= '<li>' . sprintf( __( '#%s', 'buddypress' ), number_format_i18n( $error ) ) . '</li>'; 991 1013 } … … 996 1018 } 997 1019 998 if ( $spammed > 0 ) 1020 if ( $spammed > 0 ) { 1021 /* translators: %s: the number of activities successfully marked as spam */ 999 1022 $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 */ 1002 1027 $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 ) { 1005 1031 $messages[] = __( 'The activity item has been updated successfully.', 'buddypress' ); 1032 } 1006 1033 } 1007 1034 … … 1021 1048 <h1> 1022 1049 <?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 ?> 1024 1054 <?php else : ?> 1025 1055 <?php _ex( 'Activity', 'Admin SWA page', 'buddypress' ); ?> … … 1027 1057 1028 1058 <?php if ( !empty( $_REQUEST['s'] ) ) : ?> 1029 <span class="subtitle"><?php printf( __( 'Search results for “%s”', '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 “%s”', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) ); 1063 ?> 1064 </span> 1030 1065 <?php endif; ?> 1031 1066 </h1> -
trunk/src/bp-activity/bp-activity-embeds.php
r12542 r12586 282 282 // Show author info. 283 283 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. */ 285 285 $anchor_text = sprintf( __( 'By %1$s on %2$s', 'buddypress' ), $oembed->author_name, $oembed->provider_name ); 286 286 287 287 } elseif ( isset( $oembed->provider_name ) ) { 288 /* translators: %s: oEmbed provider. */ 288 289 $anchor_text = sprintf( __( 'View on %s', 'buddypress' ), $oembed->provider_name ); 289 290 } -
trunk/src/bp-activity/bp-activity-functions.php
r12542 r12586 1524 1524 */ 1525 1525 function 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 ); 1527 1531 1528 1532 /** … … 1547 1551 */ 1548 1552 function 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 ); 1550 1558 1551 1559 /** … … 1598 1606 $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_action_ms, $user_link, esc_url( $post_url ), $blog_link ); 1599 1607 } else { 1600 1608 /* translators: 1: the activity author user link. 2: the post link. 3: the blog link. */ 1601 1609 $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 ); 1602 1610 } … … 1605 1613 $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_action, $user_link, $post_url ); 1606 1614 } else { 1615 /* translators: 1: the activity author user link. 2: the post link. */ 1607 1616 $action = sprintf( esc_html_x( '%1$s wrote a new %2$s', 'Activity Custom Post Type post action', 'buddypress' ), $user_link, $post_link ); 1608 1617 } … … 1651 1660 $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_comment_action_ms, $user_link, $activity->primary_link, $blog_link ); 1652 1661 } else { 1662 /* translators: 1: the activity author user link. 2: the post link. 3: the blog link. */ 1653 1663 $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 ); 1654 1664 } … … 1657 1667 $action = sprintf( $bp->activity->track[ $activity->type ]->new_post_type_comment_action, $user_link, $activity->primary_link ); 1658 1668 } else { 1669 /* translators: 1: the activity author user link. 2: the post link. */ 1659 1670 $action = sprintf( esc_html_x( '%1$s commented on the %2$s', 'Activity Custom Post Type post comment action', 'buddypress' ), $user_link, $post_link ); 1660 1671 } -
trunk/src/bp-activity/bp-activity-notifications.php
r12222 r12586 35 35 $action_filter = 'at_mentions'; 36 36 $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'; 39 41 40 42 if ( (int) $total_items > 1 ) { 43 /* translators: 1: the number of activity mentions */ 41 44 $text = sprintf( __( 'You have %1$d new mentions', 'buddypress' ), (int) $total_items ); 42 45 $amount = 'multiple'; 43 46 } else { 47 /* translators: 1: the user display name */ 44 48 $text = sprintf( __( '%1$s mentioned you', 'buddypress' ), $user_fullname ); 45 49 } … … 52 56 53 57 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 */ 55 61 $text = sprintf( __( 'You have %1$d new replies', 'buddypress' ), (int) $total_items ); 56 62 $amount = 'multiple'; 57 63 } else { 58 64 $link = add_query_arg( 'rid', (int) $id, bp_activity_get_permalink( $activity_id ) ); 65 66 /* translators: 1: the user display name */ 59 67 $text = sprintf( __( '%1$s commented on one of your updates', 'buddypress' ), $user_fullname ); 60 68 } … … 67 75 68 76 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 */ 70 80 $text = sprintf( __( 'You have %1$d new comment replies', 'buddypress' ), (int) $total_items ); 71 81 $amount = 'multiple'; 72 82 } else { 73 83 $link = add_query_arg( 'crid', (int) $id, bp_activity_get_permalink( $activity_id ) ); 84 85 /* translators: 1: the user display name */ 74 86 $text = sprintf( __( '%1$s replied to one of your activity comments', 'buddypress' ), $user_fullname ); 75 87 } … … 397 409 <tr id="activity-notification-settings-mentions"> 398 410 <td> </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> 400 417 <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 401 418 /* translators: accessibility text */ 402 _e( 'Yes, send email', 'buddypress' );419 esc_html_e( 'Yes, send email', 'buddypress' ); 403 420 ?></label></td> 404 421 <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 405 422 /* translators: accessibility text */ 406 _e( 'No, do not send email', 'buddypress' );423 esc_html_e( 'No, do not send email', 'buddypress' ); 407 424 ?></label></td> 408 425 </tr> … … 414 431 <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 415 432 /* translators: accessibility text */ 416 _e( 'Yes, send email', 'buddypress' );433 esc_html_e( 'Yes, send email', 'buddypress' ); 417 434 ?></label></td> 418 435 <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 419 436 /* translators: accessibility text */ 420 _e( 'No, do not send email', 'buddypress' );437 esc_html_e( 'No, do not send email', 'buddypress' ); 421 438 ?></label></td> 422 439 </tr> -
trunk/src/bp-activity/bp-activity-template.php
r12564 r12586 453 453 $message = __( 'Viewing 1 item', 'buddypress' ); 454 454 } else { 455 /* translators: 1: the from number item. 2: the to number item. 3: the total number of items. */ 455 456 $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 ); 456 457 } … … 1035 1036 1036 1037 // 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 } 1038 1043 1039 1044 $defaults = array( … … 1183 1188 1184 1189 if ( ! empty( $name ) ) { 1190 /* translators: %s: the Group name */ 1185 1191 $alt = sprintf( __( 'Group logo of %s', 'buddypress' ), $name ); 1186 1192 } … … 1194 1200 1195 1201 if ( empty( $alt ) ) { 1202 /* translators: %s: the blog name */ 1196 1203 $alt = sprintf( __( 'Profile picture of the author of the site %s', 'buddypress' ), get_blog_option( $item_id, 'blogname' ) ); 1197 1204 } … … 1204 1211 1205 1212 if ( empty( $alt ) ) { 1213 /* translators: %s: member name */ 1206 1214 $alt = sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_core_get_user_displayname( $activities_template->activity->secondary_item_id ) ); 1207 1215 } … … 1215 1223 1216 1224 if ( empty( $alt ) ) { 1225 /* translators: %s: member name */ 1217 1226 $alt = sprintf( __( 'Profile picture of %s', 'buddypress' ), $activities_template->activity->display_name ); 1218 1227 } … … 2172 2181 // Deprecated notice about $args. 2173 2182 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 ); 2175 2193 } 2176 2194 -
trunk/src/bp-activity/classes/class-bp-activity-activity.php
r12426 r12586 365 365 // Backward compatibility with old method of passing arguments. 366 366 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 ); 368 377 369 378 $old_args_keys = array( -
trunk/src/bp-activity/classes/class-bp-activity-component.php
r12542 r12586 432 432 'item_id' => bp_displayed_user_id(), 433 433 '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 ), 435 439 ) ); 436 440 $bp->bp_options_title = bp_get_displayed_user_fullname(); -
trunk/src/bp-activity/classes/class-bp-activity-list-table.php
r12563 r12586 605 605 echo $actions[ $item['type'] ]; 606 606 } else { 607 /* translators: %s: the name of the activity type */ 607 608 printf( __( 'Unregistered action - %s', 'buddypress' ), $item['type'] ); 608 609 } -
trunk/src/bp-activity/classes/class-bp-akismet.php
r11950 r12586 93 93 $who = bp_activity_get_meta( $activity['id'], '_bp_akismet_user' ); 94 94 95 if ( 'true' == $user_result ) 95 if ( 'true' == $user_result ) { 96 /* translators: %s: the name of the user */ 96 97 $desc = sprintf( __( 'Flagged as spam by %s', 'buddypress' ), $who ); 97 else 98 } else { 99 /* translators: %s: the name of the user */ 98 100 $desc = sprintf( __( 'Un-spammed by %s', 'buddypress' ), $who ); 101 } 99 102 } 100 103 … … 443 446 return; 444 447 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 446 458 bp_activity_update_meta( $activity->id, '_bp_akismet_user_result', 'true' ); 447 459 bp_activity_update_meta( $activity->id, '_bp_akismet_user', bp_get_loggedin_user_username() ); … … 460 472 return; 461 473 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 463 484 bp_activity_update_meta( $activity->id, '_bp_akismet_user_result', 'false' ); 464 485 bp_activity_update_meta( $activity->id, '_bp_akismet_user', bp_get_loggedin_user_username() ); … … 494 515 } else { 495 516 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 ); 497 526 } 498 527 … … 619 648 620 649 echo '<div class="akismet-history"><div>'; 650 /* translators: 1: the human diff time. 2: the akismet history data. */ 621 651 printf( _x( '%1$s — %2$s', 'x hours ago - akismet cleared this item', 'buddypress' ), '<span>' . bp_core_time_since( $history[2] ) . '</span>', esc_html( $history[1] ) ); 622 652 echo '</div></div>';
Note: See TracChangeset
for help on using the changeset viewer.