Accessibility: Text Changes: Use sentence case for the word Error in various error messages, instead of all caps.
Using all caps should be avoided for better readability and because screen readers may pronounce all-caps words as abbreviations. Props afercia, ryokuhi, sabernhardt, garrett-eclipse. See #47656, #43037, #42945. Built from https://develop.svn.wordpress.org/trunk@47156 git-svn-id: http://core.svn.wordpress.org/trunk@46956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -1272,7 +1272,7 @@ function wp_ajax_replyto_comment( $action ) {
|
||||
if ( empty( $post->post_status ) ) {
|
||||
wp_die( 1 );
|
||||
} elseif ( in_array( $post->post_status, array( 'draft', 'pending', 'trash' ) ) ) {
|
||||
wp_die( __( 'ERROR: You are replying to a comment on a draft post.' ) );
|
||||
wp_die( __( 'Error: You are replying to a comment on a draft post.' ) );
|
||||
}
|
||||
|
||||
$user = wp_get_current_user();
|
||||
@@ -1302,7 +1302,7 @@ function wp_ajax_replyto_comment( $action ) {
|
||||
}
|
||||
|
||||
if ( '' == $comment_content ) {
|
||||
wp_die( __( 'ERROR: Please type a comment.' ) );
|
||||
wp_die( __( 'Error: Please type a comment.' ) );
|
||||
}
|
||||
|
||||
$comment_parent = 0;
|
||||
@@ -1404,7 +1404,7 @@ function wp_ajax_edit_comment() {
|
||||
}
|
||||
|
||||
if ( '' == $_POST['content'] ) {
|
||||
wp_die( __( 'ERROR: Please type a comment.' ) );
|
||||
wp_die( __( 'Error: Please type a comment.' ) );
|
||||
}
|
||||
|
||||
if ( isset( $_POST['status'] ) ) {
|
||||
|
||||
@@ -2074,7 +2074,7 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
|
||||
$connection_type = isset( $credentials['connection_type'] ) ? $credentials['connection_type'] : '';
|
||||
|
||||
if ( $error ) {
|
||||
$error_string = __( '<strong>ERROR:</strong> There was an error connecting to the server, Please verify the settings are correct.' );
|
||||
$error_string = __( '<strong>Error</strong>: There was an error connecting to the server, Please verify the settings are correct.' );
|
||||
if ( is_wp_error( $error ) ) {
|
||||
$error_string = esc_html( $error->get_error_message() );
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ function network_step1( $errors = false ) {
|
||||
global $is_apache;
|
||||
|
||||
if ( defined( 'DO_NOT_UPGRADE_GLOBAL_TABLES' ) ) {
|
||||
echo '<div class="error"><p><strong>' . __( 'ERROR:' ) . '</strong> ' . sprintf(
|
||||
echo '<div class="error"><p><strong>' . __( 'Error:' ) . '</strong> ' . sprintf(
|
||||
/* translators: %s: DO_NOT_UPGRADE_GLOBAL_TABLES */
|
||||
__( 'The constant %s cannot be defined when creating a network.' ),
|
||||
'<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
|
||||
@@ -136,7 +136,7 @@ function network_step1( $errors = false ) {
|
||||
$hostname = get_clean_basedomain();
|
||||
$has_ports = strstr( $hostname, ':' );
|
||||
if ( ( false !== $has_ports && ! in_array( $has_ports, array( ':80', ':443' ) ) ) ) {
|
||||
echo '<div class="error"><p><strong>' . __( 'ERROR:' ) . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</p></div>';
|
||||
echo '<div class="error"><p><strong>' . __( 'Error:' ) . '</strong> ' . __( 'You cannot install a network of sites with your server address.' ) . '</p></div>';
|
||||
echo '<p>' . sprintf(
|
||||
/* translators: %s: Port number. */
|
||||
__( 'You cannot use port numbers such as %s.' ),
|
||||
@@ -154,7 +154,7 @@ function network_step1( $errors = false ) {
|
||||
|
||||
$error_codes = array();
|
||||
if ( is_wp_error( $errors ) ) {
|
||||
echo '<div class="error"><p><strong>' . __( 'ERROR: The network could not be created.' ) . '</strong></p>';
|
||||
echo '<div class="error"><p><strong>' . __( 'Error: The network could not be created.' ) . '</strong></p>';
|
||||
foreach ( $errors->get_error_messages() as $error ) {
|
||||
echo "<p>$error</p>";
|
||||
}
|
||||
|
||||
@@ -144,12 +144,12 @@ function edit_user( $user_id = 0 ) {
|
||||
|
||||
/* checking that username has been typed */
|
||||
if ( $user->user_login == '' ) {
|
||||
$errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ) );
|
||||
$errors->add( 'user_login', __( '<strong>Error</strong>: Please enter a username.' ) );
|
||||
}
|
||||
|
||||
/* checking that nickname has been typed */
|
||||
if ( $update && empty( $user->nickname ) ) {
|
||||
$errors->add( 'nickname', __( '<strong>ERROR</strong>: Please enter a nickname.' ) );
|
||||
$errors->add( 'nickname', __( '<strong>Error</strong>: Please enter a nickname.' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -165,17 +165,17 @@ function edit_user( $user_id = 0 ) {
|
||||
|
||||
// Check for blank password when adding a user.
|
||||
if ( ! $update && empty( $pass1 ) ) {
|
||||
$errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter a password.' ), array( 'form-field' => 'pass1' ) );
|
||||
$errors->add( 'pass', __( '<strong>Error</strong>: Please enter a password.' ), array( 'form-field' => 'pass1' ) );
|
||||
}
|
||||
|
||||
// Check for "\" in password.
|
||||
if ( false !== strpos( wp_unslash( $pass1 ), '\\' ) ) {
|
||||
$errors->add( 'pass', __( '<strong>ERROR</strong>: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) );
|
||||
$errors->add( 'pass', __( '<strong>Error</strong>: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) );
|
||||
}
|
||||
|
||||
// Checking the password has been typed twice the same.
|
||||
if ( ( $update || ! empty( $pass1 ) ) && $pass1 != $pass2 ) {
|
||||
$errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) );
|
||||
$errors->add( 'pass', __( '<strong>Error</strong>: Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) );
|
||||
}
|
||||
|
||||
if ( ! empty( $pass1 ) ) {
|
||||
@@ -183,29 +183,29 @@ function edit_user( $user_id = 0 ) {
|
||||
}
|
||||
|
||||
if ( ! $update && isset( $_POST['user_login'] ) && ! validate_username( $_POST['user_login'] ) ) {
|
||||
$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
|
||||
$errors->add( 'user_login', __( '<strong>Error</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
|
||||
}
|
||||
|
||||
if ( ! $update && username_exists( $user->user_login ) ) {
|
||||
$errors->add( 'user_login', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
|
||||
$errors->add( 'user_login', __( '<strong>Error</strong>: This username is already registered. Please choose another one.' ) );
|
||||
}
|
||||
|
||||
/** This filter is documented in wp-includes/user.php */
|
||||
$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
|
||||
|
||||
if ( in_array( strtolower( $user->user_login ), array_map( 'strtolower', $illegal_logins ), true ) ) {
|
||||
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
|
||||
$errors->add( 'invalid_username', __( '<strong>Error</strong>: Sorry, that username is not allowed.' ) );
|
||||
}
|
||||
|
||||
/* checking email address */
|
||||
if ( empty( $user->user_email ) ) {
|
||||
$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please enter an email address.' ), array( 'form-field' => 'email' ) );
|
||||
$errors->add( 'empty_email', __( '<strong>Error</strong>: Please enter an email address.' ), array( 'form-field' => 'email' ) );
|
||||
} elseif ( ! is_email( $user->user_email ) ) {
|
||||
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) );
|
||||
$errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn’t correct.' ), array( 'form-field' => 'email' ) );
|
||||
} else {
|
||||
$owner_id = email_exists( $user->user_email );
|
||||
if ( $owner_id && ( ! $update || ( $owner_id != $user->ID ) ) ) {
|
||||
$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ), array( 'form-field' => 'email' ) );
|
||||
$errors->add( 'email_exists', __( '<strong>Error</strong>: This email is already registered, please choose another one.' ), array( 'form-field' => 'email' ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user