From d3031d522e60cd5daea6d13e7146661f8336b720 Mon Sep 17 00:00:00 2001
From: "Dominik Schilling (ocean90)"
Date: Sun, 20 Sep 2015 08:58:27 +0000
Subject: [PATCH] Upgrader: Avoid using an HTML tag in a translation string,
add translator comments.
Props ramiy for initial patch.
Fixes #31860.
git-svn-id: https://develop.svn.wordpress.org/trunk@34352 602fd350-edb4-49c9-b593-d223f7449a82
---
src/wp-admin/includes/class-wp-upgrader-skins.php | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/wp-admin/includes/class-wp-upgrader-skins.php b/src/wp-admin/includes/class-wp-upgrader-skins.php
index ad2cb89987..b0a5080b84 100644
--- a/src/wp-admin/includes/class-wp-upgrader-skins.php
+++ b/src/wp-admin/includes/class-wp-upgrader-skins.php
@@ -281,8 +281,11 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
*/
public function add_strings() {
$this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.');
- $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: %2$s');
+ /* translators: 1: Title of an update, 2: Error message */
+ $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: %2$s');
+ /* translators: 1: Title of an update */
$this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.');
+ /* translators: 1: Title of an update */
$this->upgrader->strings['skin_update_successful'] = __( '%1$s updated successfully.' ) . ' ' . __( 'Show Details' ) . '' . __( 'Hide Details' ) . '';
$this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.');
}
@@ -379,10 +382,11 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
public function after($title = '') {
echo '
';
if ( $this->error || ! $this->result ) {
- if ( $this->error )
- echo '' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, $this->error) . '
';
- else
+ if ( $this->error ) {
+ echo '' . sprintf($this->upgrader->strings['skin_update_failed_error'], $title, '' . $this->error . '' ) . '
';
+ } else {
echo '' . sprintf($this->upgrader->strings['skin_update_failed'], $title) . '
';
+ }
echo '';
}