X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/53f4633144ed68c8b8fb5861f992b5489894a940..784f914b1e4b1c62d6657e86397c2e83bcee4295:/wp-admin/includes/class-wp-upgrader-skins.php diff --git a/wp-admin/includes/class-wp-upgrader-skins.php b/wp-admin/includes/class-wp-upgrader-skins.php index 3e9a5556..c9d32ceb 100644 --- a/wp-admin/includes/class-wp-upgrader-skins.php +++ b/wp-admin/includes/class-wp-upgrader-skins.php @@ -224,7 +224,8 @@ class Plugin_Upgrader_Skin extends WP_Upgrader_Skin { public function after() { $this->plugin = $this->upgrader->plugin_info(); if ( !empty($this->plugin) && !is_wp_error($this->result) && $this->plugin_active ){ - echo ''; + // Currently used only when JS is off for a single plugin update? + echo ''; } $this->decrement_update_count( 'plugin' ); @@ -281,8 +282,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' ) . ''; $this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.'); } @@ -366,7 +370,7 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin { */ public function before($title = '') { $this->in_loop = true; - printf( '

' . $this->upgrader->strings['skin_before_update_header'] . '

', $title, $this->upgrader->update_current, $this->upgrader->update_count); + printf( '

' . $this->upgrader->strings['skin_before_update_header'] . '

', $title, $this->upgrader->update_current, $this->upgrader->update_count ); echo ''; echo '

'; $this->flush_output(); @@ -379,10 +383,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 ''; } @@ -739,7 +744,7 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin { } } elseif ( current_user_can( 'switch_themes' ) ) { if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { - $update_actions['preview'] .= '' . sprintf( __( 'Live Preview “%s”' ), $name ) . ''; + $update_actions['preview'] = '' . sprintf( __( 'Live Preview “%s”' ), $name ) . ''; } $update_actions['activate'] = '' . sprintf( __( 'Activate “%s”' ), $name ) . ''; } @@ -801,7 +806,7 @@ class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin { echo '
'; - printf( '

' . __( 'Updating translations for %1$s (%2$s)…' ) . '

', $name, $this->language_update->language ); + printf( '

' . __( 'Updating translations for %1$s (%2$s)…' ) . '

', $name, $this->language_update->language ); } /**