diff --git a/src/wp-admin/theme-install.php b/src/wp-admin/theme-install.php index fad07890ac..438aa8c2b1 100644 --- a/src/wp-admin/theme-install.php +++ b/src/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/src/wp-admin/themes.php b/src/wp-admin/themes.php index ea06aa8c71..3dd60f11a5 100644 --- a/src/wp-admin/themes.php +++ b/src/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/src/wp-includes/class-wp-customize-control.php b/src/wp-includes/class-wp-customize-control.php index 896bdd9390..6c5e46711c 100644 --- a/src/wp-includes/class-wp-customize-control.php +++ b/src/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/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php index ecddb3a620..f5e21af70f 100644 --- a/src/wp-includes/class-wp-customize-widgets.php +++ b/src/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/src/wp-includes/js/customize-views.js b/src/wp-includes/js/customize-views.js index 99a004edb8..263c84c58c 100644 --- a/src/wp-includes/js/customize-views.js +++ b/src/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/src/wp-includes/media-template.php b/src/wp-includes/media-template.php index 5cde40b056..3201b8a61f 100644 --- a/src/wp-includes/media-template.php +++ b/src/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() {