Making WordPress.org


Ignore:
Timestamp:
08/10/2022 05:03:34 PM (3 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/support-forums/inc/class-stickies-compat.php

    r5960 r12012  
    120120        // Check for empty topic or term id.
    121121        if ( ! $topic || ! $term ) {
    122             bbp_add_error( 'wporg_bbp_sticky_topic_id', __( '<strong>ERROR</strong>: No topic was found! Which topic are you sticking?', 'wporg-forums' ) );
     122            bbp_add_error( 'wporg_bbp_sticky_topic_id', __( '<strong>Error:</strong> No topic was found! Which topic are you sticking?', 'wporg-forums' ) );
    123123
    124124        // Check user.
    125125        } elseif ( ! $this->user_can_stick( $user_id, $term->term_id, $topic->ID ) ) {
    126             bbp_add_error( 'wporg_bbp_sticky_logged_in', __( '<strong>ERROR</strong>: You do not have permission to do this!', 'wporg-forums' ) );
     126            bbp_add_error( 'wporg_bbp_sticky_logged_in', __( '<strong>Error:</strong> You do not have permission to do this!', 'wporg-forums' ) );
    127127
    128128        // Check nonce.
    129129        } elseif( ! bbp_verify_nonce_request( 'toggle-topic-sticky_' . $topic->ID . '_' . $term->term_id ) ) {
    130             bbp_add_error( 'wporg_bbp_sticky_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg-forums' ) );
     130            bbp_add_error( 'wporg_bbp_sticky_nonce', __( '<strong>Error:</strong> Are you sure you wanted to do that?', 'wporg-forums' ) );
    131131        }
    132132
     
    150150            bbp_redirect( $permalink );
    151151        } elseif ( true === $is_sticky && 'wporg_bbp_stick_compat_topic' == $action ) {
    152             bbp_add_error( 'wporg_bbp_stick_compat_topic', __( '<strong>ERROR</strong>: There was a problem sticking that topic!', 'wporg-forums' ) );
     152            bbp_add_error( 'wporg_bbp_stick_compat_topic', __( '<strong>Error:</strong> There was a problem sticking that topic!', 'wporg-forums' ) );
    153153        } elseif ( false === $is_sticky && 'wporg_bbp_unstick_compat_topic' == $action ) {
    154             bbp_add_error( 'wporg_bbp_unstick_compat_topic', __( '<strong>ERROR</strong>: There was a problem unsticking that topic!', 'wporg-forums' ) );
     154            bbp_add_error( 'wporg_bbp_unstick_compat_topic', __( '<strong>Error:</strong> There was a problem unsticking that topic!', 'wporg-forums' ) );
    155155        }
    156156    }
Note: See TracChangeset for help on using the changeset viewer.