Skip to:
Content

bbPress.org


Ignore:
Timestamp:
06/04/2020 09:28:24 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Accessibility: Text Changes: Use sentence case for the word "Error" in various error messages, instead of all caps.

Using all caps should be avoided for better readability, and because screen readers may pronounce all-caps words as abbreviations.

Related to [WP47156], #WP47656, #WP43037, #WP42945.

Props casiepa, man4toman, mmeet94, SergeyBiryukov, afercia, ryokuhi, sabernhardt, garrett-eclipse.

In branches/2.6, for 2.6.6.

See #3333, #3377.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/users/engagements.php

    r7012 r7097  
    606606    // Check for empty topic
    607607    if ( empty( $topic_id ) ) {
    608         bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>ERROR</strong>: No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
     608        bbp_add_error( 'bbp_favorite_topic_id', __( '<strong>Error</strong>: No topic was found. Which topic are you marking/unmarking as favorite?', 'bbpress' ) );
    609609
    610610    // Check nonce
    611611    } elseif ( ! bbp_verify_nonce_request( 'toggle-favorite_' . $topic_id ) ) {
    612         bbp_add_error( 'bbp_favorite_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     612        bbp_add_error( 'bbp_favorite_nonce', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    613613
    614614    // Check current user's ability to edit the user
    615615    } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
    616         bbp_add_error( 'bbp_favorite_permission', __( '<strong>ERROR</strong>: You do not have permission to edit favorites for that user.', 'bbpress' ) );
     616        bbp_add_error( 'bbp_favorite_permission', __( '<strong>Error</strong>: You do not have permission to edit favorites for that user.', 'bbpress' ) );
    617617    }
    618618
     
    655655    // Fail! Handle errors
    656656    } elseif ( 'bbp_favorite_remove' === $action ) {
    657         bbp_add_error( 'bbp_favorite_remove', __( '<strong>ERROR</strong>: There was a problem removing that topic from favorites.', 'bbpress' ) );
     657        bbp_add_error( 'bbp_favorite_remove', __( '<strong>Error</strong>: There was a problem removing that topic from favorites.', 'bbpress' ) );
    658658    } elseif ( 'bbp_favorite_add' === $action ) {
    659         bbp_add_error( 'bbp_favorite_add',    __( '<strong>ERROR</strong>: There was a problem favoriting that topic.', 'bbpress' ) );
     659        bbp_add_error( 'bbp_favorite_add',    __( '<strong>Error</strong>: There was a problem favoriting that topic.', 'bbpress' ) );
    660660    }
    661661
     
    847847    // Check for empty topic
    848848    if ( empty( $object_id ) ) {
    849         bbp_add_error( 'bbp_subscription_object_id', __( '<strong>ERROR</strong>: Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) );
     849        bbp_add_error( 'bbp_subscription_object_id', __( '<strong>Error</strong>: Not found. What are you subscribing/unsubscribing to?', 'bbpress' ) );
    850850
    851851    // Check nonce
    852852    } elseif ( ! bbp_verify_nonce_request( 'toggle-subscription_' . $object_id ) ) {
    853         bbp_add_error( 'bbp_subscription_object_id', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
     853        bbp_add_error( 'bbp_subscription_object_id', __( '<strong>Error</strong>: Are you sure you wanted to do that?', 'bbpress' ) );
    854854
    855855    // Check current user's ability to edit the user
    856856    } elseif ( ! current_user_can( 'edit_user', $user_id ) ) {
    857         bbp_add_error( 'bbp_subscription_permission', __( '<strong>ERROR</strong>: You do not have permission to edit subscriptions of that user.', 'bbpress' ) );
     857        bbp_add_error( 'bbp_subscription_permission', __( '<strong>Error</strong>: You do not have permission to edit subscriptions of that user.', 'bbpress' ) );
    858858    }
    859859
     
    898898    // Fail! Handle errors
    899899    } elseif ( 'bbp_unsubscribe' === $action ) {
    900         bbp_add_error( 'bbp_unsubscribe', __( '<strong>ERROR</strong>: There was a problem unsubscribing.', 'bbpress' ) );
     900        bbp_add_error( 'bbp_unsubscribe', __( '<strong>Error</strong>: There was a problem unsubscribing.', 'bbpress' ) );
    901901    } elseif ( 'bbp_subscribe' === $action ) {
    902         bbp_add_error( 'bbp_subscribe',   __( '<strong>ERROR</strong>: There was a problem subscribing.', 'bbpress' ) );
     902        bbp_add_error( 'bbp_subscribe',   __( '<strong>Error</strong>: There was a problem subscribing.', 'bbpress' ) );
    903903    }
    904904
Note: See TracChangeset for help on using the changeset viewer.