Make WordPress Core


Ignore:
Timestamp:
06/16/2020 03:33:37 PM (4 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-admin/setup-config.php

    r47808 r48059  
    281281
    282282        if ( empty( $prefix ) ) {
    283             wp_die( __( '<strong>Error</strong>: "Table Prefix" must not be empty.' ) . $tryagain_link );
     283            wp_die( __( '"Table Prefix" must not be empty.' ) . $tryagain_link );
    284284        }
    285285
    286286        // Validate $prefix: it can only contain letters, numbers and underscores.
    287287        if ( preg_match( '|[^a-z0-9_]|i', $prefix ) ) {
    288             wp_die( __( '<strong>Error</strong>: "Table Prefix" can only contain numbers, letters, and underscores.' ) . $tryagain_link );
     288            wp_die( __( '"Table Prefix" can only contain numbers, letters, and underscores.' ) . $tryagain_link );
    289289        }
    290290
     
    319319        if ( ! $wpdb->last_error ) {
    320320            // MySQL was able to parse the prefix as a value, which we don't want. Bail.
    321             wp_die( __( '<strong>Error</strong>: "Table Prefix" is invalid.' ) );
     321            wp_die( __( '"Table Prefix" is invalid.' ) );
    322322        }
    323323
Note: See TracChangeset for help on using the changeset viewer.