From a5ed63c86f1113e141d9a727b205143e9af7ede5 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 15 Jun 2015 03:47:54 +0000 Subject: [PATCH] Updates: Display the failure reason in addition to 'Update Failed', allows for debugging by site owners. Fixes #32435, #32473 git-svn-id: https://develop.svn.wordpress.org/trunk@32779 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/updates.js | 2 +- src/wp-includes/script-loader.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wp-admin/js/updates.js b/src/wp-admin/js/updates.js index afd667862b..0d7bf888bf 100644 --- a/src/wp-admin/js/updates.js +++ b/src/wp-admin/js/updates.js @@ -263,7 +263,7 @@ window.wp = window.wp || {}; $message.attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', name ) ); } $message.removeClass( 'updating-message' ); - $message.text( wp.updates.l10n.updateFailed ); + $message.html( wp.updates.l10n.updateFailed.replace( '%s', response.error ) ); wp.a11y.speak( wp.updates.l10n.updateFailed ); $(document).trigger( 'wp-plugin-update-error', response ); diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 5ed1db751f..c2ae253ac2 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -526,7 +526,8 @@ function wp_default_scripts( &$scripts ) { 'l10n' => array( 'updating' => __( 'Updating...' ), 'updated' => __( 'Updated!' ), - 'updateFailed' => __( 'Update Failed' ), + /* translators: Error string for a failed update */ + 'updateFailed' => __( 'Update Failed: %s' ), /* translators: Plugin name and version */ 'updatingLabel' => __( 'Updating %s...' ), /* translators: Plugin name and version */