Making WordPress.org


Ignore:
Timestamp:
08/10/2022 05:03:34 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Improve consistency of various error messages.

  • Use sentence case for the word Error, instead of all caps. Using all caps should be avoided for better readability and because screen readers may pronounce all-caps words as abbreviations.
  • Move the colon of the Error: prefix inside the <strong> tags.

This matches similar changes in WordPress core.

Follow-up to ​[WP47156], ​[WP53118], ​[WP53337], ​[WP53458], [3702], [3719], [3797], [3937], [4043], [11301], [11382], [11383], [11580].

Props NekoJonez.
Fixes #6309.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-bbp-topic-resolution/inc/class-plugin.php

    r9479 r12012  
    287287                // Check for empty topic id.
    288288                if ( empty( $topic_id ) || ! $topic ) {
    289                         bbp_add_error( 'wporg_bbp_topic_resolution_topic_id', __( '<strong>ERROR</strong>: No topic was found!', 'wporg-forums' ) );
     289                        bbp_add_error( 'wporg_bbp_topic_resolution_topic_id', __( '<strong>Error:</strong> No topic was found!', 'wporg-forums' ) );
    290290
    291291                // Check valid resolution.
    292292                } elseif ( ! $this->is_valid_topic_resolution( $resolution ) ) {
    293                         bbp_add_error( 'wporg_bbp_topic_resolution_invalid', __( '<strong>ERROR</strong>: That is not a valid topic resolution!', 'wporg-forums' ) );
     293                        bbp_add_error( 'wporg_bbp_topic_resolution_invalid', __( '<strong>Error:</strong> That is not a valid topic resolution!', 'wporg-forums' ) );
    294294
    295295                // Check user permissions.
    296296                } elseif ( ! $this->user_can_resolve( $user_id, $topic->ID ) ) {
    297                         bbp_add_error( 'wporg_bbp_topic_resolution_permissions', __( '<strong>ERROR</strong>: You don\'t have permission to do this!', 'wporg-forums' ) );
     297                        bbp_add_error( 'wporg_bbp_topic_resolution_permissions', __( '<strong>Error:</strong> You don\'t have permission to do this!', 'wporg-forums' ) );
    298298
    299299                // Check nonce.
    300300                } elseif ( ! bbp_verify_nonce_request( 'toggle-topic-resolution_' . $topic->ID ) ) {
    301                         bbp_add_error( 'wporg_bbp_topic_resolution_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg-forums' ) );
     301                        bbp_add_error( 'wporg_bbp_topic_resolution_nonce', __( '<strong>Error:</strong> Are you sure you wanted to do that?', 'wporg-forums' ) );
    302302                }
    303303
Note: See TracChangeset for help on using the changeset viewer.