Make WordPress Core

Changeset 27620


Ignore:
Timestamp:
03/19/2014 08:17:08 AM (10 years ago)
Author:
nacin
Message:

More translation cleanups.

Affects widgets (see #27112), custom headers (see #21785), theme installer (see #27055, reverts [27614]), and some media stuff. Untranslates some complicated strings that need additional study.

see #27453.

Location:
trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/theme-install.php

    r27614 r27620  
    4747        'addNew' => __( 'Add New Theme' ),
    4848        'search'  => __( 'Search Themes' ),
    49         'searchPlaceholder' => __( 'Search themes…' ),
     49        'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis)
    5050        'upload' => __( 'Upload Theme' ),
    5151        'back'   => __( 'Back' ),
  • trunk/src/wp-admin/themes.php

    r27469 r27620  
    105105        'addNew' => __( 'Add New Theme' ),
    106106        'search'  => __( 'Search Installed Themes' ),
    107         'searchPlaceholder' => __( 'Search installed themes...' ),
     107        'searchPlaceholder' => __( 'Search installed themes...' ), // placeholder (no ellipsis)
    108108    ),
    109109) );
  • trunk/src/wp-includes/class-wp-customize-control.php

    r27497 r27620  
    749749                'remove' => wp_create_nonce( 'header-remove' ),
    750750            ),
    751             'l10n' => array(
    752                 /* translators: header images uploaded by user */
    753                 'uploaded' => __( 'uploaded' ),
    754                 /* translators: header images suggested by the current theme */
    755                 'default' => __( 'suggested' )
    756             ),
    757751            'uploads' => $this->uploaded_headers,
    758752            'defaults' => $this->default_headers
     
    973967        <div class="customize-control-content">
    974968            <p class="customizer-section-intro">
    975                 <?php _e( 'Personalize your site with your own header image.' ); ?>
    976969                <?php
     970                // @todo translate (and look to custom-header.php for inspiration)
     971                echo ( 'Personalize your site with your own header image.' );
    977972                if ( $width && $height ) {
    978                     printf( __( 'While you can crop images to your liking after clicking <strong>%s</strong>, your theme recommends a header size of <strong>%dx%d</strong> pixels.' ),
    979                         _x( 'Add new', 'header image' ), $width, $height );
     973                    printf( ( 'While you can crop images to your liking after clicking <strong>Add new</strong>, your theme recommends a header size of <strong>%d &times; %d</strong> pixels.' ), $width, $height );
     974                } elseif ( $width ) {
     975                    printf( ( 'While you can crop images to your liking after clicking <strong>Add new</strong>, your theme recommends a header width of <strong>%d</strong> pixels.' ), $width );
    980976                } else {
    981                     if ( $width ) {
    982                         printf( __( 'While you can crop images to your liking after clicking <strong>%s</strong>, your theme recommends a header width of <strong>%d</strong> pixels.' ),
    983                             _x( 'Add new', 'header image' ), $width );
    984                     }
    985                     if ( $height ) {
    986                         printf( __( 'While you can crop images to your liking after clicking <strong>%s</strong>, your theme recommends a header height of <strong>%d</strong> pixels.' ),
    987                             _x( 'Add new', 'header image' ), $height );
    988                     }
     977                    printf( ( 'While you can crop images to your liking after clicking <strong>Add new</strong>, your theme recommends a header height of <strong>%d</strong> pixels.' ), $height );
    989978                }
    990979                ?>
  • trunk/src/wp-includes/class-wp-customize-widgets.php

    r27588 r27620  
    297297                if ( $is_active_sidebar ) {
    298298                    $section_args = array(
     299                        /* translators: %s: sidebar name */
    299300                        'title' => sprintf( __( 'Widgets: %s' ), $GLOBALS['wp_registered_sidebars'][$sidebar_id]['name'] ),
    300301                        'description' => $GLOBALS['wp_registered_sidebars'][$sidebar_id]['description'],
     
    458459
    459460        $widget_reorder_nav_tpl = sprintf(
    460             '<div class="widget-reorder-nav"><span class="move-widget" tabindex="0" title="%1$s">%2$s</span><span class="move-widget-down" tabindex="0" title="%3$s">%4$s</span><span class="move-widget-up" tabindex="0" title="%5$s">%6$s</span></div>',
    461             esc_attr__( 'Move to another area...' ),
    462             esc_html__( 'Move to another area...' ),
    463             esc_attr__( 'Move down' ),
    464             esc_html__( 'Move down' ),
    465             esc_attr__( 'Move up' ),
    466             esc_html__( 'Move up' )
     461            '<div class="widget-reorder-nav"><span class="move-widget" tabindex="0">%1$s</span><span class="move-widget-down" tabindex="0">%2$s</span><span class="move-widget-up" tabindex="0">%3$s</span></div>',
     462            __( 'Move to another area&hellip;' ),
     463            __( 'Move down' ),
     464            __( 'Move up' )
    467465        );
    468466
     
    470468            array( '{description}', '{btn}' ),
    471469            array(
    472                 esc_html__( 'Select an area to move this widget into:' ),
    473                 esc_html__( 'Move' ),
     470                ( 'Select an area to move this widget into:' ), // @todo translate
     471                esc_html_x( 'Move', 'move widget' ),
    474472            ),
    475473            '
     
    498496            'available_widgets' => $available_widgets, // @todo Merge this with registered_widgets
    499497            'i18n' => array(
    500                 'save_btn_label' => _x( 'Apply', 'button to save changes to a widget' ),
    501                 'save_btn_tooltip' => _x( 'Save and preview changes before publishing them.', 'tooltip on the widget save button' ),
    502                 'remove_btn_label' => _x( 'Remove', 'link to move a widget to the inactive widgets sidebar' ),
    503                 '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' ),
     498                'save_btn_label' => __( 'Apply' ),
     499                // @todo translate? do we want these tooltips?
     500                'save_btn_tooltip' => ( 'Save and preview changes before publishing them.' ),
     501                'remove_btn_label' => __( 'Remove' ),
     502                'remove_btn_tooltip' => ( 'Trash widget by moving it to the inactive widgets sidebar.' ),
    504503            ),
    505504            'tpl' => array(
     
    734733            'registered_widgets' => $GLOBALS['wp_registered_widgets'],
    735734            'i18n' => array(
    736                 'widget_tooltip' => __( 'Press shift and then click to edit widget in customizer...' ),
     735                'widget_tooltip' => ( 'Shift-click to edit this widget.' ),
    737736            ),
    738737        );
     
    10321031        try {
    10331032            if ( ! check_ajax_referer( self::UPDATE_WIDGET_AJAX_ACTION, self::UPDATE_WIDGET_NONCE_POST_KEY, false ) ) {
    1034                 throw new Widget_Customizer_Exception( __( 'Nonce check failed. Reload and try again?' ) );
     1033                throw new Widget_Customizer_Exception( ( 'Nonce check failed. Reload and try again?' ) );
    10351034            }
    10361035            if ( ! current_user_can( 'edit_theme_options' ) ) {
    1037                 throw new Widget_Customizer_Exception( __( 'Current user cannot!' ) );
     1036                throw new Widget_Customizer_Exception( ( 'Current user cannot!' ) ); // @todo translate
    10381037            }
    10391038            if ( ! isset( $_POST['widget-id'] ) ) {
    1040                 throw new Widget_Customizer_Exception( __( 'Incomplete request' ) );
     1039                throw new Widget_Customizer_Exception( ( 'Incomplete request' ) ); // @todo translate
    10411040            }
    10421041
  • trunk/src/wp-includes/js/customize-views.js

    r27497 r27620  
    136136
    137137        extendedModel: function() {
    138             var c = this.model.get('collection'),
    139                 t = _wpCustomizeHeader.l10n[c.type] || '';
    140 
     138            var c = this.model.get('collection');
    141139            return _.extend(this.model.toJSON(), {
    142140                // -1 to exclude the randomize button
    143                 nImages: c.size() - 1,
    144                 type: t
     141                nImages: c.size() - 1
    145142            });
    146143        },
  • trunk/src/wp-includes/media-template.php

    r27615 r27620  
    513513        <?php
    514514        $playlist_styles = array(
    515             'light' => _x( 'Light', 'light playlist theme' ),
    516             'dark'  => _x( 'Dark', 'dark playlist theme' )
     515            'light' => _x( 'Light', 'playlist theme' ),
     516            'dark'  => _x( 'Dark', 'playlist theme' )
    517517        );
    518518
     
    815815                    <span><?php _e( 'Preload' ); ?></span>
    816816                    <div class="button-group button-large" data-setting="preload">
    817                         <button class="button" value="auto"><?php _e( 'Auto' ); ?></button>
     817                        <button class="button" value="auto"><?php _ex( 'Auto', 'auto preload video' ); ?></button>
    818818                        <button class="button" value="metadata"><?php _e( 'Metadata' ); ?></button>
    819819                        <button class="button active" value="none"><?php _e( 'None' ); ?></button>
     
    920920
    921921                <label class="setting" data-setting="content">
    922                     <span><?php _e( 'Tracks (subtitles, captions, descriptions, chapters or metadata)' ); ?></span>
     922                    <span><?php _e( 'Tracks (subtitles, captions, descriptions, chapters, or metadata)' ); ?></span>
    923923                    <#
    924924                    var content = '';
  • trunk/src/wp-includes/media.php

    r27608 r27620  
    11251125
    11261126    $playlist_styles = array(
    1127         'light' => _x( 'Light', 'light playlist theme' ),
    1128         'dark'  => _x( 'Dark', 'dark playlist theme' )
     1127        'light' => _x( 'Light', 'playlist theme' ),
     1128        'dark'  => _x( 'Dark', 'playlist theme' )
    11291129    );
    11301130
     
    24812481
    24822482        // Crop Image
    2483         /* translators: title for Media Manager library view */
    24842483        'chooseImage' => __( 'Choose Image' ),
    2485         /* translators: button to select an image from the MM library to crop */
    24862484        'selectAndCrop' => __( 'Select and Crop' ),
    2487         /* translators: button to choose not to crop the selected image */
    24882485        'skipCropping' => __( 'Skip Cropping' ),
    2489         /* translators: button to choose to crop the selected image */
    24902486        'cropImage' => __( 'Crop Image' ),
    24912487        'cropYourImage' => __( 'Crop your image' ),
    2492         /* translators: button label changes to this while the image is being cropped server-side */
    2493         'cropping' => __( 'Cropping...' ),
    2494         /* translators: suggested width of header image in pixels */
     2488        'cropping' => __( 'Cropping&hellip;' ),
    24952489        'suggestedWidth' => __( 'Suggested width is %d pixels.' ),
    2496         /* translators: suggested height of header image in pixels */
    24972490        'suggestedHeight' => __( 'Suggested height is %d pixels.' ),
    24982491
  • trunk/src/wp-includes/script-loader.php

    r27615 r27620  
    498498        $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 );
    499499        did_action( 'init' ) && $scripts->localize( 'media', 'attachMediaBoxL10n', array(
    500             'error' => __( 'An error has occured. Please reload the page and try again.' )
     500            'error' => __( 'An error has occurred. Please reload the page and try again.' ),
    501501        ));
    502502
Note: See TracChangeset for help on using the changeset viewer.