diff --git a/wp-admin/includes/ajax-actions.php b/wp-admin/includes/ajax-actions.php
index f3c54284a0..db22db2924 100644
--- a/wp-admin/includes/ajax-actions.php
+++ b/wp-admin/includes/ajax-actions.php
@@ -390,10 +390,12 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
'time' => $time,
'in_moderation' => $counts->moderated,
'i18n_comments_text' => sprintf(
+ /* translators: %s: number of comments approved */
_n( '%s Comment', '%s Comments', $counts->approved ),
number_format_i18n( $counts->approved )
),
'i18n_moderation_text' => sprintf(
+ /* translators: %s: number of comments in moderation */
_nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments' ),
number_format_i18n( $counts->moderated )
),
@@ -452,6 +454,7 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
'supplemental' => array(
'status' => $comment ? $comment->comment_approved : '',
'postId' => $comment ? $comment->comment_post_ID : '',
+ /* translators: %s: number of comments */
'total_items_i18n' => sprintf( _n( '%s item', '%s items', $total ), number_format_i18n( $total ) ),
'total_pages' => ceil( $total / $per_page ),
'total_pages_i18n' => number_format_i18n( ceil( $total / $per_page ) ),
@@ -835,6 +838,7 @@ function wp_ajax_dim_comment() {
$x = new WP_Ajax_Response(
array(
'what' => 'comment',
+ /* translators: %d: comment ID */
'id' => new WP_Error( 'invalid_comment', sprintf( __( 'Comment %d does not exist' ), $id ) ),
)
);
@@ -1214,10 +1218,12 @@ function wp_ajax_replyto_comment( $action ) {
$response['supplemental'] = array(
'in_moderation' => $counts->moderated,
'i18n_comments_text' => sprintf(
+ /* translators: %s: number of comments approved */
_n( '%s Comment', '%s Comments', $counts->approved ),
number_format_i18n( $counts->approved )
),
'i18n_moderation_text' => sprintf(
+ /* translators: %s: number of comments moderated */
_nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments' ),
number_format_i18n( $counts->moderated )
),
@@ -1813,7 +1819,15 @@ function wp_ajax_inline_save() {
if ( $last = wp_check_post_lock( $post_ID ) ) {
$last_user = get_userdata( $last );
$last_user_name = $last_user ? $last_user->display_name : __( 'Someone' );
- printf( $_POST['post_type'] == 'page' ? __( 'Saving is disabled: %s is currently editing this page.' ) : __( 'Saving is disabled: %s is currently editing this post.' ), esc_html( $last_user_name ) );
+
+ /* translators: %s: user who is currently editing the post */
+ $msg_template = __( 'Saving is disabled: %s is currently editing this post.' );
+ if ( $_POST['post_type'] == 'page' ) {
+ /* translators: %s: user who is currently editing the page */
+ $msg_template = __( 'Saving is disabled: %s is currently editing this page.' );
+ }
+
+ printf( $msg_template, esc_html( $last_user_name ) );
wp_die();
}
@@ -2508,9 +2522,11 @@ function wp_ajax_wp_fullscreen_save_post() {
}
if ( $last_id = get_post_meta( $post_id, '_edit_last', true ) ) {
- $last_user = get_userdata( $last_id );
+ $last_user = get_userdata( $last_id );
+ /* translators: 1: display_name of last user, 2: date of last edit, 3: time of last edit. */
$last_edited = sprintf( __( 'Last edited by %1$s on %2$s at %3$s' ), esc_html( $last_user->display_name ), $last_date, $last_time );
} else {
+ /* translators: 1: date of last edit, 2: time of last edit. */
$last_edited = sprintf( __( 'Last edited on %1$s at %2$s' ), $last_date, $last_time );
}
@@ -3336,6 +3352,7 @@ function wp_ajax_parse_embed() {
wp_send_json_error(
array(
'type' => 'not-embeddable',
+ /* translators: %s: URL which cannot be embedded, between code tags */
'message' => sprintf( __( '%s failed to embed.' ), '' . esc_html( $url ) . '
' ),
)
);
diff --git a/wp-admin/includes/bookmark.php b/wp-admin/includes/bookmark.php
index 5475d3d67f..fa425dda04 100644
--- a/wp-admin/includes/bookmark.php
+++ b/wp-admin/includes/bookmark.php
@@ -319,6 +319,7 @@ function wp_link_manager_disabled_message() {
if ( $really_can_manage_links && current_user_can( 'install_plugins' ) ) {
$link = network_admin_url( 'plugin-install.php?tab=search&s=Link+Manager' );
+ /* translators: %s: URL of link manager plugin */
wp_die( sprintf( __( 'If you are looking to use the link manager, please install the Link Manager plugin.' ), $link ) );
}
diff --git a/wp-admin/includes/class-bulk-plugin-upgrader-skin.php b/wp-admin/includes/class-bulk-plugin-upgrader-skin.php
index 4b407f76d6..a568d6b107 100644
--- a/wp-admin/includes/class-bulk-plugin-upgrader-skin.php
+++ b/wp-admin/includes/class-bulk-plugin-upgrader-skin.php
@@ -20,6 +20,7 @@ class Bulk_Plugin_Upgrader_Skin extends Bulk_Upgrader_Skin {
public function add_strings() {
parent::add_strings();
+ /* translators: 1: name of plugin being updated, 2: number of updating plugin, 3: total number of plugins being updated */
$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Plugin %1$s (%2$d/%3$d)' );
}
diff --git a/wp-admin/includes/class-bulk-theme-upgrader-skin.php b/wp-admin/includes/class-bulk-theme-upgrader-skin.php
index 1ac8d3c6c5..ce426e0154 100644
--- a/wp-admin/includes/class-bulk-theme-upgrader-skin.php
+++ b/wp-admin/includes/class-bulk-theme-upgrader-skin.php
@@ -20,6 +20,7 @@ class Bulk_Theme_Upgrader_Skin extends Bulk_Upgrader_Skin {
public function add_strings() {
parent::add_strings();
+ /* translators: 1: name of theme being updated, 2: number of updating themes, 3: total number of themes being updated */
$this->upgrader->strings['skin_before_update_header'] = __( 'Updating Theme %1$s (%2$d/%3$d)' );
}
diff --git a/wp-admin/includes/class-language-pack-upgrader-skin.php b/wp-admin/includes/class-language-pack-upgrader-skin.php
index 3eb46cfd87..1d59cc73cb 100644
--- a/wp-admin/includes/class-language-pack-upgrader-skin.php
+++ b/wp-admin/includes/class-language-pack-upgrader-skin.php
@@ -47,6 +47,7 @@ class Language_Pack_Upgrader_Skin extends WP_Upgrader_Skin {
echo '
';
+ /* translators: 1: name of project, 2: language */
printf( '
' . __( 'Updating translations for %1$s (%2$s)…' ) . '
', $name, $this->language_update->language );
}
diff --git a/wp-admin/includes/class-language-pack-upgrader.php b/wp-admin/includes/class-language-pack-upgrader.php
index 3982306aec..aea15ef48e 100644
--- a/wp-admin/includes/class-language-pack-upgrader.php
+++ b/wp-admin/includes/class-language-pack-upgrader.php
@@ -343,8 +343,8 @@ class Language_Pack_Upgrader extends WP_Upgrader {
return new WP_Error(
'incompatible_archive_pomo',
$this->strings['incompatible_archive'],
- /* translators: 1: .po, 2: .mo */
sprintf(
+ /* translators: 1: .po, 2: .mo */
__( 'The language pack is missing either the %1$s or %2$s files.' ),
'
.po
',
'
.mo
'
diff --git a/wp-admin/includes/class-plugin-installer-skin.php b/wp-admin/includes/class-plugin-installer-skin.php
index b4d2574451..1d6dd01876 100644
--- a/wp-admin/includes/class-plugin-installer-skin.php
+++ b/wp-admin/includes/class-plugin-installer-skin.php
@@ -42,6 +42,7 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
*/
public function before() {
if ( ! empty( $this->api ) ) {
+ /* translators: 1: name of API, 2: version of API */
$this->upgrader->strings['process_success'] = sprintf( __( 'Successfully installed the plugin
%1$s %2$s.' ), $this->api->name, $this->api->version );
}
}
diff --git a/wp-admin/includes/class-theme-installer-skin.php b/wp-admin/includes/class-theme-installer-skin.php
index cf8ee0d88a..5f62e2c00b 100644
--- a/wp-admin/includes/class-theme-installer-skin.php
+++ b/wp-admin/includes/class-theme-installer-skin.php
@@ -75,16 +75,22 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
$install_actions = array();
if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
- $customize_url = add_query_arg(
+ $customize_url = add_query_arg(
array(
'theme' => urlencode( $stylesheet ),
'return' => urlencode( admin_url( 'web' === $this->type ? 'theme-install.php' : 'themes.php' ) ),
),
admin_url( 'customize.php' )
);
- $install_actions['preview'] = '
' . __( 'Live Preview' ) . '' . sprintf( __( 'Live Preview “%s”' ), $name ) . '';
+ $install_actions['preview'] = '
';
+ $install_actions['preview'] .= '' . __( 'Live Preview' ) . '';
+ /* translators: %s: theme name */
+ $install_actions['preview'] .= '' . sprintf( __( 'Live Preview “%s”' ), $name ) . '';
}
- $install_actions['activate'] = '
' . __( 'Activate' ) . '' . sprintf( __( 'Activate “%s”' ), $name ) . '';
+ $install_actions['activate'] = '
';
+ $install_actions['activate'] .= '' . __( 'Activate' ) . '';
+ /* translators: %s: theme name */
+ $install_actions['activate'] .= '' . sprintf( __( 'Activate “%s”' ), $name ) . '';
if ( is_network_admin() && current_user_can( 'manage_network_themes' ) ) {
$install_actions['network_enable'] = '
' . __( 'Network Enable' ) . '';
diff --git a/wp-admin/includes/class-theme-upgrader-skin.php b/wp-admin/includes/class-theme-upgrader-skin.php
index 395429620f..062297df74 100644
--- a/wp-admin/includes/class-theme-upgrader-skin.php
+++ b/wp-admin/includes/class-theme-upgrader-skin.php
@@ -65,13 +65,22 @@ class Theme_Upgrader_Skin extends WP_Upgrader_Skin {
);
if ( get_stylesheet() == $stylesheet ) {
if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
- $update_actions['preview'] = '
' . __( 'Customize' ) . '' . sprintf( __( 'Customize “%s”' ), $name ) . '';
+ $update_actions['preview'] = '
';
+ $update_actions['preview'] .= '' . __( 'Customize' ) . '';
+ /* translators: %s: theme name */
+ $update_actions['preview'] .= '' . sprintf( __( 'Customize “%s”' ), $name ) . '';
}
} elseif ( current_user_can( 'switch_themes' ) ) {
if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) {
- $update_actions['preview'] = '
' . __( 'Live Preview' ) . '' . sprintf( __( 'Live Preview “%s”' ), $name ) . '';
+ $update_actions['preview'] = '
';
+ $update_actions['preview'] .= '' . __( 'Live Preview' ) . '';
+ /* translators: %s: theme name */
+ $update_actions['preview'] .= '' . sprintf( __( 'Live Preview “%s”' ), $name ) . '';
}
- $update_actions['activate'] = '
' . __( 'Activate' ) . '' . sprintf( __( 'Activate “%s”' ), $name ) . '';
+ $update_actions['activate'] = '
';
+ $update_actions['activate'] .= '' . __( 'Activate' ) . '';
+ /* translators: %s: theme name */
+ $update_actions['activate'] .= '' . sprintf( __( 'Activate “%s”' ), $name ) . '';
}
if ( ! $this->result || is_wp_error( $this->result ) || is_network_admin() ) {
diff --git a/wp-admin/includes/class-theme-upgrader.php b/wp-admin/includes/class-theme-upgrader.php
index eec26d5e0e..7b521063f8 100644
--- a/wp-admin/includes/class-theme-upgrader.php
+++ b/wp-admin/includes/class-theme-upgrader.php
@@ -473,8 +473,8 @@ class Theme_Upgrader extends WP_Upgrader {
return new WP_Error(
'incompatible_archive_theme_no_style',
$this->strings['incompatible_archive'],
- /* translators: %s: style.css */
sprintf(
+ /* translators: %s: style.css */
__( 'The theme is missing the %s stylesheet.' ),
'
style.css
'
)
@@ -493,8 +493,8 @@ class Theme_Upgrader extends WP_Upgrader {
return new WP_Error(
'incompatible_archive_theme_no_name',
$this->strings['incompatible_archive'],
- /* translators: %s: style.css */
sprintf(
+ /* translators: %s: style.css */
__( 'The %s stylesheet doesn’t contain a valid theme header.' ),
'
style.css
'
)
@@ -506,8 +506,8 @@ class Theme_Upgrader extends WP_Upgrader {
return new WP_Error(
'incompatible_archive_theme_no_index',
$this->strings['incompatible_archive'],
- /* translators: %s: index.php */
sprintf(
+ /* translators: %s: index.php */
__( 'The theme is missing the %s file.' ),
'
index.php
'
)
diff --git a/wp-admin/includes/class-walker-nav-menu-checklist.php b/wp-admin/includes/class-walker-nav-menu-checklist.php
index 881e9e7192..994cc040f3 100644
--- a/wp-admin/includes/class-walker-nav-menu-checklist.php
+++ b/wp-admin/includes/class-walker-nav-menu-checklist.php
@@ -95,6 +95,7 @@ class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
/** This filter is documented in wp-includes/post-template.php */
$title = apply_filters( 'the_title', $item->post_title, $item->ID );
if ( ! empty( $item->front_or_home ) && _x( 'Home', 'nav menu home label' ) !== $title ) {
+ /* translators: %s: front page title */
$title = sprintf( _x( 'Home: %s', 'nav menu front page title' ), $title );
}
}
diff --git a/wp-admin/includes/class-walker-nav-menu-edit.php b/wp-admin/includes/class-walker-nav-menu-edit.php
index f1baecd611..eb940af37c 100644
--- a/wp-admin/includes/class-walker-nav-menu-edit.php
+++ b/wp-admin/includes/class-walker-nav-menu-edit.php
@@ -217,7 +217,10 @@ class Walker_Nav_Menu_Edit extends Walker_Nav_Menu {