diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php
index fad07890ac..438aa8c2b1 100644
--- a/wp-admin/theme-install.php
+++ b/wp-admin/theme-install.php
@@ -46,7 +46,7 @@ wp_localize_script( 'theme', '_wpThemeSettings', array(
'l10n' => array(
'addNew' => __( 'Add New Theme' ),
'search' => __( 'Search Themes' ),
- 'searchPlaceholder' => __( 'Search themes…' ),
+ 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis)
'upload' => __( 'Upload Theme' ),
'back' => __( 'Back' ),
'error' => ( 'There was a problem trying to load the themes. Please, try again.' ), // @todo improve
diff --git a/wp-admin/themes.php b/wp-admin/themes.php
index ea06aa8c71..3dd60f11a5 100644
--- a/wp-admin/themes.php
+++ b/wp-admin/themes.php
@@ -104,7 +104,7 @@ wp_localize_script( 'theme', '_wpThemeSettings', array(
'l10n' => array(
'addNew' => __( 'Add New Theme' ),
'search' => __( 'Search Installed Themes' ),
- 'searchPlaceholder' => __( 'Search installed themes...' ),
+ 'searchPlaceholder' => __( 'Search installed themes...' ), // placeholder (no ellipsis)
),
) );
diff --git a/wp-includes/class-wp-customize-control.php b/wp-includes/class-wp-customize-control.php
index 896bdd9390..6c5e46711c 100644
--- a/wp-includes/class-wp-customize-control.php
+++ b/wp-includes/class-wp-customize-control.php
@@ -748,12 +748,6 @@ final class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control
'add' => wp_create_nonce( 'header-add' ),
'remove' => wp_create_nonce( 'header-remove' ),
),
- 'l10n' => array(
- /* translators: header images uploaded by user */
- 'uploaded' => __( 'uploaded' ),
- /* translators: header images suggested by the current theme */
- 'default' => __( 'suggested' )
- ),
'uploads' => $this->uploaded_headers,
'defaults' => $this->default_headers
) );
@@ -972,20 +966,15 @@ final class WP_Customize_Header_Image_Control extends WP_Customize_Image_Control
-
%s, your theme recommends a header size of %dx%d pixels.' ),
- _x( 'Add new', 'header image' ), $width, $height );
+ printf( ( 'While you can crop images to your liking after clicking Add new , your theme recommends a header size of %d × %d pixels.' ), $width, $height );
+ } elseif ( $width ) {
+ printf( ( 'While you can crop images to your liking after clicking Add new , your theme recommends a header width of %d pixels.' ), $width );
} else {
- if ( $width ) {
- printf( __( 'While you can crop images to your liking after clicking %s , your theme recommends a header width of %d pixels.' ),
- _x( 'Add new', 'header image' ), $width );
- }
- if ( $height ) {
- printf( __( 'While you can crop images to your liking after clicking %s , your theme recommends a header height of %d pixels.' ),
- _x( 'Add new', 'header image' ), $height );
- }
+ printf( ( 'While you can crop images to your liking after clicking Add new , your theme recommends a header height of %d pixels.' ), $height );
}
?>
diff --git a/wp-includes/class-wp-customize-widgets.php b/wp-includes/class-wp-customize-widgets.php
index ecddb3a620..f5e21af70f 100644
--- a/wp-includes/class-wp-customize-widgets.php
+++ b/wp-includes/class-wp-customize-widgets.php
@@ -296,6 +296,7 @@ class WP_Customize_Widgets {
$section_id = sprintf( 'sidebar-widgets-%s', $sidebar_id );
if ( $is_active_sidebar ) {
$section_args = array(
+ /* translators: %s: sidebar name */
'title' => sprintf( __( 'Widgets: %s' ), $GLOBALS['wp_registered_sidebars'][$sidebar_id]['name'] ),
'description' => $GLOBALS['wp_registered_sidebars'][$sidebar_id]['description'],
'priority' => 1000 + array_search( $sidebar_id, array_keys( $wp_registered_sidebars ) ),
@@ -457,20 +458,17 @@ class WP_Customize_Widgets {
}
$widget_reorder_nav_tpl = sprintf(
- '
%2$s %4$s %6$s
',
- esc_attr__( 'Move to another area...' ),
- esc_html__( 'Move to another area...' ),
- esc_attr__( 'Move down' ),
- esc_html__( 'Move down' ),
- esc_attr__( 'Move up' ),
- esc_html__( 'Move up' )
+ '
%1$s %2$s %3$s
',
+ __( 'Move to another area…' ),
+ __( 'Move down' ),
+ __( 'Move up' )
);
$move_widget_area_tpl = str_replace(
array( '{description}', '{btn}' ),
array(
- esc_html__( 'Select an area to move this widget into:' ),
- esc_html__( 'Move' ),
+ ( 'Select an area to move this widget into:' ), // @todo translate
+ esc_html_x( 'Move', 'move widget' ),
),
'
@@ -497,10 +495,11 @@ class WP_Customize_Widgets {
'registered_widgets' => $GLOBALS['wp_registered_widgets'],
'available_widgets' => $available_widgets, // @todo Merge this with registered_widgets
'i18n' => array(
- 'save_btn_label' => _x( 'Apply', 'button to save changes to a widget' ),
- 'save_btn_tooltip' => _x( 'Save and preview changes before publishing them.', 'tooltip on the widget save button' ),
- 'remove_btn_label' => _x( 'Remove', 'link to move a widget to the inactive widgets sidebar' ),
- 'remove_btn_tooltip' => _x( 'Trash widget by moving it to the inactive widgets sidebar.', 'tooltip on btn a widget to move it to the inactive widgets sidebar' ),
+ 'save_btn_label' => __( 'Apply' ),
+ // @todo translate? do we want these tooltips?
+ 'save_btn_tooltip' => ( 'Save and preview changes before publishing them.' ),
+ 'remove_btn_label' => __( 'Remove' ),
+ 'remove_btn_tooltip' => ( 'Trash widget by moving it to the inactive widgets sidebar.' ),
),
'tpl' => array(
'widget_reorder_nav' => $widget_reorder_nav_tpl,
@@ -733,7 +732,7 @@ class WP_Customize_Widgets {
'registered_sidebars' => array_values( $GLOBALS['wp_registered_sidebars'] ),
'registered_widgets' => $GLOBALS['wp_registered_widgets'],
'i18n' => array(
- 'widget_tooltip' => __( 'Press shift and then click to edit widget in customizer...' ),
+ 'widget_tooltip' => ( 'Shift-click to edit this widget.' ),
),
);
foreach ( $exports['registered_widgets'] as &$registered_widget ) {
@@ -1031,13 +1030,13 @@ class WP_Customize_Widgets {
try {
if ( ! check_ajax_referer( self::UPDATE_WIDGET_AJAX_ACTION, self::UPDATE_WIDGET_NONCE_POST_KEY, false ) ) {
- throw new Widget_Customizer_Exception( __( 'Nonce check failed. Reload and try again?' ) );
+ throw new Widget_Customizer_Exception( ( 'Nonce check failed. Reload and try again?' ) );
}
if ( ! current_user_can( 'edit_theme_options' ) ) {
- throw new Widget_Customizer_Exception( __( 'Current user cannot!' ) );
+ throw new Widget_Customizer_Exception( ( 'Current user cannot!' ) ); // @todo translate
}
if ( ! isset( $_POST['widget-id'] ) ) {
- throw new Widget_Customizer_Exception( __( 'Incomplete request' ) );
+ throw new Widget_Customizer_Exception( ( 'Incomplete request' ) ); // @todo translate
}
unset( $_POST[self::UPDATE_WIDGET_NONCE_POST_KEY], $_POST['action'] );
diff --git a/wp-includes/js/customize-views.js b/wp-includes/js/customize-views.js
index 99a004edb8..263c84c58c 100644
--- a/wp-includes/js/customize-views.js
+++ b/wp-includes/js/customize-views.js
@@ -135,13 +135,10 @@
},
extendedModel: function() {
- var c = this.model.get('collection'),
- t = _wpCustomizeHeader.l10n[c.type] || '';
-
+ var c = this.model.get('collection');
return _.extend(this.model.toJSON(), {
// -1 to exclude the randomize button
- nImages: c.size() - 1,
- type: t
+ nImages: c.size() - 1
});
},
diff --git a/wp-includes/js/customize-views.min.js b/wp-includes/js/customize-views.min.js
index 5410e0ef31..9796666bc0 100644
--- a/wp-includes/js/customize-views.min.js
+++ b/wp-includes/js/customize-views.min.js
@@ -1 +1 @@
-!function(a,b,c){if(b&&b.customize){var d=b.customize;d.HeaderTool.CurrentView=b.Backbone.View.extend({template:b.template("header-current"),initialize:function(){this.listenTo(this.model,"change",this.render),this.render()},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.setPlaceholder(),this.setButtons(),this},getHeight:function(){var a,b=this.$el.find("img"),c=this.model.get("savedHeight"),e=b.height()||c;return b.length?this.$el.find(".inner").hide():this.$el.find(".inner").show(),e||(a=d.get().header_image_data,e=a&&a.width&&a.height?260/a.width*a.height:40),e},setPlaceholder:function(a){var b=a||this.getHeight();this.model.set("savedHeight",b),this.$el.add(this.$el.find(".placeholder")).height(b)},setButtons:function(){var b=a(".actions .remove");this.model.get("choice")?b.show():b.hide()}}),function(){var a=0;d.HeaderTool.ChoiceView=b.Backbone.View.extend({template:b.template("header-choice"),className:"header-view",events:{"click .choice,.random":"select","click .close":"removeImage"},initialize:function(){var a=[this.model.get("header").url,this.model.get("choice")];this.listenTo(this.model,"change",this.render),c.contains(a,d.get().header_image)&&d.HeaderTool.currentHeader.set(this.extendedModel())},render:function(){var b=this.model;return this.$el.html(this.template(this.extendedModel())),b.get("random")?this.setPlaceholder(40):a=this.getHeight(),this.$el.toggleClass("hidden",b.get("hidden")),this},extendedModel:function(){var a=this.model.get("collection"),b=_wpCustomizeHeader.l10n[a.type]||"";return c.extend(this.model.toJSON(),{nImages:a.size()-1,type:b})},getHeight:d.HeaderTool.CurrentView.prototype.getHeight,setPlaceholder:d.HeaderTool.CurrentView.prototype.setPlaceholder,select:function(){this.model.save(),d.HeaderTool.currentHeader.set(this.extendedModel())},removeImage:function(a){a.stopPropagation(),this.model.destroy(),this.remove()}})}(),d.HeaderTool.ChoiceListView=b.Backbone.View.extend({initialize:function(){this.listenTo(this.collection,"add",this.addOne),this.listenTo(this.collection,"remove",this.render),this.listenTo(this.collection,"sort",this.render),this.listenTo(this.collection,"change:hidden",this.toggleTitle),this.listenTo(this.collection,"change:hidden",this.setMaxListHeight),this.render()},render:function(){this.$el.empty(),this.collection.each(this.addOne,this),this.toggleTitle()},addOne:function(a){var b;a.set({collection:this.collection}),b=new d.HeaderTool.ChoiceView({model:a}),this.$el.append(b.render().el)},toggleTitle:function(){var a=this.$el.parents().prev(".customize-control-title");this.collection.shouldHideTitle()?a.hide():a.show()}}),d.HeaderTool.CombinedList=b.Backbone.View.extend({initialize:function(a){this.collections=a,this.on("all",this.propagate,this)},propagate:function(a,b){c.each(this.collections,function(c){c.trigger(a,b)})}})}}(jQuery,window.wp,_);
\ No newline at end of file
+!function(a,b,c){if(b&&b.customize){var d=b.customize;d.HeaderTool.CurrentView=b.Backbone.View.extend({template:b.template("header-current"),initialize:function(){this.listenTo(this.model,"change",this.render),this.render()},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.setPlaceholder(),this.setButtons(),this},getHeight:function(){var a,b=this.$el.find("img"),c=this.model.get("savedHeight"),e=b.height()||c;return b.length?this.$el.find(".inner").hide():this.$el.find(".inner").show(),e||(a=d.get().header_image_data,e=a&&a.width&&a.height?260/a.width*a.height:40),e},setPlaceholder:function(a){var b=a||this.getHeight();this.model.set("savedHeight",b),this.$el.add(this.$el.find(".placeholder")).height(b)},setButtons:function(){var b=a(".actions .remove");this.model.get("choice")?b.show():b.hide()}}),function(){var a=0;d.HeaderTool.ChoiceView=b.Backbone.View.extend({template:b.template("header-choice"),className:"header-view",events:{"click .choice,.random":"select","click .close":"removeImage"},initialize:function(){var a=[this.model.get("header").url,this.model.get("choice")];this.listenTo(this.model,"change",this.render),c.contains(a,d.get().header_image)&&d.HeaderTool.currentHeader.set(this.extendedModel())},render:function(){var b=this.model;return this.$el.html(this.template(this.extendedModel())),b.get("random")?this.setPlaceholder(40):a=this.getHeight(),this.$el.toggleClass("hidden",b.get("hidden")),this},extendedModel:function(){var a=this.model.get("collection");return c.extend(this.model.toJSON(),{nImages:a.size()-1})},getHeight:d.HeaderTool.CurrentView.prototype.getHeight,setPlaceholder:d.HeaderTool.CurrentView.prototype.setPlaceholder,select:function(){this.model.save(),d.HeaderTool.currentHeader.set(this.extendedModel())},removeImage:function(a){a.stopPropagation(),this.model.destroy(),this.remove()}})}(),d.HeaderTool.ChoiceListView=b.Backbone.View.extend({initialize:function(){this.listenTo(this.collection,"add",this.addOne),this.listenTo(this.collection,"remove",this.render),this.listenTo(this.collection,"sort",this.render),this.listenTo(this.collection,"change:hidden",this.toggleTitle),this.listenTo(this.collection,"change:hidden",this.setMaxListHeight),this.render()},render:function(){this.$el.empty(),this.collection.each(this.addOne,this),this.toggleTitle()},addOne:function(a){var b;a.set({collection:this.collection}),b=new d.HeaderTool.ChoiceView({model:a}),this.$el.append(b.render().el)},toggleTitle:function(){var a=this.$el.parents().prev(".customize-control-title");this.collection.shouldHideTitle()?a.hide():a.show()}}),d.HeaderTool.CombinedList=b.Backbone.View.extend({initialize:function(a){this.collections=a,this.on("all",this.propagate,this)},propagate:function(a,b){c.each(this.collections,function(c){c.trigger(a,b)})}})}}(jQuery,window.wp,_);
\ No newline at end of file
diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php
index 5cde40b056..3201b8a61f 100644
--- a/wp-includes/media-template.php
+++ b/wp-includes/media-template.php
@@ -512,8 +512,8 @@ function wp_print_media_templates() {
_x( 'Light', 'light playlist theme' ),
- 'dark' => _x( 'Dark', 'dark playlist theme' )
+ 'light' => _x( 'Light', 'playlist theme' ),
+ 'dark' => _x( 'Dark', 'playlist theme' )
);
/** This filter is documented in wp-includes/media.php */
@@ -814,7 +814,7 @@ function wp_print_media_templates() {
-
+
@@ -919,7 +919,7 @@ function wp_print_media_templates() {
-
+
<#
var content = '';
if ( ! _.isEmpty( data.model.content ) ) {
diff --git a/wp-includes/media.php b/wp-includes/media.php
index 13e1217a42..57f63118b4 100644
--- a/wp-includes/media.php
+++ b/wp-includes/media.php
@@ -1124,8 +1124,8 @@ function wp_get_playlist( $attr, $type ) {
}
$playlist_styles = array(
- 'light' => _x( 'Light', 'light playlist theme' ),
- 'dark' => _x( 'Dark', 'dark playlist theme' )
+ 'light' => _x( 'Light', 'playlist theme' ),
+ 'dark' => _x( 'Dark', 'playlist theme' )
);
/**
@@ -2480,20 +2480,13 @@ function wp_enqueue_media( $args = array() ) {
'editImage' => __( 'Edit Image' ),
// Crop Image
- /* translators: title for Media Manager library view */
'chooseImage' => __( 'Choose Image' ),
- /* translators: button to select an image from the MM library to crop */
'selectAndCrop' => __( 'Select and Crop' ),
- /* translators: button to choose not to crop the selected image */
'skipCropping' => __( 'Skip Cropping' ),
- /* translators: button to choose to crop the selected image */
'cropImage' => __( 'Crop Image' ),
'cropYourImage' => __( 'Crop your image' ),
- /* translators: button label changes to this while the image is being cropped server-side */
- 'cropping' => __( 'Cropping...' ),
- /* translators: suggested width of header image in pixels */
+ 'cropping' => __( 'Cropping…' ),
'suggestedWidth' => __( 'Suggested width is %d pixels.' ),
- /* translators: suggested height of header image in pixels */
'suggestedHeight' => __( 'Suggested height is %d pixels.' ),
'mediaHTML5Text' => __( 'Add alternate sources for maximum HTML5 playback:' ),
diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php
index a317ad1ef2..8319416909 100644
--- a/wp-includes/script-loader.php
+++ b/wp-includes/script-loader.php
@@ -497,7 +497,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 );
did_action( 'init' ) && $scripts->localize( 'media', 'attachMediaBoxL10n', array(
- 'error' => __( 'An error has occured. Please reload the page and try again.' )
+ 'error' => __( 'An error has occurred. Please reload the page and try again.' ),
));
$scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), false, 1 );