Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 50ece6d

Browse filesBrowse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@48059 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 6334056 commit 50ece6d
Copy full SHA for 50ece6d

File tree

Expand file treeCollapse file tree

25 files changed

+78
-78
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

25 files changed

+78
-78
lines changed
Open diff view settings
Collapse file

‎src/js/_enqueues/vendor/tinymce/langs/wp-langs-en.js‎

Copy file name to clipboardExpand all lines: src/js/_enqueues/vendor/tinymce/langs/wp-langs-en.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
clipboard_msg: "Copy/Cut/Paste is not available in Mozilla and Firefox.",
2525
clipboard_no_support: "Currently not supported by your browser, use keyboard shortcuts instead.",
2626
popup_blocked: "Sorry, but we have noticed that your popup-blocker has disabled a window that provides application functionality. You will need to disable popup blocking on this site in order to fully utilize this tool.",
27-
invalid_data: "Error: Invalid values entered, these are marked in red.",
27+
invalid_data: "Invalid values entered, these are marked in red.",
2828
invalid_data_number: "{#field} must be a number",
2929
invalid_data_min: "{#field} must be a number greater than {#min}",
3030
invalid_data_size: "{#field} must be a number or percentage",
Collapse file

‎src/wp-admin/import.php‎

Copy file name to clipboardExpand all lines: src/wp-admin/import.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<h1><?php echo esc_html( $title ); ?></h1>
6262
<?php if ( ! empty( $_GET['invalid'] ) ) : ?>
6363
<div class="error">
64-
<p><strong><?php _e( 'Error:' ); ?></strong>
64+
<p>
6565
<?php
6666
/* translators: %s: Importer slug. */
6767
printf( __( 'The %s importer is invalid or is not installed.' ), '<strong>' . esc_html( $_GET['invalid'] ) . '</strong>' );
Collapse file

‎src/wp-admin/includes/ajax-actions.php‎

