Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/08/2016 04:14:17 PM (10 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/topics/functions.php

    r6140 r6141  
    163163                // User cannot create topics
    164164                if ( ! current_user_can( 'publish_topics' ) ) {
    165                         bbp_add_error( 'bbp_topic_permissions', __( '<strong>ERROR</strong>: You do not have permission to create new topics.', 'bbpress' ) );
     165                        bbp_add_error( 'bbp_topic_permission', __( '<strong>ERROR</strong>: You do not have permission to create new topics.', 'bbpress' ) );
    166166                        return;
    167167                }
    … …  
    505505                        // User cannot edit this topic
    506506                        if ( ! current_user_can( 'edit_topic', $topic_id ) ) {
    507                                 bbp_add_error( 'bbp_edit_topic_permissions', __( '<strong>ERROR</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
     507                                bbp_add_error( 'bbp_edit_topic_permission', __( '<strong>ERROR</strong>: You do not have permission to edit that topic.', 'bbpress' ) );
    508508                        }
    509509
    … …  
    12331233        // Cannot edit source topic
    12341234        if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1235                 bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the source topic.', 'bbpress' ) );
     1235                bbp_add_error( 'bbp_merge_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
    12361236                return;
    12371237        }
    … …  
    12531253        // Cannot edit destination topic
    12541254        if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1255                 bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the destination topic.', 'bbpress' ) );
     1255                bbp_add_error( 'bbp_merge_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
    12561256        }
    12571257
    … …  
    15121512
    15131513        if ( empty( $_POST['bbp_reply_id'] ) ) {
    1514                 bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>ERROR</strong>: Reply ID to split the topic from not found!', 'bbpress' ) );
     1514                bbp_add_error( 'bbp_split_topic_reply_id', __( '<strong>ERROR</strong>: A reply ID is required.', 'bbpress' ) );
    15151515        } else {
    15161516                $from_reply_id = (int) $_POST['bbp_reply_id'];
    … …  
    15421542        // Use cannot edit topic
    15431543        if ( ! current_user_can( 'edit_topic', $source_topic->ID ) ) {
    1544                 bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the source topic.', 'bbpress' ) );
     1544                bbp_add_error( 'bbp_split_topic_source_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the source topic.', 'bbpress' ) );
    15451545        }
    15461546
    … …  
    15651565                                // Get destination topic id
    15661566                                if ( empty( $_POST['bbp_destination_topic'] ) ) {
    1567                                         bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>ERROR</strong>: Destination topic ID not found!', 'bbpress' ) );
     1567                                        bbp_add_error( 'bbp_split_topic_destination_id', __( '<strong>ERROR</strong>: A topic ID is required.', 'bbpress' ) );
    15681568                                } else {
    15691569                                        $destination_topic_id = (int) $_POST['bbp_destination_topic'];
    … …  
    15751575                                // No destination topic
    15761576                                if ( empty( $destination_topic ) ) {
    1577                                         bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to split to was not found!', 'bbpress' ) );
     1577                                        bbp_add_error( 'bbp_split_topic_destination_not_found', __( '<strong>ERROR</strong>: The topic you want to split to was not found.', 'bbpress' ) );
    15781578                                }
    15791579
    15801580                                // User cannot edit the destination topic
    15811581                                if ( ! current_user_can( 'edit_topic', $destination_topic->ID ) ) {
    1582                                         bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have the permissions to edit the destination topic!', 'bbpress' ) );
     1582                                        bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the destination topic.', 'bbpress' ) );
    15831583                                }
    15841584
    … …  
    16231623                                // User cannot publish posts
    16241624                                } else {
    1625                                         bbp_add_error( 'bbp_split_topic_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' ) );
     1625                                        bbp_add_error( 'bbp_split_topic_destination_permission', __( '<strong>ERROR</strong>: You do not have permission to create new topics. The reply could not be converted into a topic.', 'bbpress' ) );
    16261626                                }
    16271627
    … …  
    18981898                        // Can user edit topic tags?
    18991899                        if ( ! current_user_can( 'edit_topic_tags' ) ) {
    1900                                 bbp_add_error( 'bbp_manage_topic_tag_update_permissions', __( '<strong>ERROR</strong>: You do not have the permissions to edit the topic tags.', 'bbpress' ) );
     1900                                bbp_add_error( 'bbp_manage_topic_tag_update_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
    19011901                                return;
    19021902                        }
    … …  
    19381938                        // Can user edit topic tags?
    19391939                        if ( ! current_user_can( 'edit_topic_tags' ) ) {
    1940                                 bbp_add_error( 'bbp_manage_topic_tag_merge_permissions', __( '<strong>ERROR</strong>: You do not have the permissions to edit the topic tags.', 'bbpress' ) );
     1940                                bbp_add_error( 'bbp_manage_topic_tag_merge_permission', __( '<strong>ERROR</strong>: You do not have permission to edit the topic tags.', 'bbpress' ) );
    19411941                                return;
    19421942                        }
    … …  
    19961996                        // Can user delete topic tags?
    19971997                        if ( ! current_user_can( 'delete_topic_tags' ) ) {
    1998                                 bbp_add_error( 'bbp_manage_topic_tag_delete_permissions', __( '<strong>ERROR</strong>: You do not have the permissions to delete the topic tags.', 'bbpress' ) );
     1998                                bbp_add_error( 'bbp_manage_topic_tag_delete_permission', __( '<strong>ERROR</strong>: You do not have permission to delete the topic tags.', 'bbpress' ) );
    19991999                                return;
    20002000                        }
    … …  
    21682168        // What is the user doing here?
    21692169        if ( ! current_user_can( 'edit_topic', $topic->ID ) || ( 'bbp_toggle_topic_trash' === $action && ! current_user_can( 'delete_topic', $topic->ID ) ) ) {
    2170                 bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>ERROR:</strong> You do not have the permission to do that.', 'bbpress' ) );
     2170                bbp_add_error( 'bbp_toggle_topic_permission', __( '<strong>ERROR:</strong> You do not have permission to do that.', 'bbpress' ) );
    21712171                return;
    21722172        }
Note: See TracChangeset for help on using the changeset viewer.