Changeset 12586 for trunk/src/bp-activity/classes/class-bp-akismet.php
- Timestamp:
- 03/28/2020 01:31:24 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.