From c2d709e9d6cbe7f9b3c37da0a7c9aae788158124 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Mon, 21 Nov 2016 02:46:30 +0000 Subject: [PATCH] I18n: Introduce more translator comments for strings that contain placeholders but don't have an accompanying translator comment. See #38882 Built from https://develop.svn.wordpress.org/trunk@39326 git-svn-id: http://core.svn.wordpress.org/trunk@39266 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-header.php | 16 ++++++---- wp-admin/edit-form-advanced.php | 2 ++ wp-admin/includes/ajax-actions.php | 1 + wp-admin/includes/dashboard.php | 3 ++ wp-admin/includes/media.php | 16 +++++++--- wp-admin/includes/meta-boxes.php | 10 ++++++- wp-admin/includes/ms.php | 7 ++++- wp-includes/comment-template.php | 1 + ...ass-wp-customize-nav-menu-item-control.php | 5 +++- .../class-wp-customize-theme-control.php | 5 +++- wp-includes/formatting.php | 7 ++++- wp-includes/general-template.php | 10 ++++++- wp-includes/pluggable.php | 29 +++++++++++++++---- wp-includes/taxonomy.php | 6 ++-- wp-includes/update.php | 15 +++++++--- wp-includes/user.php | 2 ++ wp-includes/version.php | 2 +- wp-links-opml.php | 5 +++- wp-login.php | 1 + wp-mail.php | 1 + 20 files changed, 115 insertions(+), 29 deletions(-) diff --git a/wp-admin/admin-header.php b/wp-admin/admin-header.php index 9799d0f8d4..d5ceeccd61 100644 --- a/wp-admin/admin-header.php +++ b/wp-admin/admin-header.php @@ -32,17 +32,23 @@ if ( empty( $current_screen ) ) get_admin_page_title(); $title = esc_html( strip_tags( $title ) ); -if ( is_network_admin() ) +if ( is_network_admin() ) { + /* translators: Network admin screen title. 1: Network name */ $admin_title = sprintf( __( 'Network Admin: %s' ), esc_html( get_network()->site_name ) ); -elseif ( is_user_admin() ) +} elseif ( is_user_admin() ) { + /* translators: User dashboard screen title. 1: Network name */ $admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) ); -else +} else { $admin_title = get_bloginfo( 'name' ); +} -if ( $admin_title == $title ) +if ( $admin_title == $title ) { + /* translators: Admin screen title. 1: Admin screen name */ $admin_title = sprintf( __( '%1$s — WordPress' ), $title ); -else +} else { + /* translators: Admin screen title. 1: Admin screen name, 2: Network or site name */ $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title ); +} /** * Filters the title tag content for an admin page. diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 1627439518..803300f40d 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -639,8 +639,10 @@ if ( post_type_supports($post_type, 'editor') ) { if ( 'auto-draft' != $post->post_status ) { echo ''; if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) { + /* translators: 1: Name of most recent post author, 2: Post edited date, 3: Post edited time */ printf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); } else { + /* translators: 1: Post edited date, 2: Post edited time */ printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) ); } echo ''; diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php index 35edf541b6..ef89a6b816 100644 --- a/wp-admin/includes/ajax-actions.php +++ b/wp-admin/includes/ajax-actions.php @@ -1248,6 +1248,7 @@ function wp_ajax_add_meta() { $post_data['post_type'] = $post->post_type; $post_data['post_status'] = 'draft'; $now = current_time('timestamp', 1); + /* translators: 1: Post creation date, 2: Post creation time */ $post_data['post_title'] = sprintf( __( 'Draft created on %1$s at %2$s' ), date( __( 'F j, Y' ), $now ), date( __( 'g:i a' ), $now ) ); $pid = edit_post( $post_data ); diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index aab5976c58..0ecf0a23f0 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -392,9 +392,12 @@ function wp_network_dashboard_right_now() { $c_users = get_user_count(); $c_blogs = get_blog_count(); + /* translators: 1: Number of users on the network */ $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); + /* translators: 1: Number of sites on the network */ $blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) ); + /* translators: 1: Text indicating the number of sites on the network, 2: Text indicating the number of users on the network */ $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); if ( $actions ) { diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index c79e312444..ede25b3df7 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -313,6 +313,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override /* translators: 1: audio track title, 2: artist name */ $content .= sprintf( __( '"%1$s" by %2$s.' ), $title, $meta['artist'] ); } else { + /* translators: 1: audio track title */ $content .= sprintf( __( '"%s".' ), $title ); } @@ -331,19 +332,26 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override } - if ( ! empty( $meta['year'] ) ) + if ( ! empty( $meta['year'] ) ) { + /* translators: Audio file track information. 1: Year of audio track release */ $content .= ' ' . sprintf( __( 'Released: %d.' ), $meta['year'] ); + } if ( ! empty( $meta['track_number'] ) ) { $track_number = explode( '/', $meta['track_number'] ); - if ( isset( $track_number[1] ) ) + if ( isset( $track_number[1] ) ) { + /* translators: Audio file track information. 1: Audio track number, 2: Total audio tracks */ $content .= ' ' . sprintf( __( 'Track %1$s of %2$s.' ), number_format_i18n( $track_number[0] ), number_format_i18n( $track_number[1] ) ); - else + } else { + /* translators: Audio file track information. 1: Audio track number */ $content .= ' ' . sprintf( __( 'Track %1$s.' ), number_format_i18n( $track_number[0] ) ); + } } - if ( ! empty( $meta['genre'] ) ) + if ( ! empty( $meta['genre'] ) ) { + /* translators: Audio file genre information. 1: Audio genre name */ $content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] ); + } // Use image exif/iptc data for title and caption defaults if possible. } elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = @wp_read_image_metadata( $file ) ) { diff --git a/wp-admin/includes/meta-boxes.php b/wp-admin/includes/meta-boxes.php index 945ffd51e4..c26ced427a 100644 --- a/wp-admin/includes/meta-boxes.php +++ b/wp-admin/includes/meta-boxes.php @@ -175,14 +175,18 @@ echo esc_html( $visibility_trans ); ?> $datef = __( 'M j, Y @ H:i' ); if ( 0 != $post->ID ) { if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date + /* translators: Post date information. 1: Date on which the post is currently scheduled to be published */ $stamp = __('Scheduled for: %1$s'); } elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published + /* translators: Post date information. 1: Date on which the post was published */ $stamp = __('Published on: %1$s'); } elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified $stamp = __('Publish immediately'); } elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified + /* translators: Post date information. 1: Date on which the post is to be published */ $stamp = __('Schedule for: %1$s'); } else { // draft, 1 or more saves, date specified + /* translators: Post date information. 1: Date on which the post is to be published */ $stamp = __('Publish on: %1$s'); } $date = date_i18n( $datef, strtotime( $post->post_date ) ); @@ -193,7 +197,10 @@ if ( 0 != $post->ID ) { if ( ! empty( $args['args']['revisions_count'] ) ) : ?>
- ' . number_format_i18n( $args['args']['revisions_count'] ) . '' ); ?> + ' . number_format_i18n( $args['args']['revisions_count'] ) . '' ); + ?>
%1$s'); $date = date_i18n( $datef, strtotime( $post->post_date ) ); ?> diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index 48dbf55c74..0edc308382 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -29,10 +29,12 @@ function check_upload_size( $file ) { $file_size = filesize( $file['tmp_name'] ); if ( $space_left < $file_size ) { + /* translators: 1: Required disk space in kilobytes */ $file['error'] = sprintf( __( 'Not enough space to upload. %1$s KB needed.' ), number_format( ( $file_size - $space_left ) / KB_IN_BYTES ) ); } if ( $file_size > ( KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 ) ) ) { + /* translators: 1: Maximum allowed file size in kilobytes */ $file['error'] = sprintf( __( 'This file is too big. Files must be less than %1$s KB in size.' ), get_site_option( 'fileupload_maxk', 1500 ) ); } @@ -474,7 +476,10 @@ function display_space_usage() { $space .= __( 'MB' ); } ?> - + 'comment', 'respond_id' => 'respond', 'reply_text' => __( 'Reply' ), + /* translators: Comment reply button text. 1: Comment author name */ 'reply_to_text' => __( 'Reply to %s' ), 'login_text' => __( 'Log in to Reply' ), 'max_depth' => 0, diff --git a/wp-includes/customize/class-wp-customize-nav-menu-item-control.php b/wp-includes/customize/class-wp-customize-nav-menu-item-control.php index ee3311b463..941dad4c34 100644 --- a/wp-includes/customize/class-wp-customize-nav-menu-item-control.php +++ b/wp-includes/customize/class-wp-customize-nav-menu-item-control.php @@ -134,7 +134,10 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {