Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/08/2016 04:14:17 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Even less shouting, plus a grammar sweep.

  • Remove contractions
  • Update weird sounding English phrases (like "the permissions" to "permission")
  • Simplify some phrases to be less wordy
  • Update "permission" error codes to all use "permission" instead of also "permissions"
  • Add comma to "Oh bother!". See: https://www.youtube.com/watch?v=Fhl4oKvxphs
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/replies/functions.php

    r6140 r6141  
    180180        // User cannot create replies
    181181        if ( !current_user_can( 'publish_replies' ) ) {
    182             bbp_add_error( 'bbp_reply_permissions', __( '<strong>ERROR</strong>: You do not have permission to reply.', 'bbpress' ) );
     182            bbp_add_error( 'bbp_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to reply.', 'bbpress' ) );
    183183        }
    184184
     
    573573            // User cannot edit this reply
    574574            if ( !current_user_can( 'edit_reply', $reply_id ) ) {
    575                 bbp_add_error( 'bbp_edit_reply_permissions', __( '<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) );
     575                bbp_add_error( 'bbp_edit_reply_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that reply.', 'bbpress' ) );
    576576                return;
    577577            }
     
    13311331
    13321332    if ( empty( $_POST['bbp_reply_id'] ) ) {
    1333         bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>ERROR</strong>: Reply ID to move not found!', 'bbpress' ) );
     1333        bbp_add_error( 'bbp_move_reply_reply_id', __( '<strong>ERROR</strong>: A reply ID is required', 'bbpress' ) );
    13341334    } else {
    13351335        $move_reply_id = (int) $_POST['bbp_reply_id'];
     
    13611361    // Use cannot edit topic
    13621362    if ( !current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1363         bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the source topic.', 'bbpress' ) );
     1363        bbp_add_error( 'bbp_move_reply_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
    13641364    }
    13651365
     
    13841384                // Get destination topic id
    13851385                if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1386                     bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found!', 'bbpress' ) );
     1386                    bbp_add_error( 'bbp_move_reply_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) );
    13871387                } else {
    13881388                    $destination_topic_id = (int) $_POST['bbp_destination_topic'];
     
    13941394                // No destination topic
    13951395                if ( empty( $destination_topic ) ) {
    1396                     bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to move to was not found!', 'bbpress' ) );
     1396                    bbp_add_error( 'bbp_move_reply_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to move to was not found.', 'bbpress' ) );
    13971397                }
    13981398
    13991399                // User cannot edit the destination topic
    14001400                if ( !current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1401                     bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the destination topic!', 'bbpress' ) );
     1401                    bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
    14021402                }
    14031403
     
    14581458                // User cannot publish posts
    14591459                } else {
    1460                     bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have the permissions to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
     1460                    bbp_add_error( 'bbp_move_reply_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
    14611461                }
    14621462
     
    16361636    // What is the user doing here?
    16371637    if ( ! current_user_can( 'edit_reply', $reply_id ) || ( 'bbp_toggle_reply_trash' === $action && ! current_user_can( 'delete_reply', $reply_id ) ) ) {
    1638         bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>ERROR:</strong> You do not have the permission to do that.', 'bbpress' ) );
     1638        bbp_add_error( 'bbp_toggle_reply_permission', __( '<strong>ERROR:</strong> You do not have permission to do that.', 'bbpress' ) );
    16391639        return;
    16401640    }
     
    17121712            $is_approve         = bbp_is_reply_pending( $r['id'] );
    17131713            $retval['status']   = $is_approve ? bbp_approve_reply( $r['id'] ) : bbp_unapprove_reply( $r['id'] );
    1714             $retval['message']  = $is_approve ? __( '<strong>ERROR</strong>: There was a problem approving the reply!', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem unapproving the reply!', 'bbpress' );
     1714            $retval['message']  = $is_approve ? __( '<strong>ERROR</strong>: There was a problem approving the reply.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem unapproving the reply.', 'bbpress' );
    17151715            $retval['view_all'] = ! $is_approve;
    17161716
     
    17231723            $is_spam            = bbp_is_reply_spam( $r['id'] );
    17241724            $retval['status']   = $is_spam ? bbp_unspam_reply( $r['id'] ) : bbp_spam_reply( $r['id'] );
    1725             $retval['message']  = $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the reply as spam!', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the reply as spam!', 'bbpress' );
     1725            $retval['message']  = $is_spam ? __( '<strong>ERROR</strong>: There was a problem unmarking the reply as spam.', 'bbpress' ) : __( '<strong>ERROR</strong>: There was a problem marking the reply as spam.', 'bbpress' );
    17261726            $retval['view_all'] = ! $is_spam;
    17271727
     
    17381738                    $retval['view_all'] = true;
    17391739                    $retval['status']   = wp_trash_post( $r['id'] );
    1740                     $retval['message']  = __( '<strong>ERROR</strong>: There was a problem trashing the reply!', 'bbpress' );
     1740                    $retval['message']  = __( '<strong>ERROR</strong>: There was a problem trashing the reply.', 'bbpress' );
    17411741
    17421742                    break;
     
    17461746
    17471747                    $retval['status']  = wp_untrash_post( $r['id'] );
    1748                     $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the reply!', 'bbpress' );
     1748                    $retval['message'] = __( '<strong>ERROR</strong>: There was a problem untrashing the reply.', 'bbpress' );
    17491749
    17501750                    break;
     
    17541754
    17551755                    $retval['status']  = wp_delete_post( $r['id'] );
    1756                     $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the reply!', 'bbpress' );
     1756                    $retval['message'] = __( '<strong>ERROR</strong>: There was a problem deleting the reply.', 'bbpress' );
    17571757
    17581758                    break;
Note: See TracChangeset for help on using the changeset viewer.