Make WordPress Core


Ignore:
Timestamp:
11/20/2013 02:03:30 AM (13 years ago)
Author:
dd32
Message:

Translate the debug update email for development installs. Props Nao for initial patch. See #25667

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r26164 r26279  
    23272327                $failures = 0;
    23282328
    2329                 $body[] = 'WordPress site: ' . network_home_url( '/' );
     2329                $body[] = sprintf( __( 'WordPress site: %s' ), network_home_url( '/' ) );
    23302330
    23312331                // Core
    … …  
    23332333                        $result = $this->update_results['core'][0];
    23342334                        if ( $result->result && ! is_wp_error( $result->result ) ) {
    2335                                 $body[] = sprintf( 'SUCCESS: WordPress was successfully updated to %s', $result->name );
     2335                                $body[] = sprintf( __( 'SUCCESS: WordPress was successfully updated to %s' ), $result->name );
    23362336                        } else {
    2337                                 $body[] = sprintf( 'FAILED: WordPress failed to update to %s', $result->name );
     2337                                $body[] = sprintf( __( 'FAILED: WordPress failed to update to %s' ), $result->name );
    23382338                                $failures++;
    23392339                        }
    … …  
    23472347                        $success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) );
    23482348                        if ( $success_items ) {
    2349                                 $body[] = "The following {$type}s were successfully updated:";
    2350                                 foreach ( wp_list_pluck( $success_items, 'name' ) as $name )
    2351                                         $body[] = ' * SUCCESS: ' . $name;
     2349                                /* translators: %s singular/plural form of 'plugin', 'theme', or, 'translation' */
     2350                                $body[] = sprintf( __( 'The following %ss were successfully updated:' ), $type );
     2351                                foreach ( wp_list_pluck( $success_items, 'name' ) as $name ) {
     2352                                        $body[] = ' * ' . sprintf( __( 'SUCCESS: %s' ), $name );
     2353                                }
    23522354                        }
    23532355                        if ( $success_items != $this->update_results[ $type ] ) {
    23542356                                // Failed updates
    2355                                 $body[] = "The following {$type}s failed to update:";
     2357                                /* translators: %s generic singular/plural form of 'plugin', 'theme', or, 'translation' */
     2358                                $body[] = sprintf( __( 'The following %ss failed to update:' ), $type );
    23562359                                foreach ( $this->update_results[ $type ] as $item ) {
    23572360                                        if ( ! $item->result || is_wp_error( $item->result ) ) {
    2358                                                 $body[] = ' * FAILED: ' . $item->name;
     2361                                                $body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name );
    23592362                                                $failures++;
    23602363                                        }
    … …  
    23652368
    23662369                if ( $failures ) {
    2367                         $body[] = '';
    2368                         $body[] = 'BETA TESTING?';
    2369                         $body[] = '=============';
    2370                         $body[] = '';
    2371                         $body[] = 'This debugging email is sent when you are using a development version of WordPress.';
    2372                         $body[] = '';
    2373                         $body[] = 'If you think these failures might be due to a bug in WordPress, could you report it?';
    2374                         $body[] = ' * Open a thread in the support forums: http://wordpress.org/support/forum/alphabeta';
    2375                         $body[] = " * Or, if you're comfortable writing a bug report: http://core.trac.wordpress.org/";
    2376                         $body[] = '';
    2377                         $body[] = 'Thanks! -- The WordPress Team';
    2378                         $body[] = '';
    2379                         $subject = sprintf( '[%s] There were failures during background updates', get_bloginfo( 'name' ) );
     2370                        $body[] = __( "
     2371BETA TESTING?
     2372=============
     2373
     2374This debugging email is sent when you are using a development version of WordPress.
     2375
     2376If you think these failures might be due to a bug in WordPress, could you report it?
     2377 * Open a thread in the support forums: http://wordpress.org/support/forum/alphabeta
     2378 * Or, if you're comfortable writing a bug report: http://core.trac.wordpress.org/
     2379
     2380Thanks! -- The WordPress Team" );
     2381
     2382                        $subject = sprintf( __( '[%s] There were failures during background updates' ), get_bloginfo( 'name' ) );
    23802383                } else {
    2381                         $subject = sprintf( '[%s] Background updates have finished', get_bloginfo( 'name' ) );
    2382                 }
    2383 
    2384                 $body[] = 'UPDATE LOG';
     2384                        $subject = sprintf( __( '[%s] Background updates have finished' ), get_bloginfo( 'name' ) );
     2385                }
     2386
     2387                $body[] = __( 'UPDATE LOG' );
    23852388                $body[] = '==========';
    23862389                $body[] = '';
    … …  
    24022405                                                if ( ! is_wp_error( $result ) )
    24032406                                                        continue;
    2404                                                 $body[] = '  ' . ( 'rollback' === $result_type ? 'Rollback ' : '' ) . 'Error: [' . $result->get_error_code() . '] ' . $result->get_error_message();
     2407
     2408                                                if ( 'rollback' === $result_type ) {
     2409                                                        $body[] = '  ' . sprintf( __( 'Rollback Error: [%s] %s' ), $result->get_error_code(), $result->get_error_message() );
     2410                                                } else {
     2411                                                        $body[] = '  ' . sprintf( __( 'Error: [%s] %s' ), $result->get_error_code(), $result->get_error_message() );
     2412                                                }
     2413
    24052414                                                if ( $result->get_error_data() )
    24062415                                                        $body[] = '         ' . implode( ', ', (array) $result->get_error_data() );
Note: See TracChangeset for help on using the changeset viewer.