WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/16/2020 03:33:37 PM (14 months 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/includes/network.php

    r47632 r48059  
    111111
    112112    if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
    113         echo '<div class="error"><p><strong>' . __( 'Error:' ) . '</strong> ' . sprintf(
     113        echo '<div class="error"><p>' . sprintf(
    114114            /* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
    115115            __( 'The constant %s cannot be defined when creating a network.' ),
     
    137137    $has_ports = strstr( $hostname, ':' );
    138138    if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ), true ) ) ) {
    139         echo '<div class="error"><p><strong>' . __( 'Error:' ) . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</p></div>';
     139        echo '<div class="error"><p><strong>' . __( 'You cannot install a network of sites with your server address.' ) . '</p></div>';
    140140        echo '<p>' . sprintf(
    141141            /* translators: %s: Port number. */
     
    155155    $error_codes = array();
    156156    if ( is_wp_error( $errors ) ) {
    157         echo '<div class="error"><p><strong>' . __( 'Error: The network could not be created.' ) . '</strong></p>';
     157        echo '<div class="error"><p><strong>' . __( 'The network could not be created.' ) . '</strong></p>';
    158158        foreach ( $errors->get_error_messages() as $error ) {
    159159            echo "<p>$error</p>";
Note: See TracChangeset for help on using the changeset viewer.