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
This commit is contained in:
John Blackbourn 2016-11-21 02:46:30 +00:00
parent 1b2ed70f39
commit c2d709e9d6
20 changed files with 115 additions and 29 deletions

View File

@ -32,17 +32,23 @@ if ( empty( $current_screen ) )
get_admin_page_title(); get_admin_page_title();
$title = esc_html( strip_tags( $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 ) ); $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 ) ); $admin_title = sprintf( __( 'User Dashboard: %s' ), esc_html( get_network()->site_name ) );
else } else {
$admin_title = get_bloginfo( 'name' ); $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 ); $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 ); $admin_title = sprintf( __( '%1$s ‹ %2$s — WordPress' ), $title, $admin_title );
}
/** /**
* Filters the title tag content for an admin page. * Filters the title tag content for an admin page.

View File

@ -639,8 +639,10 @@ if ( post_type_supports($post_type, 'editor') ) {
if ( 'auto-draft' != $post->post_status ) { if ( 'auto-draft' != $post->post_status ) {
echo '<span id="last-edit">'; echo '<span id="last-edit">';
if ( $last_user = get_userdata( get_post_meta( $post_ID, '_edit_last', true ) ) ) { 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 ) ); 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 { } 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 ) ); printf( __( 'Last edited on %1$s at %2$s' ), mysql2date( __( 'F j, Y' ), $post->post_modified ), mysql2date( __( 'g:i a' ), $post->post_modified ) );
} }
echo '</span>'; echo '</span>';

View File

@ -1248,6 +1248,7 @@ function wp_ajax_add_meta() {
$post_data['post_type'] = $post->post_type; $post_data['post_type'] = $post->post_type;
$post_data['post_status'] = 'draft'; $post_data['post_status'] = 'draft';
$now = current_time('timestamp', 1); $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 ) ); $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 ); $pid = edit_post( $post_data );

View File

@ -392,9 +392,12 @@ function wp_network_dashboard_right_now() {
$c_users = get_user_count(); $c_users = get_user_count();
$c_blogs = get_blog_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 ) ); $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 ) ); $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 ); $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text );
if ( $actions ) { if ( $actions ) {

View File

@ -313,6 +313,7 @@ function media_handle_upload($file_id, $post_id, $post_data = array(), $override
/* translators: 1: audio track title, 2: artist name */ /* translators: 1: audio track title, 2: artist name */
$content .= sprintf( __( '"%1$s" by %2$s.' ), $title, $meta['artist'] ); $content .= sprintf( __( '"%1$s" by %2$s.' ), $title, $meta['artist'] );
} else { } else {
/* translators: 1: audio track title */
$content .= sprintf( __( '"%s".' ), $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'] ); $content .= ' ' . sprintf( __( 'Released: %d.' ), $meta['year'] );
}
if ( ! empty( $meta['track_number'] ) ) { if ( ! empty( $meta['track_number'] ) ) {
$track_number = explode( '/', $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] ) ); $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] ) ); $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'] ); $content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] );
}
// Use image exif/iptc data for title and caption defaults if possible. // Use image exif/iptc data for title and caption defaults if possible.
} elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = @wp_read_image_metadata( $file ) ) { } elseif ( 0 === strpos( $type, 'image/' ) && $image_meta = @wp_read_image_metadata( $file ) ) {

View File

@ -175,14 +175,18 @@ echo esc_html( $visibility_trans ); ?></span>
$datef = __( 'M j, Y @ H:i' ); $datef = __( 'M j, Y @ H:i' );
if ( 0 != $post->ID ) { if ( 0 != $post->ID ) {
if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date 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: <b>%1$s</b>'); $stamp = __('Scheduled for: <b>%1$s</b>');
} elseif ( 'publish' == $post->post_status || 'private' == $post->post_status ) { // already published } 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: <b>%1$s</b>'); $stamp = __('Published on: <b>%1$s</b>');
} elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified } elseif ( '0000-00-00 00:00:00' == $post->post_date_gmt ) { // draft, 1 or more saves, no date specified
$stamp = __('Publish <b>immediately</b>'); $stamp = __('Publish <b>immediately</b>');
} elseif ( time() < strtotime( $post->post_date_gmt . ' +0000' ) ) { // draft, 1 or more saves, future date specified } 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: <b>%1$s</b>'); $stamp = __('Schedule for: <b>%1$s</b>');
} else { // draft, 1 or more saves, date specified } 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: <b>%1$s</b>'); $stamp = __('Publish on: <b>%1$s</b>');
} }
$date = date_i18n( $datef, strtotime( $post->post_date ) ); $date = date_i18n( $datef, strtotime( $post->post_date ) );
@ -193,7 +197,10 @@ if ( 0 != $post->ID ) {
if ( ! empty( $args['args']['revisions_count'] ) ) : ?> if ( ! empty( $args['args']['revisions_count'] ) ) : ?>
<div class="misc-pub-section misc-pub-revisions"> <div class="misc-pub-section misc-pub-revisions">
<?php printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' ); ?> <?php
/* translators: Post revisions heading. 1: The number of available revisions */
printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' );
?>
<a class="hide-if-no-js" href="<?php echo esc_url( get_edit_post_link( $args['args']['revision_id'] ) ); ?>"><span aria-hidden="true"><?php _ex( 'Browse', 'revisions' ); ?></span> <span class="screen-reader-text"><?php _e( 'Browse revisions' ); ?></span></a> <a class="hide-if-no-js" href="<?php echo esc_url( get_edit_post_link( $args['args']['revision_id'] ) ); ?>"><span aria-hidden="true"><?php _ex( 'Browse', 'revisions' ); ?></span> <span class="screen-reader-text"><?php _e( 'Browse revisions' ); ?></span></a>
</div> </div>
<?php endif; <?php endif;
@ -299,6 +306,7 @@ function attachment_submit_meta_box( $post ) {
<?php <?php
/* translators: Publish box date format, see https://secure.php.net/date */ /* translators: Publish box date format, see https://secure.php.net/date */
$datef = __( 'M j, Y @ H:i' ); $datef = __( 'M j, Y @ H:i' );
/* translators: Attachment information. 1: Date the attachment was uploaded */
$stamp = __('Uploaded on: <b>%1$s</b>'); $stamp = __('Uploaded on: <b>%1$s</b>');
$date = date_i18n( $datef, strtotime( $post->post_date ) ); $date = date_i18n( $datef, strtotime( $post->post_date ) );
?> ?>

View File

@ -29,10 +29,12 @@ function check_upload_size( $file ) {
$file_size = filesize( $file['tmp_name'] ); $file_size = filesize( $file['tmp_name'] );
if ( $space_left < $file_size ) { 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 ) ); $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 ) ) ) { 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 ) ); $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' ); $space .= __( 'MB' );
} }
?> ?>
<strong><?php printf( __( 'Used: %1$s%% of %2$s' ), number_format( $percent_used ), $space ); ?></strong> <strong><?php
/* translators: Storage space that's been used. 1: Percentage of used space, 2: Total space allowed in megabytes or gigabytes */
printf( __( 'Used: %1$s%% of %2$s' ), number_format( $percent_used ), $space );
?></strong>
<?php <?php
} }

