Make WordPress Core

Ticket #25667: 25667.2.diff

File 25667.2.diff, 1.8 KB (added by SergeyBiryukov, 11 years ago)
  • src/wp-admin/includes/class-wp-upgrader.php

     
    23462346                                continue;
    23472347                        $success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) );
    23482348                        if ( $success_items ) {
    2349                                 /* translators: %s singular/plural form of 'plugin', 'theme', or, 'translation' */
    2350                                 $body[] = sprintf( __( 'The following %ss were successfully updated:' ), $type );
     2349                                $messages = array(
     2350                                        'plugin'      => __( 'The following plugins were successfully updated:' ),
     2351                                        'theme'       => __( 'The following themes were successfully updated:' ),
     2352                                        'translation' => __( 'The following translations were successfully updated:' ),
     2353                                );
     2354
     2355                                $body[] = $messages[ $type ];
    23512356                                foreach ( wp_list_pluck( $success_items, 'name' ) as $name ) {
    23522357                                        $body[] = ' * ' . sprintf( __( 'SUCCESS: %s' ), $name );
    23532358                                }
     
    23542359                        }
    23552360                        if ( $success_items != $this->update_results[ $type ] ) {
    23562361                                // Failed updates
    2357                                 /* translators: %s generic singular/plural form of 'plugin', 'theme', or, 'translation' */
    2358                                 $body[] = sprintf( __( 'The following %ss failed to update:' ), $type );
     2362                                $messages = array(
     2363                                        'plugin'      => __( 'The following plugins failed to update:' ),
     2364                                        'theme'       => __( 'The following themes failed to update:' ),
     2365                                        'translation' => __( 'The following translations failed to update:' ),
     2366                                );
     2367
     2368                                $body[] = $messages[ $type ];
    23592369                                foreach ( $this->update_results[ $type ] as $item ) {
    23602370                                        if ( ! $item->result || is_wp_error( $item->result ) ) {
    23612371                                                $body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name );