Changeset 26279
- Timestamp:
- 11/20/2013 02:03:30 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-upgrader.php
r26164 r26279 2327 2327 $failures = 0; 2328 2328 2329 $body[] = 'WordPress site: ' . network_home_url( '/');2329 $body[] = sprintf( __( 'WordPress site: %s' ), network_home_url( '/' ) ); 2330 2330 2331 2331 // Core … … 2333 2333 $result = $this->update_results['core'][0]; 2334 2334 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 ); 2336 2336 } 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 ); 2338 2338 $failures++; 2339 2339 } … … 2347 2347 $success_items = wp_list_filter( $this->update_results[ $type ], array( 'result' => true ) ); 2348 2348 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 } 2352 2354 } 2353 2355 if ( $success_items != $this->update_results[ $type ] ) { 2354 2356 // 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 ); 2356 2359 foreach ( $this->update_results[ $type ] as $item ) { 2357 2360 if ( ! $item->result || is_wp_error( $item->result ) ) { 2358 $body[] = ' * FAILED: ' . $item->name;2361 $body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name ); 2359 2362 $failures++; 2360 2363 } … … 2365 2368 2366 2369 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[] = __( " 2371 BETA TESTING? 2372 ============= 2373 2374 This debugging email is sent when you are using a development version of WordPress. 2375 2376 If 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 2380 Thanks! -- The WordPress Team" ); 2381 2382 $subject = sprintf( __( '[%s] There were failures during background updates' ), get_bloginfo( 'name' ) ); 2380 2383 } 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' ); 2385 2388 $body[] = '=========='; 2386 2389 $body[] = ''; … … 2402 2405 if ( ! is_wp_error( $result ) ) 2403 2406 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 2405 2414 if ( $result->get_error_data() ) 2406 2415 $body[] = ' ' . implode( ', ', (array) $result->get_error_data() );
Note: See TracChangeset
for help on using the changeset viewer.