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
This commit is contained in:
Andrea Fercia
2020-06-16 15:33:37 +00:00
parent 6334056f65
commit 50ece6d31c
25 changed files with 78 additions and 78 deletions
+3 -3
View File
@@ -30,7 +30,7 @@ if ( defined( 'WP_TESTS_CONFIG_FILE_PATH' ) ) {
global $wpdb, $current_site, $current_blog, $wp_rewrite, $shortcode_tags, $wp, $phpmailer, $wp_theme_directories;
if ( ! is_readable( $config_file_path ) ) {
echo "Error: wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.\n";
echo "wp-tests-config.php is missing! Please use wp-tests-config-sample.php to create a config file.\n";
exit( 1 );
}
@@ -39,7 +39,7 @@ require_once __DIR__ . '/functions.php';
if ( version_compare( tests_get_phpunit_version(), '5.4', '<' ) || version_compare( tests_get_phpunit_version(), '8.0', '>=' ) ) {
printf(
"Error: Looks like you're using PHPUnit %s. WordPress requires at least PHPUnit 5.4 and is currently only compatible with PHPUnit up to 7.x.\n",
"Looks like you're using PHPUnit %s. WordPress requires at least PHPUnit 5.4 and is currently only compatible with PHPUnit up to 7.x.\n",
tests_get_phpunit_version()
);
echo "Please use the latest PHPUnit version from the 7.x branch.\n";
@@ -47,7 +47,7 @@ if ( version_compare( tests_get_phpunit_version(), '5.4', '<' ) || version_compa
}
if ( defined( 'WP_RUN_CORE_TESTS' ) && WP_RUN_CORE_TESTS && ! is_dir( ABSPATH ) ) {
echo "Error: The /build/ directory is missing! Please run `npm run build` prior to running PHPUnit.\n";
echo "The /build/ directory is missing! Please run `npm run build` prior to running PHPUnit.\n";
exit( 1 );
}