- Timestamp:
- 05/21/2018 01:01:35 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/src/bp-templates/bp-nouveau/includes/groups/ajax.php
r12082 r12105 102 102 'feedback' => sprintf( 103 103 '<div class="bp-feedback error"><span class="bp-icon" aria-hidden="true"></span><p>%s</p></div>', 104 esc_html__( 'Group invit ecould not be accepted.', 'buddypress' )104 esc_html__( 'Group invitation could not be accepted.', 'buddypress' ) 105 105 ), 106 106 'type' => 'error', … … 283 283 284 284 $bp->groups->invites_scope = 'members'; 285 $message = __( 'Select members to invite by clicking the + button. Once you\'ve made your selection, use the "Send Invites" nav item to continue.', 'buddypress' );285 $message = __( 'Select members to invite by clicking the + button. Once you\'ve made your selection, use the "Send Invites" navigation item to continue.', 'buddypress' ); 286 286 287 287 if ( 'friends' === $request['scope'] ) { 288 288 $request['user_id'] = bp_loggedin_user_id(); 289 289 $bp->groups->invites_scope = 'friends'; 290 $message = __( 'Select friends to invite by clicking the + button. Once you\'ve made your selection, use the "Send Invites" nav item to continue.', 'buddypress' );290 $message = __( 'Select friends to invite by clicking the + button. Once you\'ve made your selection, use the "Send Invites" navigation item to continue.', 'buddypress' ); 291 291 } 292 292 … … 295 295 if ( ! bp_group_has_invites( array( 'user_id' => 'any' ) ) ) { 296 296 wp_send_json_error( array( 297 'feedback' => __( 'No pending invites found.', 'buddypress' ),297 'feedback' => __( 'No pending group invitations found.', 'buddypress' ), 298 298 'type' => 'info', 299 299 ) ); … … 302 302 $request['is_confirmed'] = false; 303 303 $bp->groups->invites_scope = 'invited'; 304 $message = __( 'You can view all the group\'s pending invites from this screen.', 'buddypress' );304 $message = __( 'You can view the group\'s pending invitations from this screen.', 'buddypress' ); 305 305 } 306 306 … … 366 366 367 367 if ( ! bp_groups_user_can_send_invites( $group_id ) ) { 368 $response['feedback'] = __( 'You are not allowed to send invit es for this group.', 'buddypress' );368 $response['feedback'] = __( 'You are not allowed to send invitations for this group.', 'buddypress' ); 369 369 wp_send_json_error( $response ); 370 370 } … … 405 405 406 406 $error_count = count( $errors ); 407 $error_message = sprintf( _n( 'Invites failed for %s user.', 'Invites failed for %s users.', $error_count, 'buddypress' ), number_format_i18n( $error_count ) ); 407 $error_message = sprintf( 408 /* translators: count of users affected */ 409 _n( 410 'Invitation failed for %s user.', 411 'Invitation failed for %s users.', 412 $error_count, 'buddypress' 413 ), 414 number_format_i18n( $error_count ) 415 ); 408 416 409 417 wp_send_json_error( … … 418 426 wp_send_json_success( 419 427 array( 420 'feedback' => __( 'Invit es sent.', 'buddypress' ),428 'feedback' => __( 'Invitations sent.', 'buddypress' ), 421 429 'type' => 'success', 422 430 ) … … 428 436 */ 429 437 function bp_nouveau_ajax_remove_group_invite() { 430 $user_id = $_POST['user'];438 $user_id = (int) $_POST['user']; 431 439 $group_id = bp_get_current_group_id(); 432 440 … … 435 443 wp_send_json_error( 436 444 array( 437 'feedback' => __( ' Invites could not be removed. Please try again.', 'buddypress' ),445 'feedback' => __( 'Group invitation could not be removed.', 'buddypress' ), 438 446 'type' => 'error', 439 447 ) … … 444 452 wp_send_json_error( 445 453 array( 446 'feedback' => __( 'T oo late! The user is already a member of the group.', 'buddypress' ),454 'feedback' => __( 'The member is already a member of the group.', 'buddypress' ), 447 455 'type' => 'warning', 448 456 'code' => 1, … … 455 463 wp_send_json_error( 456 464 array( 457 'feedback' => __( ' Invite could not be removed successfully.', 'buddypress' ),465 'feedback' => __( 'Group invitation could not be removed.', 'buddypress' ), 458 466 'type' => 'error', 459 467 'code' => 0, … … 464 472 wp_send_json_success( 465 473 array( 466 'feedback' => __( ' No more pending invites for the group.', 'buddypress' ),474 'feedback' => __( 'There are no more pending invitations for the group.', 'buddypress' ), 467 475 'type' => 'info', 468 476 'has_invites' => bp_group_has_invites( array( 'user_id' => 'any' ) ),
Note: See TracChangeset
for help on using the changeset viewer.