Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/21/2018 01:00:36 AM (15 months ago)
Author:
djpaul
Message:

Templates, Nouveau: string improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php

    r12082 r12104  
    102102                    'feedback' => sprintf(
    103103                        '<div class="bp-feedback error"><span class="bp-icon" aria-hidden="true"></span><p>%s</p></div>',
    104                         esc_html__( 'Group invite could not be accepted.', 'buddypress' )
     104                        esc_html__( 'Group invitation could not be accepted.', 'buddypress' )
    105105                    ),
    106106                    'type'     => 'error',
     
    283283
    284284    $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' );
    286286
    287287    if ( 'friends' === $request['scope'] ) {
    288288        $request['user_id'] = bp_loggedin_user_id();
    289289        $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' );
    291291    }
    292292
     
    295295        if ( ! bp_group_has_invites( array( 'user_id' => 'any' ) ) ) {
    296296            wp_send_json_error( array(
    297                 'feedback' => __( 'No pending invites found.', 'buddypress' ),
     297                'feedback' => __( 'No pending group invitations found.', 'buddypress' ),
    298298                'type'     => 'info',
    299299            ) );
     
    302302        $request['is_confirmed'] = false;
    303303        $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' );
    305305    }
    306306
     
    366366
    367367    if ( ! bp_groups_user_can_send_invites( $group_id ) ) {
    368         $response['feedback'] = __( 'You are not allowed to send invites for this group.', 'buddypress' );
     368        $response['feedback'] = __( 'You are not allowed to send invitations for this group.', 'buddypress' );
    369369        wp_send_json_error( $response );
    370370    }
     
    405405
    406406        $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        );
    408416
    409417        wp_send_json_error(
     
    418426    wp_send_json_success(
    419427        array(
    420             'feedback' => __( 'Invites sent.', 'buddypress' ),
     428            'feedback' => __( 'Invitations sent.', 'buddypress' ),
    421429            'type'     => 'success',
    422430        )
     
    428436 */
    429437function bp_nouveau_ajax_remove_group_invite() {
    430     $user_id  = $_POST['user'];
     438    $user_id  = (int) $_POST['user'];
    431439    $group_id = bp_get_current_group_id();
    432440
     
    435443        wp_send_json_error(
    436444            array(
    437                 'feedback' => __( 'Invites could not be removed. Please try again.', 'buddypress' ),
     445                'feedback' => __( 'Group invitation could not be removed.', 'buddypress' ),
    438446                'type'     => 'error',
    439447            )
     
    444452        wp_send_json_error(
    445453            array(
    446                 'feedback' => __( 'Too late! The user is already a member of the group.', 'buddypress' ),
     454                'feedback' => __( 'The member is already a member of the group.', 'buddypress' ),
    447455                'type'     => 'warning',
    448456                'code'     => 1,
     
    455463        wp_send_json_error(
    456464            array(
    457                 'feedback' => __( 'Invite could not be removed successfully.', 'buddypress' ),
     465                'feedback' => __( 'Group invitation could not be removed.', 'buddypress' ),
    458466                'type'     => 'error',
    459467                'code'     => 0,
     
    464472    wp_send_json_success(
    465473        array(
    466             'feedback'    => __( 'No more pending invites for the group.', 'buddypress' ),
     474            'feedback'    => __( 'There are no more pending invitations for the group.', 'buddypress' ),
    467475            'type'        => 'info',
    468476            'has_invites' => bp_group_has_invites( array( 'user_id' => 'any' ) ),
Note: See TracChangeset for help on using the changeset viewer.