Changeset 45932 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 09/03/2019 12:39:13 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r45926 r45932 315 315 foreach ( $users as $user ) { 316 316 $return[] = array( 317 /* translators: 1: user login, 2: user email address*/317 /* translators: 1: User login, 2: User email address. */ 318 318 'label' => sprintf( _x( '%1$s (%2$s)', 'user autocomplete result' ), $user->user_login, $user->user_email ), 319 319 'value' => $user->$field, … … 455 455 'in_moderation' => $counts->moderated, 456 456 'i18n_comments_text' => sprintf( 457 /* translators: %s: number of comments*/457 /* translators: %s: Number of comments. */ 458 458 _n( '%s Comment', '%s Comments', $counts->approved ), 459 459 number_format_i18n( $counts->approved ) 460 460 ), 461 461 'i18n_moderation_text' => sprintf( 462 /* translators: %s: number of comments*/462 /* translators: %s: Number of comments. */ 463 463 _n( '%s Comment in moderation', '%s Comments in moderation', $counts->moderated ), 464 464 number_format_i18n( $counts->moderated ) … … 519 519 'status' => $comment ? $comment->comment_approved : '', 520 520 'postId' => $comment ? $comment->comment_post_ID : '', 521 /* translators: %s: number of comments*/521 /* translators: %s: Number of comments. */ 522 522 'total_items_i18n' => sprintf( _n( '%s item', '%s items', $total ), number_format_i18n( $total ) ), 523 523 'total_pages' => ceil( $total / $per_page ), … … 527 527 'in_moderation' => $counts->moderated, 528 528 'i18n_moderation_text' => sprintf( 529 /* translators: %s: number of comments*/529 /* translators: %s: Number of comments. */ 530 530 _n( '%s Comment in moderation', '%s Comments in moderation', $counts->moderated ), 531 531 number_format_i18n( $counts->moderated ) … … 916 916 'id' => new WP_Error( 917 917 'invalid_comment', 918 /* translators: %d: comment ID*/918 /* translators: %d: Comment ID. */ 919 919 sprintf( __( 'Comment %d does not exist' ), $id ) 920 920 ), … … 1305 1305 'in_moderation' => $counts->moderated, 1306 1306 'i18n_comments_text' => sprintf( 1307 /* translators: %s: number of comments*/1307 /* translators: %s: Number of comments. */ 1308 1308 _n( '%s Comment', '%s Comments', $counts->approved ), 1309 1309 number_format_i18n( $counts->approved ) 1310 1310 ), 1311 1311 'i18n_moderation_text' => sprintf( 1312 /* translators: %s: number of comments*/1312 /* translators: %s: Number of comments. */ 1313 1313 _n( '%s Comment in moderation', '%s Comments in moderation', $counts->moderated ), 1314 1314 number_format_i18n( $counts->moderated ) … … 1487 1487 $post_data['post_status'] = 'draft'; 1488 1488 $now = time(); 1489 /* translators: 1: Post creation date, 2: Post creation time */1489 /* translators: 1: Post creation date, 2: Post creation time. */ 1490 1490 $post_data['post_title'] = sprintf( __( 'Draft created on %1$s at %2$s' ), gmdate( __( 'F j, Y' ), $now ), gmdate( __( 'g:i a' ), $now ) ); 1491 1491 … … 1613 1613 'supplemental' => array( 1614 1614 'show-link' => sprintf( 1615 /* translators: %s: the new user*/1615 /* translators: %s: The new user. */ 1616 1616 __( 'User %s added' ), 1617 1617 '<a href="#user-' . $user_id . '">' . $user_object->user_login . '</a>' … … 1918 1918 $last_user_name = $last_user ? $last_user->display_name : __( 'Someone' ); 1919 1919 1920 /* translators: %s: user's display name*/1920 /* translators: %s: User's display name. */ 1921 1921 $msg_template = __( 'Saving is disabled: %s is currently editing this post.' ); 1922 1922 1923 1923 if ( $_POST['post_type'] == 'page' ) { 1924 /* translators: %s: user's display name*/1924 /* translators: %s: User's display name. */ 1925 1925 $msg_template = __( 'Saving is disabled: %s is currently editing this page.' ); 1926 1926 } … … 2112 2112 $time = ''; 2113 2113 } else { 2114 /* translators: date format in table columns, see https://secure.php.net/date */2114 /* translators: Date format in table columns, see https://secure.php.net/date */ 2115 2115 $time = mysql2date( __( 'Y/m/d' ), $post->post_date ); 2116 2116 } … … 2631 2631 if ( $last_id ) { 2632 2632 $last_user = get_userdata( $last_id ); 2633 /* translators: 1: user's display name, 2: date of last edit, 3: time of last edit. */2633 /* translators: 1: User's display name, 2: Date of last edit, 3: Time of last edit. */ 2634 2634 $last_edited = sprintf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), $last_date, $last_time ); 2635 2635 } else { 2636 /* translators: 1: date of last edit, 2: time of last edit. */2636 /* translators: 1: Date of last edit, 2: Time of last edit. */ 2637 2637 $last_edited = sprintf( __( 'Last edited on %1$s at %2$s' ), $last_date, $last_time ); 2638 2638 } … … 3485 3485 array( 3486 3486 'type' => 'not-embeddable', 3487 /* translators: %s: URL that could not be embedded */3487 /* translators: %s: URL that could not be embedded. */ 3488 3488 'message' => sprintf( __( '%s failed to embed.' ), '<code>' . esc_html( $url ) . '</code>' ), 3489 3489 ) … … 4229 4229 4230 4230 if ( $plugin_data['Version'] ) { 4231 /* translators: %s: Plugin version */4231 /* translators: %s: Plugin version. */ 4232 4232 $status['oldVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] ); 4233 4233 } … … 4272 4272 4273 4273 if ( $plugin_data['Version'] ) { 4274 /* translators: %s: Plugin version */4274 /* translators: %s: Plugin version. */ 4275 4275 $status['newVersion'] = sprintf( __( 'Version %s' ), $plugin_data['Version'] ); 4276 4276 } … … 4592 4592 if ( ! is_array( $exporter ) ) { 4593 4593 wp_send_json_error( 4594 /* translators: %s: exporter array index*/4594 /* translators: %s: Exporter array index. */ 4595 4595 sprintf( __( 'Expected an array describing the exporter at index %s.' ), $exporter_key ) 4596 4596 ); … … 4598 4598 if ( ! array_key_exists( 'exporter_friendly_name', $exporter ) ) { 4599 4599 wp_send_json_error( 4600 /* translators: %s: exporter array index*/4600 /* translators: %s: Exporter array index. */ 4601 4601 sprintf( __( 'Exporter array at index %s does not include a friendly name.' ), $exporter_key ) 4602 4602 ); … … 4607 4607 if ( ! array_key_exists( 'callback', $exporter ) ) { 4608 4608 wp_send_json_error( 4609 /* translators: %s: exporter friendly name*/4609 /* translators: %s: Exporter friendly name. */ 4610 4610 sprintf( __( 'Exporter does not include a callback: %s.' ), esc_html( $exporter_friendly_name ) ) 4611 4611 ); … … 4613 4613 if ( ! is_callable( $exporter['callback'] ) ) { 4614 4614 wp_send_json_error( 4615 /* translators: %s: exporter friendly name*/4615 /* translators: %s: Exporter friendly name. */ 4616 4616 sprintf( __( 'Exporter callback is not a valid callback: %s.' ), esc_html( $exporter_friendly_name ) ) 4617 4617 ); … … 4627 4627 if ( ! is_array( $response ) ) { 4628 4628 wp_send_json_error( 4629 /* translators: %s: exporter friendly name*/4629 /* translators: %s: Exporter friendly name. */ 4630 4630 sprintf( __( 'Expected response as an array from exporter: %s.' ), esc_html( $exporter_friendly_name ) ) 4631 4631 ); … … 4633 4633 if ( ! array_key_exists( 'data', $response ) ) { 4634 4634 wp_send_json_error( 4635 /* translators: %s: exporter friendly name*/4635 /* translators: %s: Exporter friendly name. */ 4636 4636 sprintf( __( 'Expected data in response array from exporter: %s.' ), esc_html( $exporter_friendly_name ) ) 4637 4637 ); … … 4639 4639 if ( ! is_array( $response['data'] ) ) { 4640 4640 wp_send_json_error( 4641 /* translators: %s: exporter friendly name*/4641 /* translators: %s: Exporter friendly name. */ 4642 4642 sprintf( __( 'Expected data array in response array from exporter: %s.' ), esc_html( $exporter_friendly_name ) ) 4643 4643 ); … … 4645 4645 if ( ! array_key_exists( 'done', $response ) ) { 4646 4646 wp_send_json_error( 4647 /* translators: %s: exporter friendly name*/4647 /* translators: %s: Exporter friendly name. */ 4648 4648 sprintf( __( 'Expected done (boolean) in response array from exporter: %s.' ), esc_html( $exporter_friendly_name ) ) 4649 4649 ); … … 4774 4774 4775 4775 if ( ! is_array( $eraser ) ) { 4776 /* translators: %d: eraser array index*/4776 /* translators: %d: Eraser array index. */ 4777 4777 wp_send_json_error( sprintf( __( 'Expected an array describing the eraser at index %d.' ), $eraser_index ) ); 4778 4778 } 4779 4779 4780 4780 if ( ! array_key_exists( 'eraser_friendly_name', $eraser ) ) { 4781 /* translators: %d: eraser array index*/4781 /* translators: %d: Eraser array index. */ 4782 4782 wp_send_json_error( sprintf( __( 'Eraser array at index %d does not include a friendly name.' ), $eraser_index ) ); 4783 4783 } … … 4788 4788 wp_send_json_error( 4789 4789 sprintf( 4790 /* translators: %s: eraser friendly name*/4790 /* translators: %s: Eraser friendly name. */ 4791 4791 __( 'Eraser does not include a callback: %s.' ), 4792 4792 esc_html( $eraser_friendly_name ) … … 4798 4798 wp_send_json_error( 4799 4799 sprintf( 4800 /* translators: %s: eraser friendly name*/4800 /* translators: %s: Eraser friendly name. */ 4801 4801 __( 'Eraser callback is not valid: %s.' ), 4802 4802 esc_html( $eraser_friendly_name ) … … 4815 4815 wp_send_json_error( 4816 4816 sprintf( 4817 /* translators: 1: eraser friendly name, 2: eraser array index*/4817 /* translators: 1: Eraser friendly name, 2: Eraser array index. */ 4818 4818 __( 'Did not receive array from %1$s eraser (index %2$d).' ), 4819 4819 esc_html( $eraser_friendly_name ), … … 4826 4826 wp_send_json_error( 4827 4827 sprintf( 4828 /* translators: 1: eraser friendly name, 2: eraser array index*/4828 /* translators: 1: Eraser friendly name, 2: Eraser array index. */ 4829 4829 __( 'Expected items_removed key in response array from %1$s eraser (index %2$d).' ), 4830 4830 esc_html( $eraser_friendly_name ), … … 4837 4837 wp_send_json_error( 4838 4838 sprintf( 4839 /* translators: 1: eraser friendly name, 2: eraser array index*/4839 /* translators: 1: Eraser friendly name, 2: Eraser array index. */ 4840 4840 __( 'Expected items_retained key in response array from %1$s eraser (index %2$d).' ), 4841 4841 esc_html( $eraser_friendly_name ), … … 4848 4848 wp_send_json_error( 4849 4849 sprintf( 4850 /* translators: 1: eraser friendly name, 2: eraser array index*/4850 /* translators: 1: Eraser friendly name, 2: Eraser array index. */ 4851 4851 __( 'Expected messages key in response array from %1$s eraser (index %2$d).' ), 4852 4852 esc_html( $eraser_friendly_name ), … … 4859 4859 wp_send_json_error( 4860 4860 sprintf( 4861 /* translators: 1: eraser friendly name, 2: eraser array index*/4861 /* translators: 1: Eraser friendly name, 2: Eraser array index. */ 4862 4862 __( 'Expected messages key to reference an array in response array from %1$s eraser (index %2$d).' ), 4863 4863 esc_html( $eraser_friendly_name ), … … 4870 4870 wp_send_json_error( 4871 4871 sprintf( 4872 /* translators: 1: eraser friendly name, 2: eraser array index*/4872 /* translators: 1: Eraser friendly name, 2: Eraser array index. */ 4873 4873 __( 'Expected done flag in response array from %1$s eraser (index %2$d).' ), 4874 4874 esc_html( $eraser_friendly_name ),
Note: See TracChangeset
for help on using the changeset viewer.