From ff4f261101f0c5ad21dc81e5d55abb5201d0d0a4 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Sat, 9 May 2015 18:26:37 +0000 Subject: [PATCH] Merge similar error strings. props pavelevap. fixes #32327. git-svn-id: https://develop.svn.wordpress.org/trunk@32471 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-press-this.php | 4 ++-- src/wp-includes/atomlib.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/class-wp-press-this.php b/src/wp-admin/includes/class-wp-press-this.php index 257c76dc9c..dc4f3a3b00 100644 --- a/src/wp-admin/includes/class-wp-press-this.php +++ b/src/wp-admin/includes/class-wp-press-this.php @@ -280,9 +280,9 @@ class WP_Press_This { unlink( $source_tmp_file ); } else if ( is_wp_error( $source_tmp_file ) ) { - $source_content = new WP_Error( 'upload-error', sprintf( __( 'Error: %s' ), sprintf( __( 'Could not download the source URL (native error: %s).' ), $source_tmp_file->get_error_message() ) ) ); + $source_content = new WP_Error( 'upload-error', sprintf( __( 'ERROR: %s' ), sprintf( __( 'Could not download the source URL (native error: %s).' ), $source_tmp_file->get_error_message() ) ) ); } else if ( ! file_exists( $source_tmp_file ) ) { - $source_content = new WP_Error( 'no-local-file', sprintf( __( 'Error: %s' ), __( 'Could not save or locate the temporary download file for the source URL.' ) ) ); + $source_content = new WP_Error( 'no-local-file', sprintf( __( 'ERROR: %s' ), __( 'Could not save or locate the temporary download file for the source URL.' ) ) ); } return $source_content; diff --git a/src/wp-includes/atomlib.php b/src/wp-includes/atomlib.php index 9d34276a7e..3d2e1904e5 100644 --- a/src/wp-includes/atomlib.php +++ b/src/wp-includes/atomlib.php @@ -130,7 +130,8 @@ class AtomParser { if($this->debug) $this->content .= $data; if(!xml_parse($parser, $data, feof($fp))) { - trigger_error(sprintf(__('XML error: %s at line %d')."\n", + /* translators: 1: error message, 2: line number */ + trigger_error(sprintf(__('XML Error: %1$s at line %2$s')."\n", xml_error_string(xml_get_error_code($parser)), xml_get_current_line_number($parser))); $ret = false;