From 90fda37ed4da391209d94e2c0458d43e0910a84f Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 22 Nov 2013 01:59:43 +0000 Subject: [PATCH] Use static strings instead of a impossible-to-translate string in the Automatic updates debug email. Props SergeyBiryukov. Fixes #25667 git-svn-id: https://develop.svn.wordpress.org/trunk@26313 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-upgrader.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/wp-admin/includes/class-wp-upgrader.php b/src/wp-admin/includes/class-wp-upgrader.php index 5c6327ce02..160f7adea0 100644 --- a/src/wp-admin/includes/class-wp-upgrader.php +++ b/src/wp-admin/includes/class-wp-upgrader.php @@ -2346,16 +2346,26 @@ class WP_Automatic_Updater { continue; $success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) ); if ( $success_items ) { - /* translators: %s singular/plural form of 'plugin', 'theme', or, 'translation' */ - $body[] = sprintf( __( 'The following %ss were successfully updated:' ), $type ); + $messages = array( + 'plugin' => __( 'The following plugins were successfully updated:' ), + 'theme' => __( 'The following themes were successfully updated:' ), + 'translation' => __( 'The following translations were successfully updated:' ), + ); + + $body[] = $messages[ $type ]; foreach ( wp_list_pluck( $success_items, 'name' ) as $name ) { $body[] = ' * ' . sprintf( __( 'SUCCESS: %s' ), $name ); } } if ( $success_items != $this->update_results[ $type ] ) { // Failed updates - /* translators: %s generic singular/plural form of 'plugin', 'theme', or, 'translation' */ - $body[] = sprintf( __( 'The following %ss failed to update:' ), $type ); + $messages = array( + 'plugin' => __( 'The following plugins failed to update:' ), + 'theme' => __( 'The following themes failed to update:' ), + 'translation' => __( 'The following translations failed to update:' ), + ); + + $body[] = $messages[ $type ]; foreach ( $this->update_results[ $type ] as $item ) { if ( ! $item->result || is_wp_error( $item->result ) ) { $body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name );