View File

@ -1592,6 +1592,7 @@ function get_comment_reply_link( $args = array(), $comment = null, $post = null
'add_below' => 'comment', 'add_below' => 'comment',
'respond_id' => 'respond', 'respond_id' => 'respond',
'reply_text' => __( 'Reply' ), 'reply_text' => __( 'Reply' ),
/* translators: Comment reply button text. 1: Comment author name */
'reply_to_text' => __( 'Reply to %s' ), 'reply_to_text' => __( 'Reply to %s' ),
'login_text' => __( 'Log in to Reply' ), 'login_text' => __( 'Log in to Reply' ),
'max_depth' => 0, 'max_depth' => 0,

View File

@ -134,7 +134,10 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
<div class="menu-item-actions description-thin submitbox"> <div class="menu-item-actions description-thin submitbox">
<# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #> <# if ( ( 'post_type' === data.item_type || 'taxonomy' === data.item_type ) && '' !== data.original_title ) { #>
<p class="link-to-original"> <p class="link-to-original">
<?php printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' ); ?> <?php
/* translators: Nav menu item original title. 1: Original title */
printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' );
?>
</p> </p>
<# } #> <# } #>

View File

@ -87,7 +87,10 @@ class WP_Customize_Theme_Control extends WP_Customize_Control {
<span class="more-details" id="{{ data.theme.id }}-action"><?php _e( 'Live Preview' ); ?></span> <span class="more-details" id="{{ data.theme.id }}-action"><?php _e( 'Live Preview' ); ?></span>
<# } #> <# } #>
<div class="theme-author"><?php printf( __( 'By %s' ), '{{ data.theme.author }}' ); ?></div> <div class="theme-author"><?php
/* translators: Theme author name */
printf( _x( 'By %s', 'theme author' ), '{{ data.theme.author }}' );
?></div>
<# if ( data.theme.isActiveTheme ) { #> <# if ( data.theme.isActiveTheme ) { #>
<h3 class="theme-name" id="{{ data.theme.id }}-name"> <h3 class="theme-name" id="{{ data.theme.id }}-name">

View File

@ -3217,32 +3217,37 @@ function human_time_diff( $from, $to = '' ) {
$mins = round( $diff / MINUTE_IN_SECONDS ); $mins = round( $diff / MINUTE_IN_SECONDS );
if ( $mins <= 1 ) if ( $mins <= 1 )
$mins = 1; $mins = 1;
/* translators: min=minute */ /* translators: Time difference between two dates, in minutes (min=minute). 1: Number of minutes */
$since = sprintf( _n( '%s min', '%s mins', $mins ), $mins ); $since = sprintf( _n( '%s min', '%s mins', $mins ), $mins );
} elseif ( $diff < DAY_IN_SECONDS && $diff >= HOUR_IN_SECONDS ) { } elseif ( $diff < DAY_IN_SECONDS && $diff >= HOUR_IN_SECONDS ) {
$hours = round( $diff / HOUR_IN_SECONDS ); $hours = round( $diff / HOUR_IN_SECONDS );
if ( $hours <= 1 ) if ( $hours <= 1 )
$hours = 1; $hours = 1;
/* translators: Time difference between two dates, in hours. 1: Number of hours */
$since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours ); $since = sprintf( _n( '%s hour', '%s hours', $hours ), $hours );
} elseif ( $diff < WEEK_IN_SECONDS && $diff >= DAY_IN_SECONDS ) { } elseif ( $diff < WEEK_IN_SECONDS && $diff >= DAY_IN_SECONDS ) {
$days = round( $diff / DAY_IN_SECONDS ); $days = round( $diff / DAY_IN_SECONDS );
if ( $days <= 1 ) if ( $days <= 1 )
$days = 1; $days = 1;
/* translators: Time difference between two dates, in days. 1: Number of days */
$since = sprintf( _n( '%s day', '%s days', $days ), $days ); $since = sprintf( _n( '%s day', '%s days', $days ), $days );
} elseif ( $diff < MONTH_IN_SECONDS && $diff >= WEEK_IN_SECONDS ) { } elseif ( $diff < MONTH_IN_SECONDS && $diff >= WEEK_IN_SECONDS ) {
$weeks = round( $diff / WEEK_IN_SECONDS ); $weeks = round( $diff / WEEK_IN_SECONDS );
if ( $weeks <= 1 ) if ( $weeks <= 1 )
$weeks = 1; $weeks = 1;
/* translators: Time difference between two dates, in weeks. 1: Number of weeks */
$since = sprintf( _n( '%s week', '%s weeks', $weeks ), $weeks ); $since = sprintf( _n( '%s week', '%s weeks', $weeks ), $weeks );
} elseif ( $diff < YEAR_IN_SECONDS && $diff >= MONTH_IN_SECONDS ) { } elseif ( $diff < YEAR_IN_SECONDS && $diff >= MONTH_IN_SECONDS ) {
$months = round( $diff / MONTH_IN_SECONDS ); $months = round( $diff / MONTH_IN_SECONDS );
if ( $months <= 1 ) if ( $months <= 1 )
$months = 1; $months = 1;
/* translators: Time difference between two dates, in months. 1: Number of months */
$since = sprintf( _n( '%s month', '%s months', $months ), $months ); $since = sprintf( _n( '%s month', '%s months', $months ), $months );
} elseif ( $diff >= YEAR_IN_SECONDS ) { } elseif ( $diff >= YEAR_IN_SECONDS ) {
$years = round( $diff / YEAR_IN_SECONDS ); $years = round( $diff / YEAR_IN_SECONDS );
if ( $years <= 1 ) if ( $years <= 1 )
$years = 1; $years = 1;
/* translators: Time difference between two dates, in years. 1: Number of years */
$since = sprintf( _n( '%s year', '%s years', $years ), $years ); $since = sprintf( _n( '%s year', '%s years', $years ), $years );
} }

