Make WordPress Core


Ignore:
Timestamp:
06/21/2020 01:58:46 PM (5 years ago)
Author:
afercia
Message:

I18N: Restore the "Error:" prefix for error messages.

Partially reverts [48059] as there's no full consensus on the removal of the text prefix. Further actions should be taken to improve consistency and accessibility of the admin notices. Keeps some improvements to the translatable strings from [48059].

Fixes #47656.

File:
1 edited

Legend:

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

    r48085 r48115  
    359359
    360360    if ( empty( $_POST['user_login'] ) || ! is_string( $_POST['user_login'] ) ) {
    361         $errors->add( 'empty_username', __( 'Please enter a username or email address.' ) );
     361        $errors->add( 'empty_username', __( '<strong>Error</strong>: 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', __( 'There is no account with that username or email address.' ) );
     365            $errors->add( 'invalid_email', __( '<strong>Error</strong>: There is no account with that username or email address.' ) );
    366366        }
    367367    } else {
     
    405405
    406406    if ( ! $user_data ) {
    407         $errors->add( 'invalidcombo', __( 'There is no account with that username or email address.' ) );
     407        $errors->add( 'invalidcombo', __( '<strong>Error</strong>: There is no account with that username or email address.' ) );
    408408        return $errors;
    409409    }
     
    472472            sprintf(
    473473                /* translators: %s: Documentation URL. */
    474                 __( '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>.' ),
     474                __( '<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>.' ),
    475475                esc_url( __( 'https://wordpress.org/support/article/resetting-your-password/' ) )
    476476            )
     
    12151215                    sprintf(
    12161216                        /* translators: 1: Browser cookie documentation URL, 2: Support forums URL. */
    1217                         __( '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>.' ),
     1217                        __( '<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>.' ),
    12181218                        __( 'https://wordpress.org/support/article/cookies/' ),
    12191219                        __( 'https://wordpress.org/support/forums/' )
     
    12261226                    sprintf(
    12271227                        /* translators: %s: Browser cookie documentation URL. */
    1228                         __( 'Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
     1228                        __( '<strong>Error</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),
    12291229                        __( 'https://wordpress.org/support/article/cookies/#enable-cookies-in-your-browser' )
    12301230                    )
Note: See TracChangeset for help on using the changeset viewer.