I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.

Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.
Built from https://develop.svn.wordpress.org/trunk@42827


git-svn-id: http://core.svn.wordpress.org/trunk@42657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2018-03-11 16:44:34 +00:00
parent fab939595d
commit 4848a09b35
39 changed files with 211 additions and 129 deletions

View File

@ -35,18 +35,18 @@ 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 */ /* translators: Network admin screen title. %s: 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 */ /* translators: User dashboard screen title. %s: 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 */ /* translators: Admin screen title. %s: Admin screen name */
$admin_title = sprintf( __( '%1$s — WordPress' ), $title ); $admin_title = sprintf( __( '%s — WordPress' ), $title );
} else { } else {
/* translators: Admin screen title. 1: Admin screen name, 2: Network or site name */ /* 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 );

View File

@ -146,7 +146,7 @@ if ( $post_id ) {
$comments_count = wp_count_comments( $post_id ); $comments_count = wp_count_comments( $post_id );
$draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' ); $draft_or_post_title = wp_html_excerpt( _draft_or_post_title( $post_id ), 50, '…' );
if ( $comments_count->moderated > 0 ) { if ( $comments_count->moderated > 0 ) {
/* translators: 1: comments count 2: post title */ /* translators: 1: comments count, 2: post title */
$title = sprintf( $title = sprintf(
__( 'Comments (%1$s) on “%2$s”' ), __( 'Comments (%1$s) on “%2$s”' ),
number_format_i18n( $comments_count->moderated ), number_format_i18n( $comments_count->moderated ),

View File

@ -41,10 +41,10 @@ class Bulk_Upgrader_Skin extends WP_Upgrader_Skin {
$this->upgrader->strings['skin_upgrade_start'] = __( 'The update process is starting. This process may take a while on some hosts, so please be patient.' ); $this->upgrader->strings['skin_upgrade_start'] = __( 'The update process is starting. This process may take a while on some hosts, so please be patient.' );
/* translators: 1: Title of an update, 2: Error message */ /* translators: 1: Title of an update, 2: Error message */
$this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while updating %1$s: %2$s' ); $this->upgrader->strings['skin_update_failed_error'] = __( 'An error occurred while updating %1$s: %2$s' );
/* translators: 1: Title of an update */ /* translators: %s: Title of an update */
$this->upgrader->strings['skin_update_failed'] = __( 'The update of %1$s failed.' ); $this->upgrader->strings['skin_update_failed'] = __( 'The update of %s failed.' );
/* translators: 1: Title of an update */ /* translators: %s: Title of an update */
$this->upgrader->strings['skin_update_successful'] = __( '%1$s updated successfully.' ); $this->upgrader->strings['skin_update_successful'] = __( '%s updated successfully.' );
$this->upgrader->strings['skin_upgrade_end'] = __( 'All updates have been completed.' ); $this->upgrader->strings['skin_upgrade_end'] = __( 'All updates have been completed.' );
} }

View File

@ -337,7 +337,7 @@ class Language_Pack_Upgrader extends WP_Upgrader {
if ( ! $mo || ! $po ) { if ( ! $mo || ! $po ) {
return new WP_Error( return new WP_Error(
'incompatible_archive_pomo', $this->strings['incompatible_archive'], 'incompatible_archive_pomo', $this->strings['incompatible_archive'],
/* translators: 1: .po 2: .mo */ /* translators: 1: .po, 2: .mo */
sprintf( sprintf(
__( 'The language pack is missing either the %1$s or %2$s files.' ), __( 'The language pack is missing either the %1$s or %2$s files.' ),
'<code>.po</code>', '<code>.po</code>',

View File

@ -504,25 +504,43 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
switch ( $status['status'] ) { switch ( $status['status'] ) {
case 'install': case 'install':
if ( $status['url'] ) { if ( $status['url'] ) {
/* translators: 1: Plugin name and version. */ $action_links[] = sprintf(
$action_links[] = '<a class="install-now button" data-slug="' . esc_attr( $plugin['slug'] ) . '" href="' . esc_url( $status['url'] ) . '" aria-label="' . esc_attr( sprintf( __( 'Install %s now' ), $name ) ) . '" data-name="' . esc_attr( $name ) . '">' . __( 'Install Now' ) . '</a>'; '<a class="install-now button" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
esc_attr( $plugin['slug'] ),
esc_url( $status['url'] ),
/* translators: %s: plugin name and version */
esc_attr( sprintf( __( 'Install %s now' ), $name ) ),
esc_attr( $name ),
__( 'Install Now' )
);
} }
break; break;
case 'update_available': case 'update_available':
if ( $status['url'] ) { if ( $status['url'] ) {
/* translators: 1: Plugin name and version */ $action_links[] = sprintf(
$action_links[] = '<a class="update-now button aria-button-if-js" data-plugin="' . esc_attr( $status['file'] ) . '" data-slug="' . esc_attr( $plugin['slug'] ) . '" href="' . esc_url( $status['url'] ) . '" aria-label="' . esc_attr( sprintf( __( 'Update %s now' ), $name ) ) . '" data-name="' . esc_attr( $name ) . '">' . __( 'Update Now' ) . '</a>'; '<a class="update-now button aria-button-if-js" data-plugin="%s" data-slug="%s" href="%s" aria-label="%s" data-name="%s">%s</a>',
esc_attr( $status['file'] ),
esc_attr( $plugin['slug'] ),
esc_url( $status['url'] ),
/* translators: %s: plugin name and version */
esc_attr( sprintf( __( 'Update %s now' ), $name ) ),
esc_attr( $name ),
__( 'Update Now' )
);
} }
break; break;
case 'latest_installed': case 'latest_installed':
case 'newer_installed': case 'newer_installed':
if ( is_plugin_active( $status['file'] ) ) { if ( is_plugin_active( $status['file'] ) ) {
$action_links[] = '<button type="button" class="button button-disabled" disabled="disabled">' . _x( 'Active', 'plugin' ) . '</button>'; $action_links[] = sprintf(
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
_x( 'Active', 'plugin' )
);
} elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) { } elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) {
$button_text = __( 'Activate' ); $button_text = __( 'Activate' );
/* translators: %s: Plugin name */ /* translators: %s: plugin name */
$button_label = _x( 'Activate %s', 'plugin' ); $button_label = _x( 'Activate %s', 'plugin' );
$activate_url = add_query_arg( $activate_url = add_query_arg(
array( array(
@ -534,7 +552,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
if ( is_network_admin() ) { if ( is_network_admin() ) {
$button_text = __( 'Network Activate' ); $button_text = __( 'Network Activate' );
/* translators: %s: Plugin name */ /* translators: %s: plugin name */
$button_label = _x( 'Network Activate %s', 'plugin' ); $button_label = _x( 'Network Activate %s', 'plugin' );
$activate_url = add_query_arg( array( 'networkwide' => 1 ), $activate_url ); $activate_url = add_query_arg( array( 'networkwide' => 1 ), $activate_url );
} }
@ -546,7 +564,10 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
$button_text $button_text
); );
} else { } else {
$action_links[] = '<button type="button" class="button button-disabled" disabled="disabled">' . _x( 'Installed', 'plugin' ) . '</button>'; $action_links[] = sprintf(
'<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
_x( 'Installed', 'plugin' )
);
} }
break; break;
} }
@ -557,8 +578,14 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
'&amp;TB_iframe=true&amp;width=600&amp;height=550' '&amp;TB_iframe=true&amp;width=600&amp;height=550'
); );
/* translators: 1: Plugin name and version. */ $action_links[] = sprintf(
$action_links[] = '<a href="' . esc_url( $details_link ) . '" class="thickbox open-plugin-details-modal" aria-label="' . esc_attr( sprintf( __( 'More information about %s' ), $name ) ) . '" data-title="' . esc_attr( $name ) . '">' . __( 'More Details' ) . '</a>'; '<a href="%s" class="thickbox open-plugin-details-modal" aria-label="%s" data-title="%s">%s</a>',
esc_url( $details_link ),
/* translators: %s: plugin name and version */
esc_attr( sprintf( __( 'More information about %s' ), $name ) ),
esc_attr( $name ),
__( 'More Details' )
);
if ( ! empty( $plugin['icons']['svg'] ) ) { if ( ! empty( $plugin['icons']['svg'] ) ) {
$plugin_icon_url = $plugin['icons']['svg']; $plugin_icon_url = $plugin['icons']['svg'];

View File

@ -264,6 +264,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
$name = wp_kses( $theme->name, $themes_allowedtags ); $name = wp_kses( $theme->name, $themes_allowedtags );
$author = wp_kses( $theme->author, $themes_allowedtags ); $author = wp_kses( $theme->author, $themes_allowedtags );
/* translators: %s: theme name */
$preview_title = sprintf( __( 'Preview &#8220;%s&#8221;' ), $name ); $preview_title = sprintf( __( 'Preview &#8220;%s&#8221;' ), $name );
$preview_url = add_query_arg( $preview_url = add_query_arg(
array( array(
@ -292,19 +293,41 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
switch ( $status ) { switch ( $status ) {
case 'update_available': case 'update_available':
$actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>'; $actions[] = sprintf(
'<a class="install-now" href="%s" title="%s">%s</a>',
esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ),
/* translators: %s: theme version */
esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ),
__( 'Update' )
);
break; break;
case 'newer_installed': case 'newer_installed':
case 'latest_installed': case 'latest_installed':
$actions[] = '<span class="install-now" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>'; $actions[] = sprintf(
'<span class="install-now" title="%s">%s</span>',
esc_attr__( 'This theme is already installed and is up to date' ),
_x( 'Installed', 'theme' )
);
break; break;
case 'install': case 'install':
default: default:
$actions[] = '<a class="install-now" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Install %s' ), $name ) ) . '">' . __( 'Install Now' ) . '</a>'; $actions[] = sprintf(
'<a class="install-now" href="%s" title="%s">%s</a>',
esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ),
/* translators: %s: theme name */
esc_attr( sprintf( __( 'Install %s' ), $name ) ),
__( 'Install Now' )
);
break; break;
} }
$actions[] = '<a class="install-theme-preview" href="' . esc_url( $preview_url ) . '" title="' . esc_attr( sprintf( __( 'Preview %s' ), $name ) ) . '">' . __( 'Preview' ) . '</a>'; $actions[] = sprintf(
'<a class="install-theme-preview" href="%s" title="%s">%s</a>',
esc_url( $preview_url ),
/* translators: %s: theme name */
esc_attr( sprintf( __( 'Preview %s' ), $name ) ),
__( 'Preview' )
);
/** /**
* Filters the install action links for a theme in the Install Themes list table. * Filters the install action links for a theme in the Install Themes list table.
@ -323,7 +346,10 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
</a> </a>
<h3><?php echo $name; ?></h3> <h3><?php echo $name; ?></h3>
<div class="theme-author"><?php printf( __( 'By %s' ), $author ); ?></div> <div class="theme-author"><?php
/* translators: %s: theme author */
printf( __( 'By %s' ), $author );
?></div>
<div class="action-links"> <div class="action-links">
<ul> <ul>
@ -421,20 +447,37 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table {
<?php <?php
switch ( $status ) { switch ( $status ) {
case 'update_available': case 'update_available':
echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ) . '" title="' . esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ) . '">' . __( 'Update' ) . '</a>'; printf(
'<a class="theme-install button button-primary" href="%s" title="%s">%s</a>',
esc_url( wp_nonce_url( $update_url, 'upgrade-theme_' . $theme->slug ) ),
/* translators: %s: theme version */
esc_attr( sprintf( __( 'Update to version %s' ), $theme->version ) ),
__( 'Update' )
);
break; break;
case 'newer_installed': case 'newer_installed':
case 'latest_installed': case 'latest_installed':
echo '<span class="theme-install" title="' . esc_attr__( 'This theme is already installed and is up to date' ) . '">' . _x( 'Installed', 'theme' ) . '</span>'; printf(
'<span class="theme-install" title="%s">%s</span>',
esc_attr__( 'This theme is already installed and is up to date' ),
_x( 'Installed', 'theme' )
);
break; break;
case 'install': case 'install':
default: default:
echo '<a class="theme-install button button-primary" href="' . esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ) . '">' . __( 'Install' ) . '</a>'; printf(
'<a class="theme-install button button-primary" href="%s">%s</a>',
esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ),
__( 'Install' )
);
break; break;
} }
?> ?>
<h3 class="theme-name"><?php echo $name; ?></h3> <h3 class="theme-name"><?php echo $name; ?></h3>
<span class="theme-by"><?php printf( __( 'By %s' ), $author ); ?></span> <span class="theme-by"><?php
/* translators: %s: theme author */
printf( __( 'By %s' ), $author );
?></span>
<?php if ( isset( $theme->screenshot_url ) ) : ?> <?php if ( isset( $theme->screenshot_url ) ) : ?>
<img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="" /> <img class="theme-screenshot" src="<?php echo esc_url( $theme->screenshot_url ); ?>" alt="" />
<?php endif; ?> <?php endif; ?>

View File

@ -348,7 +348,7 @@ function media_handle_upload( $file_id, $post_id, $post_data = array(), $overrid
} }
if ( ! empty( $meta['year'] ) ) { if ( ! empty( $meta['year'] ) ) {
/* translators: Audio file track information. 1: Year of audio track release */ /* translators: Audio file track information. %d: Year of audio track release */
$content .= ' ' . sprintf( __( 'Released: %d.' ), $meta['year'] ); $content .= ' ' . sprintf( __( 'Released: %d.' ), $meta['year'] );
} }
@ -358,13 +358,13 @@ function media_handle_upload( $file_id, $post_id, $post_data = array(), $overrid
/* translators: Audio file track information. 1: Audio track number, 2: Total audio tracks */ /* 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 */ /* translators: Audio file track information. %s: Audio track number */
$content .= ' ' . sprintf( __( 'Track %1$s.' ), number_format_i18n( $track_number[0] ) ); $content .= ' ' . sprintf( __( 'Track %s.' ), number_format_i18n( $track_number[0] ) );
} }
} }
if ( ! empty( $meta['genre'] ) ) { if ( ! empty( $meta['genre'] ) ) {
/* translators: Audio file genre information. 1: Audio genre name */ /* translators: Audio file genre information. %s: Audio genre name */
$content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] ); $content .= ' ' . sprintf( __( 'Genre: %s.' ), $meta['genre'] );
} }

