Changeset 43598
- Timestamp:
- 08/30/2018 01:35:27 PM (6 years ago)
- Location:
- trunk/src/wp-admin/includes
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r43571 r43598 391 391 'in_moderation' => $counts->moderated, 392 392 'i18n_comments_text' => sprintf( 393 /* translators: %s: number of comments approved */ 393 394 _n( '%s Comment', '%s Comments', $counts->approved ), 394 395 number_format_i18n( $counts->approved ) 395 396 ), 396 397 'i18n_moderation_text' => sprintf( 398 /* translators: %s: number of comments in moderation */ 397 399 _nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments' ), 398 400 number_format_i18n( $counts->moderated ) … … 453 455 'status' => $comment ? $comment->comment_approved : '', 454 456 'postId' => $comment ? $comment->comment_post_ID : '', 457 /* translators: %s: number of comments */ 455 458 'total_items_i18n' => sprintf( _n( '%s item', '%s items', $total ), number_format_i18n( $total ) ), 456 459 'total_pages' => ceil( $total / $per_page ), … … 836 839 array( 837 840 'what' => 'comment', 841 /* translators: %d: comment ID */ 838 842 'id' => new WP_Error( 'invalid_comment', sprintf( __( 'Comment %d does not exist' ), $id ) ), 839 843 ) … … 1215 1219 'in_moderation' => $counts->moderated, 1216 1220 'i18n_comments_text' => sprintf( 1221 /* translators: %s: number of comments approved */ 1217 1222 _n( '%s Comment', '%s Comments', $counts->approved ), 1218 1223 number_format_i18n( $counts->approved ) 1219 1224 ), 1220 1225 'i18n_moderation_text' => sprintf( 1226 /* translators: %s: number of comments moderated */ 1221 1227 _nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments' ), 1222 1228 number_format_i18n( $counts->moderated ) … … 1814 1820 $last_user = get_userdata( $last ); 1815 1821 $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); 1816 printf( $_POST['post_type'] == 'page' ? __( 'Saving is disabled: %s is currently editing this page.' ) : __( 'Saving is disabled: %s is currently editing this post.' ), esc_html( $last_user_name ) ); 1822 1823 /* translators: %s: user who is currently editing the post */ 1824 $msg_template = __( 'Saving is disabled: %s is currently editing this post.' ); 1825 if ( $_POST['post_type'] == 'page' ) { 1826 /* translators: %s: user who is currently editing the page */ 1827 $msg_template = __( 'Saving is disabled: %s is currently editing this page.' ); 1828 } 1829 1830 printf( $msg_template, esc_html( $last_user_name ) ); 1817 1831 wp_die(); 1818 1832 } … … 2509 2523 2510 2524 if ( $last_id = get_post_meta( $post_id, '_edit_last', true ) ) { 2511 $last_user = get_userdata( $last_id ); 2525 $last_user = get_userdata( $last_id ); 2526 /* translators: 1: display_name of last user, 2: date of last edit, 3: time of last edit. */ 2512 2527 $last_edited = sprintf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), $last_date, $last_time ); 2513 2528 } else { 2529 /* translators: 1: date of last edit, 2: time of last edit. */ 2514 2530 $last_edited = sprintf( __( 'Last edited on %1$s at %2$s' ), $last_date, $last_time ); 2515 2531 } … … 3337 3353 array( 3338 3354 'type' => 'not-embeddable', 3355 /* translators: %s: URL which cannot be embedded, between code tags */ 3339 3356 'message' => sprintf( __( '%s failed to embed.' ), '<code>' . esc_html( $url ) . '</code>' ), 3340 3357 ) -
trunk/src/wp-admin/includes/bookmark.php
r42871 r43598 320 320 if ( $really_can_manage_links && current_user_can( 'install_plugins' ) ) { 321 321 $link = network_admin_url( 'plugin-install.php?tab=search&s=Link+Manager' ); 322 /* translators: %s: URL of link manager plugin */ 322 323 wp_die( sprintf( __( 'If you are looking to use the link manager, please install the <a href="%s">Link Manager</a> plugin.' ), $link ) ); 323 324 } -
trunk/src/wp-admin/includes/class-bulk-plugin-upgrader-skin.php
r42873 r43598 21 21 public function add_strings() { 22 22 parent::add_strings(); 23 /* translators: 1: name of plugin being updated, 2: number of updating plugin, 3: total number of plugins being updated */ 23 24 $this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)' ); 24 25 } -
trunk/src/wp-admin/includes/class-bulk-theme-upgrader-skin.php
r42871 r43598 21 21 public function add_strings() { 22 22 parent::add_strings(); 23 /* translators: 1: name of theme being updated, 2: number of updating themes, 3: total number of themes being updated */ 23 24 $this->upgrader->strings['skin_before_update_header'] = __( 'Updating Theme %1$s (%2$d/%3$d)' ); 24 25 } -
trunk/src/wp-admin/includes/class-language-pack-upgrader-skin.php
r42871 r43598 48 48 echo '<div class="update-messages lp-show-latest">'; 49 49 50 /* translators: 1: name of project, 2: language */ 50 51 printf( '<h2>' . __( 'Updating translations for %1$s (%2$s)…' ) . '</h2>', $name, $this->language_update->language ); 51 52 } -
trunk/src/wp-admin/includes/class-language-pack-upgrader.php
r43571 r43598 344 344 'incompatible_archive_pomo', 345 345 $this->strings['incompatible_archive'], 346 /* translators: 1: .po, 2: .mo */347 346 sprintf( 347 /* translators: 1: .po, 2: .mo */ 348 348 __( 'The language pack is missing either the %1$s or %2$s files.' ), 349 349 '<code>.po</code>', -
trunk/src/wp-admin/includes/class-plugin-installer-skin.php
r42871 r43598 43 43 public function before() { 44 44 if ( ! empty( $this->api ) ) { 45 /* translators: 1: name of API, 2: version of API */ 45 46 $this->upgrader->strings['process_success'] = sprintf( __( 'Successfully installed the plugin <strong>%1$s %2$s</strong>.' ), $this->api->name, $this->api->version ); 46 47 } -
trunk/src/wp-admin/includes/class-theme-installer-skin.php
r43571 r43598 76 76 77 77 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 78 $customize_url = add_query_arg(78 $customize_url = add_query_arg( 79 79 array( 80 80 'theme' => urlencode( $stylesheet ), … … 83 83 admin_url( 'customize.php' ) 84 84 ); 85 $install_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>'; 85 $install_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize">'; 86 $install_actions['preview'] .= '<span aria-hidden="true">' . __( 'Live Preview' ) . '</span>'; 87 /* translators: %s: theme name */ 88 $install_actions['preview'] .= '<span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>'; 86 89 } 87 $install_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate “%s”' ), $name ) . '</span></a>'; 90 $install_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink">'; 91 $install_actions['activate'] .= '<span aria-hidden="true">' . __( 'Activate' ) . '</span>'; 92 /* translators: %s: theme name */ 93 $install_actions['activate'] .= '<span class="screen-reader-text">' . sprintf( __( 'Activate “%s”' ), $name ) . '</span></a>'; 88 94 89 95 if ( is_network_admin() && current_user_can( 'manage_network_themes' ) ) { -
trunk/src/wp-admin/includes/class-theme-upgrader-skin.php
r43571 r43598 66 66 if ( get_stylesheet() == $stylesheet ) { 67 67 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 68 $update_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Customize' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Customize “%s”' ), $name ) . '</span></a>'; 68 $update_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize">'; 69 $update_actions['preview'] .= '<span aria-hidden="true">' . __( 'Customize' ) . '</span>'; 70 /* translators: %s: theme name */ 71 $update_actions['preview'] .= '<span class="screen-reader-text">' . sprintf( __( 'Customize “%s”' ), $name ) . '</span></a>'; 69 72 } 70 73 } elseif ( current_user_can( 'switch_themes' ) ) { 71 74 if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { 72 $update_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize"><span aria-hidden="true">' . __( 'Live Preview' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>'; 75 $update_actions['preview'] = '<a href="' . esc_url( $customize_url ) . '" class="hide-if-no-customize load-customize">'; 76 $update_actions['preview'] .= '<span aria-hidden="true">' . __( 'Live Preview' ) . '</span>'; 77 /* translators: %s: theme name */ 78 $update_actions['preview'] .= '<span class="screen-reader-text">' . sprintf( __( 'Live Preview “%s”' ), $name ) . '</span></a>'; 73 79 } 74 $update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink"><span aria-hidden="true">' . __( 'Activate' ) . '</span><span class="screen-reader-text">' . sprintf( __( 'Activate “%s”' ), $name ) . '</span></a>'; 80 $update_actions['activate'] = '<a href="' . esc_url( $activate_link ) . '" class="activatelink">'; 81 $update_actions['activate'] .= '<span aria-hidden="true">' . __( 'Activate' ) . '</span>'; 82 /* translators: %s: theme name */ 83 $update_actions['activate'] .= '<span class="screen-reader-text">' . sprintf( __( 'Activate “%s”' ), $name ) . '</span></a>'; 75 84 } 76 85 -
trunk/src/wp-admin/includes/class-theme-upgrader.php
r43571 r43598 474 474 'incompatible_archive_theme_no_style', 475 475 $this->strings['incompatible_archive'], 476 /* translators: %s: style.css */477 476 sprintf( 477 /* translators: %s: style.css */ 478 478 __( 'The theme is missing the %s stylesheet.' ), 479 479 '<code>style.css</code>' … … 494 494 'incompatible_archive_theme_no_name', 495 495 $this->strings['incompatible_archive'], 496 /* translators: %s: style.css */497 496 sprintf( 497 /* translators: %s: style.css */ 498 498 __( 'The %s stylesheet doesn’t contain a valid theme header.' ), 499 499 '<code>style.css</code>' … … 507 507 'incompatible_archive_theme_no_index', 508 508 $this->strings['incompatible_archive'], 509 /* translators: %s: index.php */510 509 sprintf( 510 /* translators: %s: index.php */ 511 511 __( 'The theme is missing the %s file.' ), 512 512 '<code>index.php</code>' -
trunk/src/wp-admin/includes/class-walker-nav-menu-checklist.php
r42343 r43598 96 96 $title = apply_filters( 'the_title', $item->post_title, $item->ID ); 97 97 if ( ! empty( $item->front_or_home ) && _x( 'Home', 'nav menu home label' ) !== $title ) { 98 /* translators: %s: front page title */ 98 99 $title = sprintf( _x( 'Home: %s', 'nav menu front page title' ), $title ); 99 100 } -
trunk/src/wp-admin/includes/class-walker-nav-menu-edit.php
r43571 r43598 218 218 <?php if ( 'custom' != $item->type && $original_title !== false ) : ?> 219 219 <p class="link-to-original"> 220 <?php printf( __( 'Original: %s' ), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); ?> 220 <?php 221 /* translators: %s: original title */ 222 printf( __( 'Original: %s' ), '<a href="' . esc_attr( $item->url ) . '">' . esc_html( $original_title ) . '</a>' ); 223 ?> 221 224 </p> 222 225 <?php endif; ?> -
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.