Make WordPress Core


Ignore:
Timestamp:
06/16/2020 03:33:37 PM (6 years ago)
Author:
afercia
Message:

I18N: Remove the "Error:" prefix from error messages.

For a number of years, most of the WordPress error messages have been prefixed with "Error:". However, these messages appear in a context where it's already clear an error occurred. Whether it's an error, a warning, or any other classification, that's not so relevant for users. The content of the message is the relevant part. The "Error:" prefix doesn't add great value while it does add unnecessary complexity for the message readability.

Also, revises some of these messages to improve clarity and removes HTML from translatable strings.

Props garrett-eclipse, ramiy, SergeyBiryukov, afercia, sabernhardt, quadthemes, audrasjb.
See #47003, #43037, #42945, #15887.
Fixes #47656.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r47855 r48059  
    359359
    360360        if ( empty( $_POST['user_login'] ) || ! is_string( $_POST['user_login'] ) ) {
    361                 $errors->add( 'empty_username', __( '<strong>Error</strong>: Enter a username or email address.' ) );
     361                $errors->add( 'empty_username', __( 'Please enter a username or email address.' ) );
    362362        } elseif ( strpos( $_POST['user_login'], '@' ) ) {
    363363                $user_data = get_user_by( 'email', trim( wp_unslash( $_POST['user_login'] ) ) );
    364364                if ( empty( $user_data ) ) {
    365                         $errors->add( 'invalid_email', __( '<strong>Error</strong>: There is no account with that username or email address.' ) );
     365                        $errors->add( 'invalid_email', __( 'There is no account with that username or email address.' ) );
    366366                }
    367367        } else {
     
    388388
    389389        if ( ! $user_data ) {
    390                 $errors->add( 'invalidcombo', __( '<strong>Error</strong>: There is no account with that username or email address.' ) );
     390                $errors->add( 'invalidcombo', __( 'There is no account with that username or email address.' ) );
    391391                return $errors;
    392392        }
     
    455455                        sprintf(
    456456                                /* translators: %s: Documentation URL. */
    457                                 __( '<strong>Error</strong>: The email could not be sent. Your site may not be correctly configured to send emails. <a href="%s">Get support for resetting your password</a>.' ),
     457                                __( 'The email could not be sent. Your site may not be correctly configured to send emails. <a href="%s">Get support for resetting your password</a>.' ),
    458458                                esc_url( __( 'https://wordpress.org/support/article/resetting-your-password/' ) )
    459459                        )
     
    11981198                                        sprintf(
    11991199                                                /* translators: 1: Browser cookie documentation URL, 2: Support forums URL. */
    1200                                                 __( '<strong>Error</strong>: Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
     1200                                                __( 'Cookies are blocked due to unexpected output. For help, please see <a href="%1$s">this documentation</a> or try the <a href="%2$s">support forums</a>.' ),
    12011201                                                __( 'https://wordpress.org/support/article/cookies/' ),
    12021202                                                __( 'https://wordpress.org/support/forums/' )
     
    12091209                                        sprintf(
    12101210                                                /* translators: %s: Browser cookie documentation URL. */
    1211                                                 __( '<strong>Error</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
     1211                                                __( 'Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
    12121212                                                __( 'https://wordpress.org/support/article/cookies/#enable-cookies-in-your-browser' )
    12131213                                        )
Note: See TracChangeset for help on using the changeset viewer.