Copy file name to clipboardExpand all lines: src/wp-admin/includes/ajax-actions.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ function wp_ajax_replyto_comment( $action ) {
12721272
if ( empty( $post->post_status ) ) {
12731273
wp_die( 1 );
12741274
} elseif ( in_array( $post->post_status, array( 'draft', 'pending', 'trash' ), true ) ) {
1275-
wp_die( __( 'Error: You are replying to a comment on a draft post.' ) );
1275+
wp_die( __( 'You can&#8217;t reply to a comment on a draft post.' ) );
12761276
}
12771277

12781278
$user = wp_get_current_user();
@@ -1302,7 +1302,7 @@ function wp_ajax_replyto_comment( $action ) {
13021302
}
13031303

13041304
if ( '' === $comment_content ) {
1305-
wp_die( __( 'Error: Please type a comment.' ) );
1305+
wp_die( __( 'Please type your comment text.' ) );
13061306
}
13071307

13081308
$comment_parent = 0;
@@ -1404,7 +1404,7 @@ function wp_ajax_edit_comment() {
14041404
}
14051405

14061406
if ( '' === $_POST['content'] ) {
1407-
wp_die( __( 'Error: Please type a comment.' ) );
1407+
wp_die( __( 'Please type your comment text.' ) );
14081408
}
14091409

14101410
if ( isset( $_POST['status'] ) ) {
Collapse file

‎src/wp-admin/includes/file.php‎

Copy file name to clipboardExpand all lines: src/wp-admin/includes/file.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2099,7 +2099,7 @@ function request_filesystem_credentials( $form_post, $type = '', $error = false,
20992099
$connection_type = isset( $credentials['connection_type'] ) ? $credentials['connection_type'] : '';
21002100

21012101
if ( $error ) {
2102-
$error_string = __( '<strong>Error</strong>: There was an error connecting to the server. Please verify the settings are correct.' );
2102+
$error_string = __( 'There was an error connecting to the server. Please verify the settings are correct.' );
21032103
if ( is_wp_error( $error ) ) {
21042104
$error_string = esc_html( $error->get_error_message() );
21052105
}
Collapse file

‎src/wp-admin/includes/network.php‎

Copy file name to clipboardExpand all lines: src/wp-admin/includes/network.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function network_step1( $errors = false ) {
110110
global $is_apache;
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.' ),
116116
'<code>DO_NOT_UPGRADE_GLOBAL_TABLES</code>'
@@ -136,7 +136,7 @@ function network_step1( $errors = false ) {
136136
$hostname = get_clean_basedomain();
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. */
142142
__( 'You cannot use port numbers such as %s.' ),
@@ -154,7 +154,7 @@ function network_step1( $errors = false ) {
154154

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>";
160160
}
Collapse file

‎src/wp-admin/includes/plugin-install.php‎

Copy file name to clipboardExpand all lines: src/wp-admin/includes/plugin-install.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ function install_plugin_information() {
801801

802802
if ( ! $compatible_php ) {
803803
echo '<div class="notice notice-error notice-alt"><p>';
804-
_e( '<strong>Error:</strong> This plugin <strong>requires a newer version of PHP</strong>.' );
804+
_e( 'This plugin <strong>requires a newer version of PHP</strong>.' );
805805
if ( current_user_can( 'update_php' ) ) {
806806
printf(
807807
/* translators: %s: URL to Update PHP page. */
@@ -822,7 +822,7 @@ function install_plugin_information() {
822822
echo '</p></div>';
823823
} elseif ( ! $compatible_wp ) {
824824
echo '<div class="notice notice-error notice-alt"><p>';
825-
_e( '<strong>Error:</strong> This plugin <strong>requires a newer version of WordPress</strong>.' );
825+
_e( 'This plugin <strong>requires a newer version of WordPress</strong>.' );
826826
if ( current_user_can( 'update_core' ) ) {
827827
printf(
828828
/* translators: %s: URL to WordPress Updates screen. */
Collapse file

‎src/wp-admin/includes/plugin.php‎

Copy file name to clipboardExpand all lines: src/wp-admin/includes/plugin.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ function validate_plugin_requirements( $plugin ) {
11521152
'plugin_wp_php_incompatible',
11531153
sprintf(
11541154
/* translators: %s: Plugin name. */
1155-
_x( '<strong>Error:</strong> Current WordPress and PHP versions do not meet minimum requirements for %s.', 'plugin' ),
1155+
_x( 'Current WordPress and PHP versions do not meet minimum requirements for %s.', 'plugin' ),
11561156
$plugin_headers['Name']
11571157
)
11581158
);
@@ -1161,7 +1161,7 @@ function validate_plugin_requirements( $plugin ) {
11611161
'plugin_php_incompatible',
11621162
sprintf(
11631163
/* translators: %s: Plugin name. */
1164-
_x( '<strong>Error:</strong> Current PHP version does not meet minimum requirements for %s.', 'plugin' ),
1164+
_x( 'Current PHP version does not meet minimum requirements for %s.', 'plugin' ),
11651165
$plugin_headers['Name']
11661166
)
11671167
);
@@ -1170,7 +1170,7 @@ function validate_plugin_requirements( $plugin ) {
11701170
'plugin_wp_incompatible',
11711171
sprintf(
11721172
/* translators: %s: Plugin name. */
1173-
_x( '<strong>Error:</strong> Current WordPress version does not meet minimum requirements for %s.', 'plugin' ),
1173+
_x( 'Current WordPress version does not meet minimum requirements for %s.', 'plugin' ),
11741174
$plugin_headers['Name']
11751175
)
11761176
);
Collapse file

‎src/wp-admin/includes/user.php‎

Copy file name to clipboardExpand all lines: src/wp-admin/includes/user.php
+11-11Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,12 @@ function edit_user( $user_id = 0 ) {
143143

144144
/* checking that username has been typed */
145145
if ( '' === $user->user_login ) {
146-
$errors->add( 'user_login', __( '<strong>Error</strong>: Please enter a username.' ) );
146+
$errors->add( 'user_login', __( 'Please enter a username.' ) );
147147
}
148148

149149
/* checking that nickname has been typed */
150150
if ( $update && empty( $user->nickname ) ) {
151-
$errors->add( 'nickname', __( '<strong>Error</strong>: Please enter a nickname.' ) );
151+
$errors->add( 'nickname', __( 'Please enter a nickname.' ) );
152152
}
153153

154154
/**
@@ -164,47 +164,47 @@ function edit_user( $user_id = 0 ) {
164164

165165
// Check for blank password when adding a user.
166166
if ( ! $update && empty( $pass1 ) ) {
167-
$errors->add( 'pass', __( '<strong>Error</strong>: Please enter a password.' ), array( 'form-field' => 'pass1' ) );
167+
$errors->add( 'pass', __( 'Please enter a password.' ), array( 'form-field' => 'pass1' ) );
168168
}
169169

170170
// Check for "\" in password.
171171
if ( false !== strpos( wp_unslash( $pass1 ), '\\' ) ) {
172-
$errors->add( 'pass', __( '<strong>Error</strong>: Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) );
172+
$errors->add( 'pass', __( 'Passwords may not contain the character "\\".' ), array( 'form-field' => 'pass1' ) );
173173
}
174174

175175
// Checking the password has been typed twice the same.
176176
if ( ( $update || ! empty( $pass1 ) ) && $pass1 != $pass2 ) {
177-
$errors->add( 'pass', __( '<strong>Error</strong>: Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) );
177+
$errors->add( 'pass', __( 'Passwords don&#8217;t match. Please enter the same password in both password fields.' ), array( 'form-field' => 'pass1' ) );
178178
}
179179

180180
if ( ! empty( $pass1 ) ) {
181181
$user->user_pass = $pass1;
182182
}
183183

184184
if ( ! $update && isset( $_POST['user_login'] ) && ! validate_username( $_POST['user_login'] ) ) {
185-
$errors->add( 'user_login', __( '<strong>Error</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
185+
$errors->add( 'user_login', __( 'This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
186186
}
187187

188188
if ( ! $update && username_exists( $user->user_login ) ) {
189-
$errors->add( 'user_login', __( '<strong>Error</strong>: This username is already registered. Please choose another one.' ) );
189+
$errors->add( 'user_login', __( 'This username is already registered. Please choose another one.' ) );
190190
}
191191

192192
/** This filter is documented in wp-includes/user.php */
193193
$illegal_logins = (array) apply_filters( 'illegal_user_logins', array() );
194194

195195
if ( in_array( strtolower( $user->user_login ), array_map( 'strtolower', $illegal_logins ), true ) ) {
196-
$errors->add( 'invalid_username', __( '<strong>Error</strong>: Sorry, that username is not allowed.' ) );
196+
$errors->add( 'invalid_username', __( 'Sorry, that username is not allowed.' ) );
197197
}
198198

199199
/* checking email address */
200200
if ( empty( $user->user_email ) ) {
201-
$errors->add( 'empty_email', __( '<strong>Error</strong>: Please enter an email address.' ), array( 'form-field' => 'email' ) );
201+
$errors->add( 'empty_email', __( 'Please enter an email address.' ), array( 'form-field' => 'email' ) );
202202
} elseif ( ! is_email( $user->user_email ) ) {
203-
$errors->add( 'invalid_email', __( '<strong>Error</strong>: The email address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) );
203+
$errors->add( 'invalid_email', __( 'The email address isn&#8217;t correct.' ), array( 'form-field' => 'email' ) );
204204
} else {
205205
$owner_id = email_exists( $user->user_email );
206206
if ( $owner_id && ( ! $update || ( $owner_id != $user->ID ) ) ) {
207-
$errors->add( 'email_exists', __( '<strong>Error</strong>: This email is already registered, please choose another one.' ), array( 'form-field' => 'email' ) );
207+
$errors->add( 'email_exists', __( 'This email is already registered. Please choose another one.' ), array( 'form-field' => 'email' ) );
208208
}
209209
}
210210

Collapse file

‎src/wp-admin/options.php‎

Copy file name to clipboardExpand all lines: src/wp-admin/options.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
wp_die(
222222
sprintf(
223223
/* translators: %s: The options page name. */
224-
__( '<strong>Error</strong>: Options page %s not found in the options whitelist.' ),
224+
__( 'Options page %s not found in the options whitelist.' ),
225225
'<code>' . esc_html( $option_page ) . '</code>'
226226
)
227227
);
Collapse file

‎src/wp-admin/setup-config.php‎

Copy file name to clipboardExpand all lines: src/wp-admin/setup-config.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,12 @@ function setup_config_display_header( $body_classes = array() ) {
280280
$tryagain_link = '</p><p class="step"><a href="' . $step_1 . '" onclick="javascript:history.go(-1);return false;" class="button button-large">' . __( 'Try Again' ) . '</a>';
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

291291
// Test the DB connection.
@@ -318,7 +318,7 @@ function setup_config_display_header( $body_classes = array() ) {
318318
$wpdb->show_errors( $errors );
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

324324
// Generate keys and salts using secure CSPRNG; fallback to API if enabled; further fallback to original wp_generate_password().

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.