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/wporg-bbp-term-subscription/inc/class-plugin.php

    r11662 r12012  
    115115        if ( $is_subscribed ) {
    116116            $message = sprintf(
    117                 __( 'You are subscribed to this forum, and will receive emails for future topic activity. <a href="%1$s">Unsubscribe from %2$s.</a>', 'wporg-forums' ),
     117                __( 'You are subscribed to this forum, and will receive emails for future topic activity. <a href="%1$s">Unsubscribe from %2$s</a>.', 'wporg-forums' ),
    118118                self::get_subscription_url( get_current_user_id(), $term->term_id, $this->taxonomy ),
    119119                esc_html( $term->name )
     
    169169
    170170            if ( ! $user_id ) {
    171                 bbp_add_error( 'wporg_bbp_subscribe_invalid_token', __( '<strong>ERROR</strong>: Link expired!', 'wporg-forums' ) );
     171                bbp_add_error( 'wporg_bbp_subscribe_invalid_token', __( '<strong>Error:</strong> Link expired!', 'wporg-forums' ) );
    172172                return false;
    173173            }
     
    206206        // Check for empty term id.
    207207        if ( empty( $user_id ) ) {
    208             bbp_add_error( 'wporg_bbp_subscribe_logged_id', __( '<strong>ERROR</strong>: You must be logged in to do this!', 'wporg-forums' ) );
     208            bbp_add_error( 'wporg_bbp_subscribe_logged_id', __( '<strong>Error:</strong> You must be logged in to do this!', 'wporg-forums' ) );
    209209
    210210        // Check nonce.
    211211        } elseif ( 'token' !== $auth && ! bbp_verify_nonce_request( 'toggle-term-subscription_' . $user_id . '_' . $term_id . '_' . $this->taxonomy ) ) {
    212             bbp_add_error( 'wporg_bbp_subscribe_nonce', __( '<strong>ERROR</strong>: Are you sure you wanted to do that?', 'wporg-forums' ) );
     212            bbp_add_error( 'wporg_bbp_subscribe_nonce', __( '<strong>Error:</strong> Are you sure you wanted to do that?', 'wporg-forums' ) );
    213213
    214214        // Check user's ability to spectate if attempting to subscribe to a term.
    215215        } elseif ( ! user_can( $user_id, 'spectate' ) && 'wporg_bbp_subscribe_term' === $action ) {
    216             bbp_add_error( 'wporg_bbp_subscribe_permissions', __( '<strong>ERROR</strong>: You don\'t have permission to do this!', 'wporg-forums' ) );
     216            bbp_add_error( 'wporg_bbp_subscribe_permissions', __( '<strong>Error:</strong> You don\'t have permission to do this!', 'wporg-forums' ) );
    217217        }
    218218
     
    246246        } elseif ( true === $is_subscribed && 'wporg_bbp_subscribe_term' === $action ) {
    247247            /* translators: Term: topic tag */
    248             bbp_add_error( 'wporg_bbp_subscribe_user', __( '<strong>ERROR</strong>: There was a problem subscribing to that term!', 'wporg-forums' ) );
     248            bbp_add_error( 'wporg_bbp_subscribe_user', __( '<strong>Error:</strong> There was a problem subscribing to that term!', 'wporg-forums' ) );
    249249        } elseif ( false === $is_subscribed && 'wporg_bbp_unsubscribe_term' === $action ) {
    250250            /* translators: Term: topic tag */
    251             bbp_add_error( 'wporg_bbp_unsubscribe_user', __( '<strong>ERROR</strong>: There was a problem unsubscribing from that term!', 'wporg-forums' ) );
     251            bbp_add_error( 'wporg_bbp_unsubscribe_user', __( '<strong>Error:</strong> There was a problem unsubscribing from that term!', 'wporg-forums' ) );
    252252        }
    253253    }
     
    361361%4$s
    362362
    363 To unsubscribe from future emails click here:
     363To unsubscribe from future emails, click here:
    364364####UNSUB_LINK####', 'wporg-forums' ),
    365365            $topic_author_name,
     
    503503%4$s
    504504
    505 To unsubscribe from future emails click here:
     505To unsubscribe from future emails, click here:
    506506####UNSUB_LINK####', 'wporg-forums' ),
    507507            $reply_author_name,
Note: See TracChangeset for help on using the changeset viewer.