View File

@ -198,19 +198,19 @@ if ( 'publish' == $post->post_status || 'private' == $post->post_status || $can_
$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 */ /* translators: Post date information. %s: Date on which the post is currently scheduled to be published */
$stamp = __( 'Scheduled for: <b>%1$s</b>' ); $stamp = __( 'Scheduled for: <b>%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 */ /* translators: Post date information. %s: Date on which the post was published */
$stamp = __( 'Published on: <b>%1$s</b>' ); $stamp = __( 'Published on: <b>%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 */ /* translators: Post date information. %s: Date on which the post is to be published */
$stamp = __( 'Schedule for: <b>%1$s</b>' ); $stamp = __( 'Schedule for: <b>%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 */ /* translators: Post date information. %s: Date on which the post is to be published */
$stamp = __( 'Publish on: <b>%1$s</b>' ); $stamp = __( 'Publish on: <b>%s</b>' );
} }
$date = date_i18n( $datef, strtotime( $post->post_date ) ); $date = date_i18n( $datef, strtotime( $post->post_date ) );
} else { // draft (no saves, and thus no date specified) } else { // draft (no saves, and thus no date specified)
@ -222,7 +222,7 @@ if ( ! empty( $args['args']['revisions_count'] ) ) :
?> ?>
<div class="misc-pub-section misc-pub-revisions"> <div class="misc-pub-section misc-pub-revisions">
<?php <?php
/* translators: Post revisions heading. 1: The number of available revisions */ /* translators: Post revisions heading. %s: The number of available revisions */
printf( __( 'Revisions: %s' ), '<b>' . number_format_i18n( $args['args']['revisions_count'] ) . '</b>' ); 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>

View File

@ -32,13 +32,13 @@ 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 */ /* translators: %s: 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. %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 */ /* translators: %s: 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 %s KB in size.' ), get_site_option( 'fileupload_maxk', 1500 ) );
} }
if ( upload_is_user_over_quota( false ) ) { if ( upload_is_user_over_quota( false ) ) {

View File

@ -264,7 +264,7 @@ function network_step1( $errors = false ) {
<p> <p>
<?php <?php
printf( printf(
/* translators: 1: site url 2: host name 3. www */ /* translators: 1: site url, 2: host name, 3: www */
__( 'We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.' ), __( 'We recommend you change your siteurl to %1$s before enabling the network feature. It will still be possible to visit your site using the %3$s prefix with an address like %2$s but any links will not have the %3$s prefix.' ),
'<code>' . substr( $hostname, 4 ) . '</code>', '<code>' . substr( $hostname, 4 ) . '</code>',
'<code>' . $hostname . '</code>', '<code>' . $hostname . '</code>',
@ -296,7 +296,7 @@ function network_step1( $errors = false ) {
<td> <td>
<?php <?php
printf( printf(
/* translators: 1: localhost 2: localhost.localdomain */ /* translators: 1: localhost, 2: localhost.localdomain */
__( 'Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.' ), __( 'Because you are using %1$s, the sites in your WordPress network must use sub-directories. Consider using %2$s if you wish to use sub-domains.' ),
'<code>localhost</code>', '<code>localhost</code>',
'<code>localhost.localdomain</code>' '<code>localhost.localdomain</code>'
@ -436,7 +436,7 @@ function network_step2( $errors = false ) {
if ( file_exists( $home_path . '.htaccess' ) ) { if ( file_exists( $home_path . '.htaccess' ) ) {
echo '<strong>' . __( 'Caution:' ) . '</strong> '; echo '<strong>' . __( 'Caution:' ) . '</strong> ';
printf( printf(
/* translators: 1: wp-config.php 2: .htaccess */ /* translators: 1: wp-config.php, 2: .htaccess */
__( 'We recommend you back up your existing %1$s and %2$s files.' ), __( 'We recommend you back up your existing %1$s and %2$s files.' ),
'<code>wp-config.php</code>', '<code>wp-config.php</code>',
'<code>.htaccess</code>' '<code>.htaccess</code>'
@ -444,7 +444,7 @@ function network_step2( $errors = false ) {
} elseif ( file_exists( $home_path . 'web.config' ) ) { } elseif ( file_exists( $home_path . 'web.config' ) ) {
echo '<strong>' . __( 'Caution:' ) . '</strong> '; echo '<strong>' . __( 'Caution:' ) . '</strong> ';
printf( printf(
/* translators: 1: wp-config.php 2: web.config */ /* translators: 1: wp-config.php, 2: web.config */
__( 'We recommend you back up your existing %1$s and %2$s files.' ), __( 'We recommend you back up your existing %1$s and %2$s files.' ),
'<code>wp-config.php</code>', '<code>wp-config.php</code>',
'<code>web.config</code>' '<code>web.config</code>'
@ -452,7 +452,7 @@ function network_step2( $errors = false ) {
} else { } else {
echo '<strong>' . __( 'Caution:' ) . '</strong> '; echo '<strong>' . __( 'Caution:' ) . '</strong> ';
printf( printf(
/* translators: 1: wp-config.php */ /* translators: %s: wp-config.php */
__( 'We recommend you back up your existing %s file.' ), __( 'We recommend you back up your existing %s file.' ),
'<code>wp-config.php</code>' '<code>wp-config.php</code>'
); );
@ -466,7 +466,7 @@ function network_step2( $errors = false ) {
<li><p> <li><p>
<?php <?php
printf( printf(
/* translators: 1: wp-config.php 2: location of wp-config file, 3: translated version of "That's all, stop editing! Happy blogging." */ /* translators: 1: wp-config.php, 2: location of wp-config file, 3: translated version of "That's all, stop editing! Happy blogging." */
__( 'Add the following to your %1$s file in %2$s <strong>above</strong> the line reading %3$s:' ), __( 'Add the following to your %1$s file in %2$s <strong>above</strong> the line reading %3$s:' ),
'<code>wp-config.php</code>', '<code>wp-config.php</code>',
'<code>' . $location_of_wp_config . '</code>', '<code>' . $location_of_wp_config . '</code>',
@ -523,13 +523,13 @@ if ( ! empty( $keys_salts ) ) {
<?php <?php
if ( 1 == $num_keys_salts ) { if ( 1 == $num_keys_salts ) {
printf( printf(
/* translators: 1: wp-config.php */ /* translators: %s: wp-config.php */
__( 'This unique authentication key is also missing from your %s file.' ), __( 'This unique authentication key is also missing from your %s file.' ),
'<code>wp-config.php</code>' '<code>wp-config.php</code>'
); );
} else { } else {
printf( printf(
/* translators: 1: wp-config.php */ /* translators: %s: wp-config.php */
__( 'These unique authentication keys are also missing from your %s file.' ), __( 'These unique authentication keys are also missing from your %s file.' ),
'<code>wp-config.php</code>' '<code>wp-config.php</code>'
); );
@ -598,7 +598,7 @@ if ( iis7_supports_permalinks() ) :
echo '<li><p>'; echo '<li><p>';
printf( printf(
/* translators: 1: a filename like .htaccess. 2: a file path. */ /* translators: 1: a filename like .htaccess, 2: a file path */
__( 'Add the following to your %1$s file in %2$s, <strong>replacing</strong> other WordPress rules:' ), __( 'Add the following to your %1$s file in %2$s, <strong>replacing</strong> other WordPress rules:' ),
'<code>web.config</code>', '<code>web.config</code>',
'<code>' . $home_path . '</code>' '<code>' . $home_path . '</code>'
@ -640,7 +640,7 @@ EOF;
echo '<li><p>'; echo '<li><p>';
printf( printf(
/* translators: 1: a filename like .htaccess. 2: a file path. */ /* translators: 1: a filename like .htaccess, 2: a file path */
__( 'Add the following to your %1$s file in %2$s, <strong>replacing</strong> other WordPress rules:' ), __( 'Add the following to your %1$s file in %2$s, <strong>replacing</strong> other WordPress rules:' ),
'<code>.htaccess</code>', '<code>.htaccess</code>',
'<code>' . $home_path . '</code>' '<code>' . $home_path . '</code>'

View File

@ -2202,7 +2202,7 @@ function convert_to_screen( $hook_name ) {
_doing_it_wrong( _doing_it_wrong(
'convert_to_screen(), add_meta_box()', 'convert_to_screen(), add_meta_box()',
sprintf( sprintf(
/* translators: 1: wp-admin/includes/template.php 2: add_meta_box() 3: add_meta_boxes */ /* translators: 1: wp-admin/includes/template.php, 2: add_meta_box(), 3: add_meta_boxes */
__( 'Likely direct inclusion of %1$s in order to use %2$s. This is very wrong. Hook the %2$s call into the %3$s action instead.' ), __( 'Likely direct inclusion of %1$s in order to use %2$s. This is very wrong. Hook the %2$s call into the %3$s action instead.' ),
'<code>wp-admin/includes/template.php</code>', '<code>wp-admin/includes/template.php</code>',
'<code>add_meta_box()</code>', '<code>add_meta_box()</code>',
@ -2285,11 +2285,11 @@ function wp_star_rating( $args = array() ) {
$empty_stars = 5 - $full_stars - $half_stars; $empty_stars = 5 - $full_stars - $half_stars;
if ( $r['number'] ) { if ( $r['number'] ) {
/* translators: 1: The rating, 2: The number of ratings */ /* translators: 1: the rating, 2: the number of ratings */
$format = _n( '%1$s rating based on %2$s rating', '%1$s rating based on %2$s ratings', $r['number'] ); $format = _n( '%1$s rating based on %2$s rating', '%1$s rating based on %2$s ratings', $r['number'] );
$title = sprintf( $format, number_format_i18n( $rating, 1 ), number_format_i18n( $r['number'] ) ); $title = sprintf( $format, number_format_i18n( $rating, 1 ), number_format_i18n( $r['number'] ) );
} else { } else {
/* translators: 1: The rating */ /* translators: %s: the rating */
$title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) ); $title = sprintf( __( '%s rating' ), number_format_i18n( $rating, 1 ) );
} }

View File

@ -556,7 +556,7 @@ function use_ssl_preference( $user ) {
function admin_created_user_email( $text ) { function admin_created_user_email( $text ) {
$roles = get_editable_roles(); $roles = get_editable_roles();
$role = $roles[ $_REQUEST['role'] ]; $role = $roles[ $_REQUEST['role'] ];
/* translators: 1: Site name, 2: site URL, 3: role */ /* translators: 1: site name, 2: site URL, 3: role */
return sprintf( return sprintf(
__( __(
'Hi, 'Hi,

View File

@ -65,7 +65,7 @@ if ( ! defined( 'WP_ALLOW_REPAIR' ) || ! WP_ALLOW_REPAIR ) {
echo '<h2 class="screen-reader-text">' . __( 'Check secret keys' ) . '</h2>'; echo '<h2 class="screen-reader-text">' . __( 'Check secret keys' ) . '</h2>';
// Translators: 1: wp-config.php; 2: Secret key service URL. /* translators: 1: wp-config.php, 2: secret key service URL */
echo '<p>' . sprintf( __( 'While you are editing your %1$s file, take a moment to make sure you have all 8 keys and that they are unique. You can generate these using the <a href="%2$s">WordPress.org secret key service</a>.' ), '<code>wp-config.php</code>', 'https://api.wordpress.org/secret-key/1.1/salt/' ) . '</p>'; echo '<p>' . sprintf( __( 'While you are editing your %1$s file, take a moment to make sure you have all 8 keys and that they are unique. You can generate these using the <a href="%2$s">WordPress.org secret key service</a>.' ), '<code>wp-config.php</code>', 'https://api.wordpress.org/secret-key/1.1/salt/' ) . '</p>';
} }
} elseif ( isset( $_GET['repair'] ) ) { } elseif ( isset( $_GET['repair'] ) ) {

View File

@ -207,7 +207,7 @@ if ( isset( $_GET['updated'] ) ) {
<?php <?php
if ( is_subdomain_install() ) { if ( is_subdomain_install() ) {
echo '<p class="description">'; echo '<p class="description">';
/* translators: 1: NOBLOGREDIRECT 2: wp-config.php */ /* translators: 1: NOBLOGREDIRECT, 2: wp-config.php */
printf( printf(
__( 'If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.' ), __( 'If registration is disabled, please set %1$s in %2$s to a URL you will redirect visitors to if they visit a non-existent site.' ),
'<code>NOBLOGREDIRECT</code>', '<code>NOBLOGREDIRECT</code>',

View File

@ -463,7 +463,7 @@ if ( ! empty( $invalid ) ) {
foreach ( $invalid as $plugin_file => $error ) { foreach ( $invalid as $plugin_file => $error ) {
echo '<div id="message" class="error"><p>'; echo '<div id="message" class="error"><p>';
printf( printf(
/* translators: 1: plugin file 2: error message */ /* translators: 1: plugin file, 2: error message */
__( 'The plugin %1$s has been <strong>deactivated</strong> due to an error: %2$s' ), __( 'The plugin %1$s has been <strong>deactivated</strong> due to an error: %2$s' ),
'<code>' . esc_html( $plugin_file ) . '</code>', '<code>' . esc_html( $plugin_file ) . '</code>',
$error->get_error_message() $error->get_error_message()

View File

@ -88,8 +88,8 @@ switch ( $action ) {
$post_edit_link = get_edit_post_link(); $post_edit_link = get_edit_post_link();
$post_title = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>'; $post_title = '<a href="' . $post_edit_link . '">' . _draft_or_post_title() . '</a>';
/* translators: 1: Post title */ /* translators: %s: post title */
$h1 = sprintf( __( 'Compare Revisions of &#8220;%1$s&#8221;' ), $post_title ); $h1 = sprintf( __( 'Compare Revisions of &#8220;%s&#8221;' ), $post_title );
$return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Return to editor' ) . '</a>'; $return_to_post = '<a href="' . $post_edit_link . '">' . __( '&larr; Return to editor' ) . '</a>';
$title = __( 'Revisions' ); $title = __( 'Revisions' );

View File

@ -59,7 +59,7 @@ if ( file_exists( ABSPATH . 'wp-config-sample.php' ) ) {
if ( file_exists( ABSPATH . 'wp-config.php' ) ) { if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
wp_die( wp_die(
'<p>' . sprintf( '<p>' . sprintf(
/* translators: 1: wp-config.php 2: install.php */ /* translators: 1: wp-config.php, 2: install.php */
__( 'The file %1$s already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href="%2$s">installing now</a>.' ), __( 'The file %1$s already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href="%2$s">installing now</a>.' ),
'<code>wp-config.php</code>', '<code>wp-config.php</code>',
'install.php' 'install.php'
@ -71,7 +71,7 @@ if ( file_exists( ABSPATH . 'wp-config.php' ) ) {
if ( @file_exists( ABSPATH . '../wp-config.php' ) && ! @file_exists( ABSPATH . '../wp-settings.php' ) ) { if ( @file_exists( ABSPATH . '../wp-config.php' ) && ! @file_exists( ABSPATH . '../wp-settings.php' ) ) {
wp_die( wp_die(
'<p>' . sprintf( '<p>' . sprintf(
/* translators: 1: wp-config.php 2: install.php */ /* translators: 1: wp-config.php, 2: install.php */
__( 'The file %1$s already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href="%2$s">installing now</a>.' ), __( 'The file %1$s already exists one level above your WordPress installation. If you need to reset any of the configuration items in this file, please delete it first. You may try <a href="%2$s">installing now</a>.' ),
'<code>wp-config.php</code>', '<code>wp-config.php</code>',
'install.php' 'install.php'

View File

@ -675,7 +675,7 @@ if ( IS_PROFILE_PAGE && count( $sessions->get_all() ) === 1 ) :
<p><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p> <p><button type="button" class="button" id="destroy-sessions"><?php _e( 'Log Out Everywhere' ); ?></button></p>
<p class="description"> <p class="description">
<?php <?php
/* translators: 1: User's display name. */ /* translators: %s: user's display name */
printf( __( 'Log %s out of all locations.' ), $profileuser->display_name ); printf( __( 'Log %s out of all locations.' ), $profileuser->display_name );
?> ?>
</p> </p>

View File

@ -947,7 +947,7 @@ final class WP_Customize_Nav_Menus {
} }
$data = array( $data = array(
/* translators: %1$s is the post type name and %2$s is the error message. */ /* translators: 1: post type name, 2: error message */
'message' => sprintf( __( '%1$s could not be created: %2$s' ), $singular_name, $error->get_error_message() ), 'message' => sprintf( __( '%1$s could not be created: %2$s' ), $singular_name, $error->get_error_message() ),
); );
wp_send_json_error( $data ); wp_send_json_error( $data );
@ -981,7 +981,7 @@ final class WP_Customize_Nav_Menus {
<button type="button" class="button-link item-add"> <button type="button" class="button-link item-add">
<span class="screen-reader-text"> <span class="screen-reader-text">
<?php <?php
/* translators: 1: Title of a menu item, 2: Type of a menu item */ /* translators: 1: title of a menu item, 2: type of a menu item */
printf( __( 'Add to menu: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.type_label }}' ); printf( __( 'Add to menu: %1$s (%2$s)' ), '{{ data.title || wp.customize.Menus.data.l10n.untitled }}', '{{ data.type_label }}' );
?> ?>
</span> </span>

View File

@ -190,7 +190,7 @@ class WP_Http_Curl {
if ( ! $this->stream_handle ) { if ( ! $this->stream_handle ) {
return new WP_Error( return new WP_Error(
'http_request_failed', sprintf( 'http_request_failed', sprintf(
/* translators: 1: fopen() 2: file name */ /* translators: 1: fopen(), 2: file name */
__( 'Could not open handle for %1$s to %2$s.' ), __( 'Could not open handle for %1$s to %2$s.' ),
'fopen()', 'fopen()',
$r['filename'] $r['filename']

View File

@ -250,7 +250,7 @@ class WP_Http_Streams {
if ( ! $stream_handle ) { if ( ! $stream_handle ) {
return new WP_Error( return new WP_Error(
'http_request_failed', sprintf( 'http_request_failed', sprintf(
/* translators: 1: fopen() 2: file name */ /* translators: 1: fopen(), 2: file name */
__( 'Could not open handle for %1$s to %2$s.' ), __( 'Could not open handle for %1$s to %2$s.' ),
'fopen()', 'fopen()',
$r['filename'] $r['filename']

View File

@ -1540,7 +1540,7 @@ function comments_popup_link( $zero = false, $one = false, $more = false, $css_c
} }
if ( false === $more ) { if ( false === $more ) {
/* translators: 1: Number of comments 2: post title */ /* translators: 1: number of comments, 2: post title */
$more = _n( '%1$s Comment<span class="screen-reader-text"> on %2$s</span>', '%1$s Comments<span class="screen-reader-text"> on %2$s</span>', $number ); $more = _n( '%1$s Comment<span class="screen-reader-text"> on %2$s</span>', '%1$s Comments<span class="screen-reader-text"> on %2$s</span>', $number );
$more = sprintf( $more, number_format_i18n( $number ), $title ); $more = sprintf( $more, number_format_i18n( $number ), $title );
} }
@ -1629,7 +1629,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 */ /* translators: Comment reply button text. %s: 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,7 @@ class WP_Customize_Nav_Menu_Item_Control extends WP_Customize_Control {
<# 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 <?php
/* translators: Nav menu item original title. 1: Original title */ /* translators: Nav menu item original title. %s: Original title */
printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' ); printf( __( 'Original: %s' ), '<a class="original-link" href="{{ data.url }}">{{ data.original_title }}</a>' );
?> ?>
</p> </p>

View File

@ -30,13 +30,13 @@ do_action( 'rss_tag_pre', 'atom-comments' );
<title type="text"> <title type="text">
<?php <?php
if ( is_singular() ) { if ( is_singular() ) {
/* translators: Comments feed title. 1: Post title */ /* translators: Comments feed title. %s: Post title */
printf( ent2ncr( __( 'Comments on %s' ) ), get_the_title_rss() ); printf( ent2ncr( __( 'Comments on %s' ) ), get_the_title_rss() );
} elseif ( is_search() ) { } elseif ( is_search() ) {
/* translators: Comments feed title. 1: Site name, 2: Search query */ /* translators: Comments feed title. 1: Site name, 2: Search query */
printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() ); printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
} else { } else {
/* translators: Comments feed title. 1: Site name */ /* translators: Comments feed title. %s: Site name */
printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() ); printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() );
} }
?> ?>
@ -87,7 +87,7 @@ if ( have_comments() ) :
/* translators: Individual comment title. 1: Post title, 2: Comment author name */ /* translators: Individual comment title. 1: Post title, 2: Comment author name */
printf( ent2ncr( __( 'Comment on %1$s by %2$s' ) ), $title, get_comment_author_rss() ); printf( ent2ncr( __( 'Comment on %1$s by %2$s' ) ), $title, get_comment_author_rss() );
} else { } else {
/* translators: Comment author title. 1: Comment author name */ /* translators: Comment author title. %s: Comment author name */
printf( ent2ncr( __( 'By: %s' ) ), get_comment_author_rss() ); printf( ent2ncr( __( 'By: %s' ) ), get_comment_author_rss() );
} }
?> ?>

View File

@ -35,13 +35,13 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
<title> <title>
<?php <?php
if ( is_singular() ) { if ( is_singular() ) {
/* translators: Comments feed title. 1: Post title */ /* translators: Comments feed title. %s: Post title */
printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() ); printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() );
} elseif ( is_search() ) { } elseif ( is_search() ) {
/* translators: Comments feed title. 1: Site name, 2: Search query */ /* translators: Comments feed title. 1: Site name, 2: Search query */
printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() ); printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
} else { } else {
/* translators: Comments feed title. 1: Site name */ /* translators: Comments feed title. %s: Site name */
printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() ); printf( ent2ncr( __( 'Comments for %s' ) ), get_wp_title_rss() );
} }
?> ?>
@ -90,7 +90,7 @@ do_action( 'rss_tag_pre', 'rss2-comments' );
/* translators: Individual comment title. 1: Post title, 2: Comment author name */ /* translators: Individual comment title. 1: Post title, 2: Comment author name */
printf( ent2ncr( __( 'Comment on %1$s by %2$s' ) ), $title, get_comment_author_rss() ); printf( ent2ncr( __( 'Comment on %1$s by %2$s' ) ), $title, get_comment_author_rss() );
} else { } else {
/* translators: Comment author title. 1: Comment author name */ /* translators: Comment author title. %s: Comment author name */
printf( ent2ncr( __( 'By: %s' ) ), get_comment_author_rss() ); printf( ent2ncr( __( 'By: %s' ) ), get_comment_author_rss() );
} }
?> ?>

View File

@ -3558,42 +3558,42 @@ function human_time_diff( $from, $to = '' ) {
if ( $mins <= 1 ) { if ( $mins <= 1 ) {
$mins = 1; $mins = 1;
} }
/* translators: Time difference between two dates, in minutes (min=minute). 1: Number of minutes */ /* translators: Time difference between two dates, in minutes (min=minute). %s: 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 */ /* translators: Time difference between two dates, in hours. %s: 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 */ /* translators: Time difference between two dates, in days. %s: 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 */ /* translators: Time difference between two dates, in weeks. %s: 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 */ /* translators: Time difference between two dates, in months. %s: 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 */ /* translators: Time difference between two dates, in years. %s: Number of years */
$since = sprintf( _n( '%s year', '%s years', $years ), $years ); $since = sprintf( _n( '%s year', '%s years', $years ), $years );
} }

View File

@ -1490,22 +1490,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 */ /* translators: Category archive title. %s: 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 */ /* translators: Tag archive title. %s: 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 */ /* translators: Author archive title. %s: 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 */ /* translators: Yearly archive title. %s: 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 */ /* translators: Monthly archive title. %s: 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 */ /* translators: Daily archive title. %s: 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' ) ) {
@ -1528,7 +1528,7 @@ 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 */ /* translators: Post type archive title. %s: 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 );
@ -2140,7 +2140,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 */ /* translators: Post calendar label. %s: 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

@ -487,7 +487,7 @@ function wp_set_wpdb_vars() {
if ( is_wp_error( $prefix ) ) { if ( is_wp_error( $prefix ) ) {
wp_load_translations_early(); wp_load_translations_early();
wp_die( wp_die(
/* translators: 1: $table_prefix 2: wp-config.php */ /* translators: 1: $table_prefix, 2: wp-config.php */
sprintf( sprintf(
__( '<strong>ERROR</strong>: %1$s in %2$s can only contain numbers, letters, and underscores.' ), __( '<strong>ERROR</strong>: %1$s in %2$s can only contain numbers, letters, and underscores.' ),
'<code>$table_prefix</code>', '<code>$table_prefix</code>',

View File

@ -2161,7 +2161,8 @@ function upload_is_file_too_big( $upload ) {
} }
if ( strlen( $upload['bits'] ) > ( KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 ) ) ) { if ( strlen( $upload['bits'] ) > ( KB_IN_BYTES * get_site_option( 'fileupload_maxk', 1500 ) ) ) {
return sprintf( __( 'This file is too big. Files must be less than %d KB in size.' ) . '<br />', get_site_option( 'fileupload_maxk', 1500 ) ); /* translators: %s: maximum allowed file size in kilobytes */
return sprintf( __( 'This file is too big. Files must be less than %s KB in size.' ) . '<br />', get_site_option( 'fileupload_maxk', 1500 ) );
} }
return $upload; return $upload;

View File

@ -1523,33 +1523,41 @@ if ( ! function_exists( 'wp_notify_postauthor' ) ) :
switch ( $comment->comment_type ) { switch ( $comment->comment_type ) {
case 'trackback': case 'trackback':
/* translators: 1: Post title */ /* translators: %s: 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: Trackback/pingback website name, 2: website IP address, 3: website hostname */ /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
$notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
/* translators: %s: 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: %s: 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";
$notify_message .= __( 'You can see all trackbacks on this post here:' ) . "\r\n"; $notify_message .= __( 'You can see all trackbacks on this post here:' ) . "\r\n";
/* translators: 1: blog name, 2: post title */ /* translators: 1: blog name, 2: post title */
$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 */ /* translators: %s: 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: Trackback/pingback website name, 2: website IP address, 3: website hostname */ /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
$notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
/* translators: %s: 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: %s: 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";
$notify_message .= __( 'You can see all pingbacks on this post here:' ) . "\r\n"; $notify_message .= __( 'You can see all pingbacks on this post here:' ) . "\r\n";
/* translators: 1: blog name, 2: post title */ /* translators: 1: blog name, 2: post title */
$subject = sprintf( __( '[%1$s] Pingback: "%2$s"' ), $blogname, $post->post_title ); $subject = sprintf( __( '[%1$s] Pingback: "%2$s"' ), $blogname, $post->post_title );
break; break;
default: // Comments default: // Comments
/* translators: %s: post title */
$notify_message = sprintf( __( 'New comment on your post "%s"' ), $post->post_title ) . "\r\n"; $notify_message = sprintf( __( 'New comment on your post "%s"' ), $post->post_title ) . "\r\n";
/* translators: 1: comment author, 2: comment author's IP address, 3: comment author's hostname */ /* translators: 1: comment author, 2: comment author's IP address, 3: comment author's hostname */
$notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
/* translators: %s: comment author email */
$notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n"; $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
/* translators: %s: 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: %s: 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";
$notify_message .= __( 'You can see all comments on this post here:' ) . "\r\n"; $notify_message .= __( 'You can see all comments on this post here:' ) . "\r\n";
/* translators: 1: blog name, 2: post title */ /* translators: 1: blog name, 2: post title */
@ -1561,10 +1569,13 @@ if ( ! function_exists( 'wp_notify_postauthor' ) ) :
if ( user_can( $post->post_author, 'edit_comment', $comment->comment_ID ) ) { if ( user_can( $post->post_author, 'edit_comment', $comment->comment_ID ) ) {
if ( EMPTY_TRASH_DAYS ) { if ( EMPTY_TRASH_DAYS ) {
/* translators: Comment moderation. %s: Comment action URL */
$notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n"; $notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
} else { } else {
/* translators: Comment moderation. %s: Comment action URL */
$notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n"; $notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
} }
/* translators: Comment moderation. %s: Comment action URL */
$notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n"; $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
} }
@ -1687,55 +1698,55 @@ if ( ! function_exists( 'wp_notify_moderator' ) ) :
switch ( $comment->comment_type ) { switch ( $comment->comment_type ) {
case 'trackback': case 'trackback':
/* translators: 1: Post title */ /* translators: %s: 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: Trackback/pingback website name, 2: website IP address, 3: website hostname */ /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
$notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
/* translators: 1: Trackback/pingback/comment author URL */ /* translators: %s: 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 */ /* translators: %s: 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: Trackback/pingback website name, 2: website IP address, 3: website hostname */ /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
$notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
/* translators: 1: Trackback/pingback/comment author URL */ /* translators: %s: 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 */ /* translators: %s: 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 address, 3: comment author's hostname */ /* translators: 1: comment author name, 2: comment author's IP address, 3: comment author's hostname */
$notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n"; $notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
/* translators: 1: Comment author URL */ /* translators: %s: comment author email */
$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 */ /* translators: %s: 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 */ /* translators: %s: 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 */ /* translators: Comment moderation. %s: 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 */ /* translators: Comment moderation. %s: 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 */ /* translators: Comment moderation. %s: 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 */ /* translators: Comment moderation. %s: 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 */ /* translators: Comment moderation. %s: Number of comments awaiting approval */
$notify_message .= sprintf( $notify_message .= sprintf(
_n( _n(
'Currently %s comment is waiting for approval. Please visit the moderation panel:', 'Currently %s comment is waiting for approval. Please visit the moderation panel:',

View File

@ -2849,7 +2849,7 @@ function wp_update_term( $term_id, $taxonomy, $args = array() ) {
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 */ /* translators: %s: 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 ) );
} }
} }

View File

@ -2537,7 +2537,7 @@ function add_theme_support( $feature ) {
case 'title-tag': case 'title-tag':
// Can be called in functions.php but must happen before wp_loaded, i.e. not in header.php. // Can be called in functions.php but must happen before wp_loaded, i.e. not in header.php.
if ( did_action( 'wp_loaded' ) ) { if ( did_action( 'wp_loaded' ) ) {
/* translators: 1: Theme support 2: hook name */ /* translators: 1: title-tag, 2: wp_loaded */
_doing_it_wrong( _doing_it_wrong(
"add_theme_support( 'title-tag' )", sprintf( "add_theme_support( 'title-tag' )", sprintf(
__( 'Theme support for %1$s should be registered before the %2$s hook.' ), __( 'Theme support for %1$s should be registered before the %2$s hook.' ),

View File

@ -665,15 +665,15 @@ 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 */ /* translators: %d: 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 */ /* translators: %d: 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 */ /* translators: %d: 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'] ) {

View File

@ -1952,7 +1952,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 */ /* translators: User password change notification email subject. %s: Site name */
'subject' => __( '[%s] Notice of Password Change' ), 'subject' => __( '[%s] Notice of Password Change' ),
'message' => $pass_change_text, 'message' => $pass_change_text,
'headers' => '', 'headers' => '',
@ -2009,7 +2009,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 */ /* translators: User email change notification email subject. %s: 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 = '5.0-alpha-42826'; $wp_version = '5.0-alpha-42827';
/** /**
* 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

@ -348,7 +348,7 @@ class WP_Widget_Media_Image extends WP_Widget_Media {
<# if ( ! data.alt && data.currentFilename ) { #> <# if ( ! data.alt && data.currentFilename ) { #>
<p class="hidden" id="{{ describedById }}"> <p class="hidden" id="{{ describedById }}">
<?php <?php
/* translators: placeholder is image filename */ /* translators: %s: image filename */
echo sprintf( __( 'Current image: %s' ), '{{ data.currentFilename }}' ); echo sprintf( __( 'Current image: %s' ), '{{ data.currentFilename }}' );
?> ?>
</p> </p>

View File

@ -1648,7 +1648,7 @@ class wpdb {
$message = '<h1>' . __( 'Error establishing a database connection' ) . "</h1>\n"; $message = '<h1>' . __( 'Error establishing a database connection' ) . "</h1>\n";
$message .= '<p>' . sprintf( $message .= '<p>' . sprintf(
/* translators: 1: wp-config.php. 2: database host */ /* translators: 1: wp-config.php, 2: database host */
__( 'This either means that the username and password information in your %1$s file is incorrect or we can&#8217;t contact the database server at %2$s. This could mean your host&#8217;s database server is down.' ), __( 'This either means that the username and password information in your %1$s file is incorrect or we can&#8217;t contact the database server at %2$s. This could mean your host&#8217;s database server is down.' ),
'<code>wp-config.php</code>', '<code>wp-config.php</code>',
'<code>' . htmlspecialchars( $this->dbhost, ENT_QUOTES ) . '</code>' '<code>' . htmlspecialchars( $this->dbhost, ENT_QUOTES ) . '</code>'

View File

@ -29,7 +29,7 @@ echo '<?xml version="1.0"?' . ">\n";
<head> <head>
<title> <title>
<?php <?php
/* translators: 1: Site name */ /* translators: %s: site name */
printf( __( 'Links for %s' ), esc_attr( get_bloginfo( 'name', 'display' ) ) ); printf( __( 'Links for %s' ), esc_attr( get_bloginfo( 'name', 'display' ) ) );
?> ?>
</title> </title>

View File

@ -954,7 +954,7 @@ switch ( $action ) {
); );
} elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) { } elseif ( isset( $_POST['testcookie'] ) && empty( $_COOKIE[ TEST_COOKIE ] ) ) {
// If cookies are disabled we can't log in even with a valid user+pass // If cookies are disabled we can't log in even with a valid user+pass
/* translators: 1: Browser cookie documentation URL */ /* translators: %s: Browser cookie documentation URL */
$user = new WP_Error( $user = new WP_Error(
'test_cookie', sprintf( 'test_cookie', sprintf(
__( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ), __( '<strong>ERROR</strong>: Cookies are blocked or not supported by your browser. You must <a href="%s">enable cookies</a> to use WordPress.' ),