- Timestamp:
- 08/30/2018 01:35:27 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-automatic-updater.php
r43571 r43598 308 308 switch ( $type ) { 309 309 case 'core': 310 /* translators: %s: WordPress version */ 310 311 $skin->feedback( __( 'Updating to WordPress %s' ), $item->version ); 312 /* translators: %s: WordPress version */ 311 313 $item_name = sprintf( __( 'WordPress %s' ), $item->version ); 312 314 break; … … 315 317 $theme = wp_get_theme( $upgrader_item ); 316 318 $item_name = $theme->Get( 'Name' ); 319 /* translators: %s: Theme name */ 317 320 $skin->feedback( __( 'Updating theme: %s' ), $item_name ); 318 321 break; … … 321 324 $plugin_data = get_plugin_data( $context . '/' . $upgrader_item ); 322 325 $item_name = $plugin_data['Name']; 326 /* translators: %s: Plugin name */ 323 327 $skin->feedback( __( 'Updating plugin: %s' ), $item_name ); 324 328 break; 325 329 case 'translation': 326 330 $language_item_name = $upgrader->get_name_for_update( $item ); 327 $item_name = sprintf( __( 'Translations for %s' ), $language_item_name ); 331 /* translators: %s: Name of language item */ 332 $item_name = sprintf( __( 'Translations for %s' ), $language_item_name ); 333 /* translators: 1: Name of language item, 2: Language */ 328 334 $skin->feedback( sprintf( __( 'Updating translations for %1$s (%2$s)…' ), $language_item_name, $item->language ) ); 329 335 break; … … 663 669 switch ( $type ) { 664 670 case 'success': 671 /* translators: 1: Home URL, 2: WordPress version */ 665 672 $body .= sprintf( __( 'Howdy! Your site at %1$s has been updated automatically to WordPress %2$s.' ), home_url(), $core_update->current ); 666 673 $body .= "\n\n"; … … 671 678 // Can only reference the About screen if their update was successful. 672 679 list( $about_version ) = explode( '-', $core_update->current, 2 ); 673 $body .= sprintf( __( 'For more on version %s, see the About WordPress screen:' ), $about_version ); 674 $body .= "\n" . admin_url( 'about.php' ); 680 /* translators: %s: WordPress core version */ 681 $body .= sprintf( __( 'For more on version %s, see the About WordPress screen:' ), $about_version ); 682 $body .= "\n" . admin_url( 'about.php' ); 675 683 676 684 if ( $newer_version_available ) { 685 /* translators: %s: WordPress core latest version */ 677 686 $body .= "\n\n" . sprintf( __( 'WordPress %s is also now available.' ), $next_user_core_update->current ) . ' '; 678 687 $body .= __( 'Updating is easy and only takes a few moments:' ); … … 684 693 case 'fail': 685 694 case 'manual': 695 /* translators: 1: Home URL, 2: WordPress core latest version */ 686 696 $body .= sprintf( __( 'Please update your site at %1$s to WordPress %2$s.' ), home_url(), $next_user_core_update->current ); 687 697 … … 700 710 case 'critical': 701 711 if ( $newer_version_available ) { 712 /* translators: 1: Home URL, 2: WordPress core latest version */ 702 713 $body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update WordPress to version %2$s.' ), home_url(), $core_update->current ); 703 714 } else { 715 /* translators: 1: Home URL, 2: Core update version */ 704 716 $body .= sprintf( __( 'Your site at %1$s experienced a critical failure while trying to update to the latest version of WordPress, %2$s.' ), home_url(), $core_update->current ); 705 717 } … … 715 727 if ( $critical_support ) { 716 728 // Support offer if available. 729 /* translators: %s: Support e-mail */ 717 730 $body .= "\n\n" . sprintf( __( 'The WordPress team is willing to help you. Forward this email to %s and the team will work with you to make sure your site is working.' ), $core_update->support_email ); 718 731 } else { … … 741 754 if ( 'critical' == $type && is_wp_error( $result ) ) { 742 755 $body .= "\n***\n\n"; 756 /* translators: %s: WordPress version */ 743 757 $body .= sprintf( __( 'Your site was running version %s.' ), get_bloginfo( 'version' ) ); 744 758 $body .= ' ' . __( 'We have some data that describes the error your site encountered.' ); … … 758 772 } 759 773 $error_code = $error->get_error_code(); 760 $body .= "\n\n" . sprintf( __( 'Error code: %s' ), $error_code ); 774 /* translators: %s: Error code */ 775 $body .= "\n\n" . sprintf( __( 'Error code: %s' ), $error_code ); 761 776 if ( 'rollback_was_required' == $error_code ) { 762 777 continue; … … 816 831 $failures = 0; 817 832 833 /* translators: %s: Network home URL */ 818 834 $body[] = sprintf( __( 'WordPress site: %s' ), network_home_url( '/' ) ); 819 835 … … 822 838 $result = $this->update_results['core'][0]; 823 839 if ( $result->result && ! is_wp_error( $result->result ) ) { 840 /* translators: %s: WordPress core version */ 824 841 $body[] = sprintf( __( 'SUCCESS: WordPress was successfully updated to %s' ), $result->name ); 825 842 } else { 843 /* translators: %s: WordPress core version */ 826 844 $body[] = sprintf( __( 'FAILED: WordPress failed to update to %s' ), $result->name ); 827 845 $failures++; … … 845 863 $body[] = $messages[ $type ]; 846 864 foreach ( wp_list_pluck( $success_items, 'name' ) as $name ) { 865 /* translators: %s: name of plugin / theme / translations */ 847 866 $body[] = ' * ' . sprintf( __( 'SUCCESS: %s' ), $name ); 848 867 } … … 859 878 foreach ( $this->update_results[ $type ] as $item ) { 860 879 if ( ! $item->result || is_wp_error( $item->result ) ) { 880 /* translators: %s: name of plugin / theme / translations */ 861 881 $body[] = ' * ' . sprintf( __( 'FAILED: %s' ), $item->name ); 862 882 $failures++; … … 885 905 $body[] = ''; 886 906 907 /* translators: %s: site title */ 887 908 $subject = sprintf( __( '[%s] There were failures during background updates' ), $site_title ); 888 909 } else { 910 /* translators: %s: site title */ 889 911 $subject = sprintf( __( '[%s] Background updates have finished' ), $site_title ); 890 912 }
Note: See TracChangeset
for help on using the changeset viewer.