View File

@ -1461,16 +1461,22 @@ function the_archive_title( $before = '', $after = '' ) {
*/ */
function get_the_archive_title() { function get_the_archive_title() {
if ( is_category() ) { if ( is_category() ) {
/* translators: Category archive title. 1: Category name */
$title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) ); $title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) );
} elseif ( is_tag() ) { } elseif ( is_tag() ) {
/* translators: Tag archive title. 1: Tag name */
$title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) ); $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) );
} elseif ( is_author() ) { } elseif ( is_author() ) {
/* translators: Author archive title. 1: Author name */
$title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' ); $title = sprintf( __( 'Author: %s' ), '<span class="vcard">' . get_the_author() . '</span>' );
} elseif ( is_year() ) { } elseif ( is_year() ) {
/* translators: Yearly archive title. 1: Year */
$title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) ); $title = sprintf( __( 'Year: %s' ), get_the_date( _x( 'Y', 'yearly archives date format' ) ) );
} elseif ( is_month() ) { } elseif ( is_month() ) {
/* translators: Monthly archive title. 1: Month name and year */
$title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) ); $title = sprintf( __( 'Month: %s' ), get_the_date( _x( 'F Y', 'monthly archives date format' ) ) );
} elseif ( is_day() ) { } elseif ( is_day() ) {
/* translators: Daily archive title. 1: Date */
$title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) ); $title = sprintf( __( 'Day: %s' ), get_the_date( _x( 'F j, Y', 'daily archives date format' ) ) );
} elseif ( is_tax( 'post_format' ) ) { } elseif ( is_tax( 'post_format' ) ) {
if ( is_tax( 'post_format', 'post-format-aside' ) ) { if ( is_tax( 'post_format', 'post-format-aside' ) ) {
@ -1493,10 +1499,11 @@ function get_the_archive_title() {
$title = _x( 'Chats', 'post format archive title' ); $title = _x( 'Chats', 'post format archive title' );
} }
} elseif ( is_post_type_archive() ) { } elseif ( is_post_type_archive() ) {
/* translators: Post type archive title. 1: Post type name */
$title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) ); $title = sprintf( __( 'Archives: %s' ), post_type_archive_title( '', false ) );
} elseif ( is_tax() ) { } elseif ( is_tax() ) {
$tax = get_taxonomy( get_queried_object()->taxonomy ); $tax = get_taxonomy( get_queried_object()->taxonomy );
/* translators: 1: Taxonomy singular name, 2: Current taxonomy term */ /* translators: Taxonomy term archive title. 1: Taxonomy singular name, 2: Current taxonomy term */
$title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) ); $title = sprintf( __( '%1$s: %2$s' ), $tax->labels->singular_name, single_term_title( '', false ) );
} else { } else {
$title = __( 'Archives' ); $title = __( 'Archives' );
@ -2051,6 +2058,7 @@ function get_calendar( $initial = true, $echo = true ) {
if ( in_array( $day, $daywithpost ) ) { if ( in_array( $day, $daywithpost ) ) {
// any posts today? // any posts today?
$date_format = date( _x( 'F j, Y', 'daily archives date format' ), strtotime( "{$thisyear}-{$thismonth}-{$day}" ) ); $date_format = date( _x( 'F j, Y', 'daily archives date format' ), strtotime( "{$thisyear}-{$thismonth}-{$day}" ) );
/* translators: Post calendar label. 1: Date */
$label = sprintf( __( 'Posts published on %s' ), $date_format ); $label = sprintf( __( 'Posts published on %s' ), $date_format );
$calendar_output .= sprintf( $calendar_output .= sprintf(
'<a href="%s" aria-label="%s">%s</a>', '<a href="%s" aria-label="%s">%s</a>',

View File

@ -1430,8 +1430,9 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
switch ( $comment->comment_type ) { switch ( $comment->comment_type ) {
case 'trackback': case 'trackback':
/* translators: 1: Post title */
$notify_message = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n"; $notify_message = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n";
/* translators: 1: website name, 2: website IP, 3: website hostname */ /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
$notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
$notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n"; $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
@ -1440,8 +1441,9 @@ function wp_notify_postauthor( $comment_id, $deprecated = null ) {
$subject = sprintf( __('[%1$s] Trackback: "%2$s"'), $blogname, $post->post_title ); $subject = sprintf( __('[%1$s] Trackback: "%2$s"'), $blogname, $post->post_title );
break; break;
case 'pingback': case 'pingback':
/* translators: 1: Post title */
$notify_message = sprintf( __( 'New pingback on your post "%s"' ), $post->post_title ) . "\r\n"; $notify_message = sprintf( __( 'New pingback on your post "%s"' ), $post->post_title ) . "\r\n";
/* translators: 1: website name, 2: website IP, 3: website hostname */ /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
$notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
$notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n"; $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
@ -1588,40 +1590,55 @@ function wp_notify_moderator($comment_id) {
switch ( $comment->comment_type ) { switch ( $comment->comment_type ) {
case 'trackback': case 'trackback':
/* translators: 1: Post title */
$notify_message = sprintf( __('A new trackback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n"; $notify_message = sprintf( __('A new trackback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n"; $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
/* translators: 1: website name, 2: website IP, 3: website hostname */ /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
$notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
/* translators: 1: Trackback/pingback/comment author URL */
$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
$notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n"; $notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n";
break; break;
case 'pingback': case 'pingback':
/* translators: 1: Post title */
$notify_message = sprintf( __('A new pingback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n"; $notify_message = sprintf( __('A new pingback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n"; $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
/* translators: 1: website name, 2: website IP, 3: website hostname */ /* translators: 1: Trackback/pingback website name, 2: website IP, 3: website hostname */
$notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
/* translators: 1: Trackback/pingback/comment author URL */
$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
$notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n"; $notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment_content . "\r\n\r\n";
break; break;
default: // Comments default: // Comments
/* translators: 1: Post title */
$notify_message = sprintf( __('A new comment on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n"; $notify_message = sprintf( __('A new comment on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
$notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n"; $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
/* translators: 1: Comment author name, 2: comment author's IP, 3: comment author IP's hostname */
$notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
/* translators: 1: Comment author URL */
$notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n"; $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
/* translators: 1: Trackback/pingback/comment author URL */
$notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n"; $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
/* translators: 1: Comment text */
$notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n"; $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
break; break;
} }
/* translators: Comment moderation. 1: Comment action URL */
$notify_message .= sprintf( __( 'Approve it: %s' ), admin_url( "comment.php?action=approve&c={$comment_id}#wpbody-content" ) ) . "\r\n"; $notify_message .= sprintf( __( 'Approve it: %s' ), admin_url( "comment.php?action=approve&c={$comment_id}#wpbody-content" ) ) . "\r\n";
if ( EMPTY_TRASH_DAYS ) if ( EMPTY_TRASH_DAYS ) {
/* translators: Comment moderation. 1: Comment action URL */
$notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment_id}#wpbody-content" ) ) . "\r\n"; $notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment_id}#wpbody-content" ) ) . "\r\n";
else } else {
/* translators: Comment moderation. 1: Comment action URL */
$notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment_id}#wpbody-content" ) ) . "\r\n"; $notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment_id}#wpbody-content" ) ) . "\r\n";
}
/* translators: Comment moderation. 1: Comment action URL */
$notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment_id}#wpbody-content" ) ) . "\r\n"; $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment_id}#wpbody-content" ) ) . "\r\n";
/* translators: Comment moderation. 1: Number of comments awaiting approval */
$notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:', $notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:',
'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n"; 'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
$notify_message .= admin_url( "edit-comments.php?comment_status=moderated#wpbody-content" ) . "\r\n"; $notify_message .= admin_url( "edit-comments.php?comment_status=moderated#wpbody-content" ) . "\r\n";

View File

@ -2655,11 +2655,13 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
if ( $duplicate && $duplicate->term_id != $term_id ) { if ( $duplicate && $duplicate->term_id != $term_id ) {
// If an empty slug was passed or the parent changed, reset the slug to something unique. // If an empty slug was passed or the parent changed, reset the slug to something unique.
// Otherwise, bail. // Otherwise, bail.
if ( $empty_slug || ( $parent != $term['parent']) ) if ( $empty_slug || ( $parent != $term['parent']) ) {
$slug = wp_unique_term_slug($slug, (object) $args); $slug = wp_unique_term_slug($slug, (object) $args);
else } else {
/* translators: 1: Taxonomy term slug */
return new WP_Error('duplicate_term_slug', sprintf(__('The slug &#8220;%s&#8221; is already in use by another term'), $slug)); return new WP_Error('duplicate_term_slug', sprintf(__('The slug &#8220;%s&#8221; is already in use by another term'), $slug));
} }
}
$tt_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id) ); $tt_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT tt.term_taxonomy_id FROM $wpdb->term_taxonomy AS tt INNER JOIN $wpdb->terms AS t ON tt.term_id = t.term_id WHERE tt.taxonomy = %s AND t.term_id = %d", $taxonomy, $term_id) );

View File

@ -587,14 +587,21 @@ function wp_get_update_data() {
$counts['total'] = $counts['plugins'] + $counts['themes'] + $counts['wordpress'] + $counts['translations']; $counts['total'] = $counts['plugins'] + $counts['themes'] + $counts['wordpress'] + $counts['translations'];
$titles = array(); $titles = array();
if ( $counts['wordpress'] ) if ( $counts['wordpress'] ) {
/* translators: 1: Number of updates available to WordPress */
$titles['wordpress'] = sprintf( __( '%d WordPress Update'), $counts['wordpress'] ); $titles['wordpress'] = sprintf( __( '%d WordPress Update'), $counts['wordpress'] );
if ( $counts['plugins'] ) }
if ( $counts['plugins'] ) {
/* translators: 1: Number of updates available to plugins */
$titles['plugins'] = sprintf( _n( '%d Plugin Update', '%d Plugin Updates', $counts['plugins'] ), $counts['plugins'] ); $titles['plugins'] = sprintf( _n( '%d Plugin Update', '%d Plugin Updates', $counts['plugins'] ), $counts['plugins'] );
if ( $counts['themes'] ) }
if ( $counts['themes'] ) {
/* translators: 1: Number of updates available to themes */
$titles['themes'] = sprintf( _n( '%d Theme Update', '%d Theme Updates', $counts['themes'] ), $counts['themes'] ); $titles['themes'] = sprintf( _n( '%d Theme Update', '%d Theme Updates', $counts['themes'] ), $counts['themes'] );
if ( $counts['translations'] ) }
if ( $counts['translations'] ) {
$titles['translations'] = __( 'Translation Updates' ); $titles['translations'] = __( 'Translation Updates' );
}
$update_title = $titles ? esc_attr( implode( ', ', $titles ) ) : ''; $update_title = $titles ? esc_attr( implode( ', ', $titles ) ) : '';

View File

@ -1823,6 +1823,7 @@ All at ###SITENAME###
$pass_change_email = array( $pass_change_email = array(
'to' => $user['user_email'], 'to' => $user['user_email'],
/* translators: User password change notification email subject. 1: Site name */
'subject' => __( '[%s] Notice of Password Change' ), 'subject' => __( '[%s] Notice of Password Change' ),
'message' => $pass_change_text, 'message' => $pass_change_text,
'headers' => '', 'headers' => '',
@ -1878,6 +1879,7 @@ All at ###SITENAME###
$email_change_email = array( $email_change_email = array(
'to' => $user['user_email'], 'to' => $user['user_email'],
/* translators: User email change notification email subject. 1: Site name */
'subject' => __( '[%s] Notice of Email Change' ), 'subject' => __( '[%s] Notice of Email Change' ),
'message' => $email_change_text, 'message' => $email_change_text,
'headers' => '', 'headers' => '',

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-beta4-39325'; $wp_version = '4.7-beta4-39326';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -26,7 +26,10 @@ echo '<?xml version="1.0"?'.">\n";
?> ?>
<opml version="1.0"> <opml version="1.0">
<head> <head>
<title><?php printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) ); ?></title> <title><?php
/* translators: 1: Site name */
printf( __('Links for %s'), esc_attr(get_bloginfo('name', 'display')) );
?></title>
<dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated> <dateCreated><?php echo gmdate("D, d M Y H:i:s"); ?> GMT</dateCreated>
<?php <?php
/** /**

View File

@ -341,6 +341,7 @@ function retrieve_password() {
$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES); $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
} }
/* translators: Password reset email subject. 1: Site name */
$title = sprintf( __('[%s] Password Reset'), $blogname ); $title = sprintf( __('[%s] Password Reset'), $blogname );
/** /**

View File

@ -118,6 +118,7 @@ for ( $i = 1; $i <= $count; $i++ ) {
$author = trim($line); $author = trim($line);
$author = sanitize_email($author); $author = sanitize_email($author);
if ( is_email($author) ) { if ( is_email($author) ) {
/* translators: Post author email address */
echo '<p>' . sprintf(__('Author is %s'), $author) . '</p>'; echo '<p>' . sprintf(__('Author is %s'), $author) . '</p>';
$userdata = get_user_by('email', $author); $userdata = get_user_by('email', $author);
if ( ! empty( $userdata ) ) { if ( ! empty( $userdata ) ) {