Make WordPress Core

Ticket #20491: 20491-applied.diff

File 20491-applied.diff, 199.8 KB (added by swissspidy, 8 years ago)
  • src/wp-admin/js/color-picker.js

    diff --git src/wp-admin/js/color-picker.js src/wp-admin/js/color-picker.js
    index 96f55da..6c423fc 100644
     
    3838                        // Set up HTML structure, hide things
    3939                        el.addClass( 'wp-color-picker' ).hide().wrap( _wrap );
    4040                        self.wrap = el.parent();
    41                         self.toggler = $( _before ).insertBefore( el ).css( { backgroundColor: self.initialValue } ).attr( 'title', wpColorPickerL10n.pick ).attr( 'data-current', wpColorPickerL10n.current );
     41                        self.toggler = $( _before ).insertBefore( el ).css( { backgroundColor: self.initialValue } ).attr( 'title', wp.i18n.__( 'Select Color' ) ).attr( 'data-current', wp.i18n.__( 'Current Color' ) );
    4242                        self.pickerContainer = $( _after ).insertAfter( el );
    4343                        self.button = $( _button );
    4444
    4545                        if ( self.options.defaultColor ) {
    46                                 self.button.addClass( 'wp-picker-default' ).val( wpColorPickerL10n.defaultString );
     46                                self.button.addClass( 'wp-picker-default' ).val( wp.i18n.__( 'Default' ) );
    4747                        } else {
    48                                 self.button.addClass( 'wp-picker-clear' ).val( wpColorPickerL10n.clear );
     48                                self.button.addClass( 'wp-picker-clear' ).val( wp.i18n.__( 'Clear' ) );
    4949                        }
    5050
    5151                        el.wrap( '<span class="wp-picker-input-wrap" />' ).after(self.button);
  • src/wp-admin/js/comment.js

    diff --git src/wp-admin/js/comment.js src/wp-admin/js/comment.js
    index d194148..29ea8f7 100644
    jQuery(document).ready( function($) { 
    4646                }
    4747
    4848                $timestamp.html(
    49                         commentL10n.submittedOn + ' <b>' +
    50                         commentL10n.dateFormat
     49                        wp.i18n.__( 'Submitted on:' ) + ' <b>' +
     50                        /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
     51                        __( '%1$s %2$s, %3$s @ %4$s:%5$s' )
    5152                                .replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) )
    5253                                .replace( '%2$s', parseInt( jj, 10 ) )
    5354                                .replace( '%3$s', aa )
  • src/wp-admin/js/common.js

    diff --git src/wp-admin/js/common.js src/wp-admin/js/common.js
    index 200d3e4..dd3e463 100644
     
    1 /* global setUserSetting, ajaxurl, commonL10n, alert, confirm, pagenow */
     1/* global setUserSetting, ajaxurl, alert, confirm, pagenow */
    22var showNotice, adminMenu, columns, validateForm, screenMeta;
    33( function( $, window, undefined ) {
    44        var $document = $( document ),
    validateForm = function( form ) { 
    8989// stub for doing better warnings
    9090showNotice = {
    9191        warn : function() {
    92                 var msg = commonL10n.warnDelete || '';
     92                var msg = wp.i18n.__( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." );
     93
    9394                if ( confirm(msg) ) {
    9495                        return true;
    9596                }
    $document.ready( function() { 
    404405                $( '.notice.is-dismissible' ).each( function() {
    405406                        var $el = $( this ),
    406407                                $button = $( '<button type="button" class="notice-dismiss"><span class="screen-reader-text"></span></button>' ),
    407                                 btnText = commonL10n.dismiss || '';
     408                                btnText = wp.i18n.__( 'Dismiss this notice.' );
    408409
    409410                        // Ensure plain text
    410411                        $button.find( '.screen-reader-text' ).text( btnText );
  • src/wp-admin/js/customize-controls.js

    diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
    index 7078cfd..4543d28 100644
     
    1 /* global _wpCustomizeHeader, _wpCustomizeBackground, _wpMediaViewsL10n, MediaElementPlayer */
     1/* global _wpCustomizeHeader, _wpCustomizeBackground, MediaElementPlayer */
    22(function( exports, $ ){
    33        var Container, focus, api = wp.customize;
    44
     
    22012201                 * Create a media modal select frame, and store it so the instance can be reused when needed.
    22022202                 */
    22032203                initFrame: function() {
    2204                         var l10n = _wpMediaViewsL10n;
    2205 
    22062204                        this.frame = wp.media({
    22072205                                button: {
    2208                                         text: l10n.select,
     2206                                        text: wp.i18n.__( 'Select' ),
    22092207                                        close: false
    22102208                                },
    22112209                                states: [
     
    23922390                 * Create a media modal select frame, and store it so the instance can be reused when needed.
    23932391                 */
    23942392                initFrame: function() {
    2395                         var l10n = _wpMediaViewsL10n;
    2396 
    23972393                        this.frame = wp.media({
    23982394                                button: {
    2399                                         text: l10n.select,
     2395                                        text: wp.i18n.__( 'Select' ),
    24002396                                        close: false
    24012397                                },
    24022398                                states: [
     
    26482644                 * @param {event} event
    26492645                 */
    26502646                openMedia: function(event) {
    2651                         var l10n = _wpMediaViewsL10n;
    2652 
    26532647                        event.preventDefault();
    26542648
    26552649                        this.frame = wp.media({
    26562650                                button: {
    2657                                         text: l10n.selectAndCrop,
     2651                                        text: wp.i18n.__( 'Select and Crop' ),
    26582652                                        close: false
    26592653                                },
    26602654                                states: [
    26612655                                        new wp.media.controller.Library({
    2662                                                 title:     l10n.chooseImage,
     2656                                                title:     wp.i18n.__( 'Choose Image' ),
    26632657                                                library:   wp.media.query({ type: 'image' }),
    26642658                                                multiple:  false,
    26652659                                                date:      false,
     
    30463040                                response = response.slice( 0, index ) + response.slice( index + signature.length );
    30473041
    30483042                                // Create the iframe and inject the html content.
    3049                                 self.iframe = $( '<iframe />', { 'title': api.l10n.previewIframeTitle } ).appendTo( self.container );
     3043                                self.iframe = $( '<iframe />', { 'title': wp.i18n.__( 'Site Preview' ) } ).appendTo( self.container );
    30503044
    30513045                                // Bind load event after the iframe has been added to the page;
    30523046                                // otherwise it will fire when injected into the DOM.
     
    30923086                                        reject();
    30933087                                }
    30943088
    3095                                 iframe = $( '<iframe />', { 'src': self.previewUrl(), 'title': api.l10n.previewIframeTitle } ).hide();
     3089                                iframe = $( '<iframe />', { 'src': self.previewUrl(), 'title': wp.i18n.__( 'Site Preview' ) } ).hide();
    30963090                                iframe.appendTo( self.container );
    30973091                                iframe.on( 'load', function() {
    30983092                                        self.triedLogin = true;
     
    33643358                                url:     api.settings.url.login
    33653359                        });
    33663360
    3367                         iframe = $( '<iframe />', { 'src': api.settings.url.login, 'title': api.l10n.loginIframeTitle } ).appendTo( this.container );
     3361                        iframe = $( '<iframe />', { 'src': api.settings.url.login, 'title': wp.i18n.__( 'Session expired' ) } ).appendTo( this.container );
    33683362
    33693363                        messenger.targetWindow( iframe[0].contentWindow );
    33703364
     
    33923386
    33933387                cheatin: function() {
    33943388                        $( document.body ).empty().addClass( 'cheatin' ).append(
    3395                                 '<h1>' + api.l10n.cheatin + '</h1>' +
    3396                                 '<p>' + api.l10n.notAllowed + '</p>'
     3389                                '<h1>' + wp.i18n.__( 'Cheatin&#8217; uh?' ) + '</h1>' +
     3390                                '<p>' + wp.i18n.__( 'Sorry, you are not allowed to customize this site.' ) + '</p>'
    33973391                        );
    33983392                },
    33993393
     
    36083602
    36093603        $( function() {
    36103604                api.settings = window._wpCustomizeSettings;
    3611                 api.l10n = window._wpCustomizeControlsL10n;
    36123605
    36133606                // Check if we can run the Customizer.
    36143607                if ( ! api.settings ) {
     
    39213914
    39223915                        state.bind( 'change', function() {
    39233916                                if ( ! activated() ) {
    3924                                         saveBtn.val( api.l10n.activate ).prop( 'disabled', false );
    3925                                         closeBtn.find( '.screen-reader-text' ).text( api.l10n.cancel );
     3917                                        saveBtn.val( wp.i18n.__( 'Save &amp; Activate' ) ).prop( 'disabled', false );
     3918                                        closeBtn.find( '.screen-reader-text' ).text( wp.i18n.__( 'Cancel' ) );
    39263919
    39273920                                } else if ( saved() ) {
    3928                                         saveBtn.val( api.l10n.saved ).prop( 'disabled', true );
    3929                                         closeBtn.find( '.screen-reader-text' ).text( api.l10n.close );
     3921                                        saveBtn.val( wp.i18n.__( 'Saved' ) ).prop( 'disabled', true );
     3922                                        closeBtn.find( '.screen-reader-text' ).text( wp.i18n.__( 'Close' ) );
    39303923
    39313924                                } else {
    3932                                         saveBtn.val( api.l10n.save ).prop( 'disabled', false );
    3933                                         closeBtn.find( '.screen-reader-text' ).text( api.l10n.cancel );
     3925                                        saveBtn.val( wp.i18n.__( 'Save &amp; Publish' ) ).prop( 'disabled', false );
     3926                                        closeBtn.find( '.screen-reader-text' ).text( wp.i18n.__( 'Cancel' ) );
    39343927                                }
    39353928                        });
    39363929
     
    39883981                        overlay.toggleClass( 'collapsed', ! paneVisible );
    39893982
    39903983                        if ( ! paneVisible ) {
    3991                                 $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'false', 'aria-label': api.l10n.expandSidebar });
     3984                                $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'false', 'aria-label': wp.i18n.__( 'Expand Sidebar' ) });
    39923985                        } else {
    3993                                 $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'true', 'aria-label': api.l10n.collapseSidebar });
     3986                                $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'true', 'aria-label': wp.i18n.__( 'Expand Sidebar' ) });
    39943987                        }
    39953988                });
    39963989
     
    40804073                if ( title.length ) {
    40814074                        api( 'blogname', function( setting ) {
    40824075                                var updateTitle = function() {
    4083                                         title.text( $.trim( setting() ) || api.l10n.untitledBlogName );
     4076                                        title.text( $.trim( setting() ) || wp.i18n.__( '(Untitled)' ) );
    40844077                                };
    40854078                                setting.bind( updateTitle );
    40864079                                updateTitle();
     
    41154108                                setTimeout( function() {
    41164109                                        overlay.removeClass( 'customize-loading' );
    41174110                                }, 1 );
    4118                                 return api.l10n.saveAlert;
     4111                                return wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' );
    41194112                        }
    41204113                } );
    41214114
  • src/wp-admin/js/customize-widgets.js

    diff --git src/wp-admin/js/customize-widgets.js src/wp-admin/js/customize-widgets.js
    index 7598023..6d550ca 100644
     
    756756
    757757                                        if ( isMoveUp ) {
    758758                                                self.moveUp();
    759                                                 wp.a11y.speak( l10n.widgetMovedUp );
     759                                                wp.a11y.speak( wp.i18n.__( 'Widget moved up' ) );
    760760                                        } else {
    761761                                                self.moveDown();
    762                                                 wp.a11y.speak( l10n.widgetMovedDown );
     762                                                wp.a11y.speak( wp.i18n.__( 'Widget moved down' ) );
    763763                                        }
    764764
    765765                                        $( this ).focus(); // re-focus after the container was moved
     
    833833
    834834                        // Configure update button
    835835                        $saveBtn = this.container.find( '.widget-control-save' );
    836                         $saveBtn.val( l10n.saveBtnLabel );
    837                         $saveBtn.attr( 'title', l10n.saveBtnTooltip );
     836                        $saveBtn.val( wp.i18n.__( 'Apply' ) );
     837                        $saveBtn.attr( 'title', wp.i18n.__( 'Save and preview changes before publishing them.' ) );
    838838                        $saveBtn.removeClass( 'button-primary' ).addClass( 'button-secondary' );
    839839                        $saveBtn.on( 'click', function( e ) {
    840840                                e.preventDefault();
     
    946946                        } );
    947947
    948948                        replaceDeleteWithRemove = function() {
    949                                 $removeBtn.text( l10n.removeBtnLabel ); // wp_widget_control() outputs the link as "Delete"
    950                                 $removeBtn.attr( 'title', l10n.removeBtnTooltip );
     949                                $removeBtn.text( wp.i18n.__( 'Remove' ) ); // wp_widget_control() outputs the link as "Delete"
     950                                $removeBtn.attr( 'title', wp.i18n.__( 'Trash widget by moving it to the inactive widgets sidebar.' ) );
    951951                        };
    952952
    953953                        if ( this.params.is_new ) {
     
    12231223                                        }
    12241224                                } else {
    12251225                                        // General error message
    1226                                         message = l10n.error;
     1226                                        message = wp.i18n.__( 'An error has occurred. Please reload the page and try again.' );
    12271227
    12281228                                        if ( r.data && r.data.message ) {
    12291229                                                message = r.data.message;
     
    15341534                                        'class': 'no-widget-areas-rendered-notice'
    15351535                                });
    15361536                                noRenderedAreasNotice.append( $( '<em></em>', {
    1537                                         text: l10n.noAreasRendered
     1537                                        text: wp.i18n.__( 'There are no widget areas currently rendered in the preview. Navigate in the preview to a template that makes use of a widget area in order to access its widgets here.' )
    15381538                                } ) );
    15391539                                panelMetaContainer.append( noRenderedAreasNotice );
    15401540
     
    18881888
    18891889                                addNewWidgetBtn.attr({ 'tabindex': '-1', 'aria-hidden': 'true' });
    18901890                                reorderBtn.attr( 'aria-label', l10n.reorderLabelOff );
    1891                                 wp.a11y.speak( l10n.reorderModeOn );
     1891                                wp.a11y.speak( wp.i18n.__( 'Reorder mode enabled' ) );
    18921892                                // Hide widget titles while reordering: title is already in the reorder controls.
    18931893                                widgetsTitle.attr( 'aria-hidden', 'true' );
    18941894                        } else {
    18951895                                addNewWidgetBtn.removeAttr( 'tabindex aria-hidden' );
    18961896                                reorderBtn.attr( 'aria-label', l10n.reorderLabelOn );
    1897                                 wp.a11y.speak( l10n.reorderModeOff );
     1897                                wp.a11y.speak( wp.i18n.__( 'Reorder mode closed' ) );
    18981898                                widgetsTitle.attr( 'aria-hidden', 'false' );
    18991899                        }
    19001900                },
  • src/wp-admin/js/edit-comments.js

    diff --git src/wp-admin/js/edit-comments.js src/wp-admin/js/edit-comments.js
    index 3de0310..6288564 100644
    var getCount, updateCount, updateCountText, updatePending, updateApproved, 
    9898        updateHtmlTitle = function ( diff ) {
    9999                var newTitle, regExMatch, titleCount, commentFrag;
    100100
    101                 titleRegEx = titleRegEx || new RegExp( adminCommentsL10n.docTitleCommentsCount.replace( '%s', '\\([0-9' + thousandsSeparator + ']+\\)' ) + '?' );
     101                /* translators: %s: comments count */
     102                titleRegEx = titleRegEx || new RegExp( wp.i18n.__( 'Comments (%s)' ).replace( '%s', '\\([0-9' + thousandsSeparator + ']+\\)' ) + '?' );
    102103                // count funcs operate on a $'d element
    103104                titleDiv = titleDiv || $( '<div />' );
    104105                newTitle = adminTitle;
    var getCount, updateCount, updateCountText, updatePending, updateApproved, 
    117118                        updateCount( titleDiv, titleCount );
    118119                        regExMatch = titleRegEx.exec( document.title );
    119120                        if ( regExMatch ) {
    120                                 newTitle = document.title.replace( regExMatch[0], adminCommentsL10n.docTitleCommentsCount.replace( '%s', titleDiv.text() ) + ' ' );
     121                                /* translators: %s: comments count */
     122                                newTitle = document.title.replace( regExMatch[0], wp.i18n.__( 'Comments (%s)' ).replace( '%s', titleDiv.text() ) + ' ' );
    121123                        }
    122124                } else {
    123125                        regExMatch = titleRegEx.exec( newTitle );
    124126                        if ( regExMatch ) {
    125                                 newTitle = newTitle.replace( regExMatch[0], adminCommentsL10n.docTitleComments );
     127                                newTitle = newTitle.replace( regExMatch[0], wp.i18n.__( 'Comments' ) );
    126128                        }
    127129                }
    128130                document.title = newTitle;
    setCommentsList = function() { 
    218220
    219221                if ( c.is('.unapproved') ) {
    220222                        if ( settings.data.id == replyID )
    221                                 replyButton.text(adminCommentsL10n.replyApprove);
     223                                replyButton.text( wp.i18n.__( 'Approve and Reply' ) );
    222224
    223225                        c.find( '.row-actions span.view' ).addClass( 'hidden' ).end()
    224226                                .find( 'div.comment_status' ).html( '0' );
    225227
    226228                } else {
    227229                        if ( settings.data.id == replyID )
    228                                 replyButton.text(adminCommentsL10n.reply);
     230                                replyButton.text( wp.i18n.__( 'Reply' ) );
    229231
    230232                        c.find( '.row-actions span.view' ).removeClass( 'hidden' ).end()
    231233                                .find( 'div.comment_status' ).html( '1' );
    commentReply = { 
    607609        },
    608610
    609611        toggle : function(el) {
    610                 if ( 'none' !== $( el ).css( 'display' ) && ( $( '#replyrow' ).parent().is('#com-reply') || window.confirm( adminCommentsL10n.warnQuickEdit ) ) ) {
     612                if ( 'none' !== $( el ).css( 'display' ) && ( $( '#replyrow' ).parent().is('#com-reply') || window.confirm( wp.i18n.__( "Are you sure you want to edit this comment?\nThe changes you made will be lost." ) ) ) ) {
    611613                        $( el ).find( 'a.vim-q' ).click();
    612614                }
    613615        },
    commentReply = { 
    715717                        c.after(editRow);
    716718
    717719                        if ( c.hasClass('unapproved') ) {
    718                                 replyButton.text(adminCommentsL10n.replyApprove);
     720                                replyButton.text( wp.i18n.__( 'Approve and Reply' ) );
    719721                        } else {
    720                                 replyButton.text(adminCommentsL10n.reply);
     722                                replyButton.text( wp.i18n.__( 'Reply' ) );
    721723                        }
    722724
    723725                        $('#replyrow').fadeIn(300, function(){ $(this).show(); });
    commentReply = { 
    875877                        return true;
    876878                }
    877879
    878                 return window.confirm( adminCommentsL10n.warnCommentChanges );
     880                return window.confirm( __( "Are you sure you want to do this?\nThe comment changes you made will be lost." ) );
    879881        }
    880882};
    881883
  • src/wp-admin/js/inline-edit-post.js

    diff --git src/wp-admin/js/inline-edit-post.js src/wp-admin/js/inline-edit-post.js
    index 3a65805..adad7ea 100644
     
    1 /* global inlineEditL10n, ajaxurl, typenow */
     1/* global ajaxurl, typenow */
    22window.wp = window.wp || {};
    33
    44var inlineEditPost;
    inlineEditPost = { 
    9595                        if ( $(this).prop('checked') ) {
    9696                                c = false;
    9797                                var id = $(this).val(), theTitle;
    98                                 theTitle = $('#inline_'+id+' .post_title').html() || inlineEditL10n.notitle;
    99                                 te += '<div id="ttle'+id+'"><a id="_'+id+'" class="ntdelbutton" title="'+inlineEditL10n.ntdeltitle+'">X</a>'+theTitle+'</div>';
     98                                theTitle = $('#inline_'+id+' .post_title').html() || wp.i18n.__( '(no title)' );
     99                                te += '<div id="ttle'+id+'"><a id="_'+id+'" class="ntdelbutton" title="' + wp.i18n.__( 'Remove From Bulk Edit' ) + '">X</a>'+theTitle+'</div>';
    100100                        }
    101101                });
    102102
    inlineEditPost = { 
    116116                if ( 'post' === type ) {
    117117                        // support multi taxonomies?
    118118                        tax = 'post_tag';
    119                         $('tr.inline-editor textarea[name="tax_input['+tax+']"]').suggest( ajaxurl + '?action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma } );
     119                        $('tr.inline-editor textarea[name="tax_input['+tax+']"]').suggest( ajaxurl + '?action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: wp.i18n._x( ',', 'tag delimiter' ).trim() } );
    120120                }
    121121                $('html, body').animate( { scrollTop: 0 }, 'fast' );
    122122        },
    inlineEditPost = { 
    184184                        var terms = $(this),
    185185                                taxname = $(this).attr('id').replace('_' + id, ''),
    186186                                textarea = $('textarea.tax_input_' + taxname, editRow),
    187                                 comma = inlineEditL10n.comma;
     187                                comma = wp.i18n._x( ',', 'tag delimiter' ).trim();
    188188
    189189                        terms.find( 'img' ).replaceWith( function() { return this.alt; } );
    190190                        terms = terms.text();
    inlineEditPost = { 
    196196                                textarea.val(terms);
    197197                        }
    198198
    199                         textarea.suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma } );
     199                        textarea.suggest( ajaxurl + '?action=ajax-tag-search&tax=' + taxname, { delay: 500, minchars: 2, multiple: true, multipleSep: wp.i18n._x( ',', 'tag delimiter' ).trim() } );
    200200                });
    201201
    202202                // handle the post status
    inlineEditPost = { 
    276276                                                $( inlineEditPost.what + id ).hide().fadeIn( 400, function() {
    277277                                                        // Move focus back to the Quick Edit link. $( this ) is the row being animated.
    278278                                                        $( this ).find( '.editinline' ).focus();
    279                                                         wp.a11y.speak( inlineEditL10n.saved );
     279                                                        wp.a11y.speak( wp.i18n.__( 'Changes saved.' ) );
    280280                                                });
    281281                                        } else {
    282282                                                r = r.replace( /<.[^<>]*?>/g, '' );
    inlineEditPost = { 
    284284                                                wp.a11y.speak( $errorSpan.text() );
    285285                                        }
    286286                                } else {
    287                                         $errorSpan.html( inlineEditL10n.error ).show();
    288                                         wp.a11y.speak( inlineEditL10n.error );
     287                                        $errorSpan.html( wp.i18n.__( 'Error while saving the changes.' ) ).show();
     288                                        wp.a11y.speak( wp.i18n.__( 'Error while saving the changes.' ), 'polite' );
    289289                                }
    290290                        },
    291291                'html');
  • src/wp-admin/js/inline-edit-tax.js

    diff --git src/wp-admin/js/inline-edit-tax.js src/wp-admin/js/inline-edit-tax.js
    index 3bbf4fb..26587f0 100644
     
    1 /* global inlineEditL10n, ajaxurl */
     1/* global ajaxurl */
    22window.wp = window.wp || {};
    33
    44var inlineEditTax;
    inlineEditTax = { 
    123123                                                row.hide().fadeIn( 400, function() {
    124124                                                        // Move focus back to the Quick Edit link.
    125125                                                        row.find( '.editinline' ).focus();
    126                                                         wp.a11y.speak( inlineEditL10n.saved );
     126                                                        wp.a11y.speak( wp.i18n.__( 'Changes saved.' ), 'polite' );
    127127                                                });
    128128
    129129                                        } else {
    inlineEditTax = { 
    132132                                                wp.a11y.speak( $errorSpan.text() );
    133133                                        }
    134134                                } else {
    135                                         $errorSpan.html( inlineEditL10n.error ).show();
    136                                         wp.a11y.speak( inlineEditL10n.error );
     135                                        $errorSpan.html( wp.i18n.__( 'Error while saving the changes.' ) ).show();
     136                                        wp.a11y.speak( wp.i18n.__( 'Error while saving the changes.' ), 'polite' );
    137137                                }
    138138                        }
    139139                );
  • src/wp-admin/js/media.js

    diff --git src/wp-admin/js/media.js src/wp-admin/js/media.js
    index e23adeb..77e0508 100644
     
    1 /* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice */
     1/* global ajaxurl, _wpMediaGridSettings, showNotice */
    22
    33var findPosts;
    44( function( $ ){
    var findPosts; 
    6161                                spinner.removeClass( 'is-active' );
    6262                        }).done( function( x ) {
    6363                                if ( ! x.success ) {
    64                                         $( '#find-posts-response' ).text( attachMediaBoxL10n.error );
     64                                        $( '#find-posts-response' ).text( wp.i18n.__( 'Could not load the preview image. Please reload the page and try again.' ) );
    6565                                }
    6666
    6767                                $( '#find-posts-response' ).html( x.data );
    6868                        }).fail( function() {
    69                                 $( '#find-posts-response' ).text( attachMediaBoxL10n.error );
     69                                $( '#find-posts-response' ).text( wp.i18n.__( 'Could not load the preview image. Please reload the page and try again.' ) );
    7070                        });
    7171                }
    7272        };
  • src/wp-admin/js/nav-menu.js

    diff --git src/wp-admin/js/nav-menu.js src/wp-admin/js/nav-menu.js
    index 5a685a3..f62146e 100644
     
    88 * @subpackage Administration
    99 */
    1010
    11 /* global menus, postboxes, columns, isRtl, navMenuL10n, ajaxurl */
     11/* global menus, postboxes, columns, isRtl, ajaxurl */
    1212
    1313var wpNavMenu;
    1414
    var wpNavMenu; 
    577577                                if ( title ) {
    578578                                        titleEl.text( title ).removeClass( 'no-title' );
    579579                                } else {
    580                                         titleEl.text( navMenuL10n.untitled ).addClass( 'no-title' );
     580                                        titleEl.text( wp.i18n._x( '(no label)', 'missing menu item navigation label' ) ).addClass( 'no-title' );
    581581                                }
    582582                        } );
    583583                },
    var wpNavMenu; 
    10191019                        if ( 0 !== $('#menu-to-edit').length || 0 !== $('.menu-location-menus select').length ) {
    10201020                                window.onbeforeunload = function(){
    10211021                                        if ( api.menusChanged )
    1022                                                 return navMenuL10n.saveAlert;
     1022                                                return wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' );
    10231023                                };
    10241024                        } else {
    10251025                                // Make the post boxes read-only, as they can't be used yet
    var wpNavMenu; 
    11591159
    11601160                eventOnClickMenuDelete : function() {
    11611161                        // Delete warning AYS
    1162                         if ( window.confirm( navMenuL10n.warnDeleteMenu ) ) {
     1162                        if ( window.confirm( wp.i18n.__( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ) ) ) {
    11631163                                window.onbeforeunload = null;
    11641164                                return true;
    11651165                        }
    var wpNavMenu; 
    11891189                        $item;
    11901190
    11911191                        if( ! $items.length ) {
    1192                                 $('.categorychecklist', panel).html( '<li><p>' + navMenuL10n.noResultsFound + '</p></li>' );
     1192                                $('.categorychecklist', panel).html( '<li><p>' + wp.i18n.__( 'No results found.' ) + '</p></li>' );
    11931193                                $( '.spinner', panel ).removeClass( 'is-active' );
    11941194                                return;
    11951195                        }
  • src/wp-admin/js/plugin-install.js

    diff --git src/wp-admin/js/plugin-install.js src/wp-admin/js/plugin-install.js
    index 71b0e70..a32d5dc 100644
     
    1 /* global plugininstallL10n, tb_click, tb_remove */
     1/* global tb_click, tb_remove */
    22
    33/**
    44 * Functionality for the plugin install screens.
    jQuery( document ).ready( function( $ ) { 
    139139        // Open the Plugin details modal.
    140140        $( '.thickbox.open-plugin-details-modal' ).on( 'click', function( e ) {
    141141                // The `data-title` attribute is used only in the Plugin screens.
    142                 var title = $( this ).data( 'title' ) ? plugininstallL10n.plugin_information + ' ' + $( this ).data( 'title' ) : plugininstallL10n.plugin_modal_label;
     142                var title = $( this ).data( 'title' ) ? wp.i18n.__( 'Plugin:' ) + ' ' + $( this ).data( 'title' ) : wp.i18n.__( 'Plugin details' );
    143143
    144144                e.preventDefault();
    145145                e.stopPropagation();
    jQuery( document ).ready( function( $ ) { 
    152152                // Set ARIA role and ARIA label.
    153153                tbWindow.attr({
    154154                        'role': 'dialog',
    155                         'aria-label': plugininstallL10n.plugin_modal_label
     155                        'aria-label': wp.i18n.__( 'Plugin details' )
    156156                });
    157157
    158158                // Set title attribute on the iframe.
  • src/wp-admin/js/post.js

    diff --git src/wp-admin/js/post.js src/wp-admin/js/post.js
    index 5ca772b..94739b4 100644
     
    1 /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */
     1/* global ajaxurl, wpAjax, postboxes, pagenow, tinymce, alert, deleteUserSetting */
    22/* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply */
    33
    44var commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink;
    commentsBox = { 
    4646                                        if ( commentsBox.st > commentsBox.total )
    4747                                                $('#show-comments').hide();
    4848                                        else
    49                                                 $('#show-comments').show().children('a').html(postL10n.showcomm);
     49                                                $('#show-comments').show().children('a').html( wp.i18n.__( 'Show more comments' ) );
    5050
    5151                                        return;
    5252                                } else if ( 1 == r ) {
    53                                         $('#show-comments').html(postL10n.endcomm);
     53                                        $('#show-comments').html( wp.i18n.__( 'No more comments found.' ) );
    5454                                        return;
    5555                                }
    5656
    WPRemoveThumbnail = function(nonce){ 
    8383                action: 'set-post-thumbnail', post_id: $( '#post_ID' ).val(), thumbnail_id: -1, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie )
    8484        }, function(str){
    8585                if ( str == '0' ) {
    86                         alert( setPostThumbnailL10n.error );
     86                        alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) );
    8787                } else {
    8888                        WPSetThumbnailHTML(str);
    8989                }
    jQuery(document).ready( function($) { 
    379379                        $submitButtons.removeClass( 'disabled' );
    380380                }
    381381        }).on( 'before-autosave.edit-post', function() {
    382                 $( '.autosave-message' ).text( postL10n.savingText );
     382                $( '.autosave-message' ).text( wp.i18n.__( 'Saving...' ) ); // No ellipsis.
    383383        }).on( 'after-autosave.edit-post', function( event, data ) {
    384384                $( '.autosave-message' ).text( data.message );
    385385
    jQuery(document).ready( function($) { 
    394394                if ( ( editor && ! editor.isHidden() && editor.isDirty() ) ||
    395395                        ( wp.autosave && wp.autosave.server.postChanged() ) ) {
    396396
    397                         return postL10n.saveAlert;
     397                        return wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' );
    398398                }
    399399        }).on( 'unload.edit-post', function( event ) {
    400400                if ( ! releaseLock ) {
    jQuery(document).ready( function($) { 
    576576                        }
    577577
    578578                        if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) {
    579                                 publishOn = postL10n.publishOnFuture;
    580                                 $('#publish').val( postL10n.schedule );
     579                                publishOn = wp.i18n.__( 'Schedule for:' );
     580                                $('#publish').val( wp.i18n.__( 'Schedule' ) );
    581581                        } else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' ) {
    582                                 publishOn = postL10n.publishOn;
    583                                 $('#publish').val( postL10n.publish );
     582                                publishOn = wp.i18n.__( 'Publish on:' );
     583                                $('#publish').val( wp.i18n.__( 'Publish' ) );
    584584                        } else {
    585                                 publishOn = postL10n.publishOnPast;
    586                                 $('#publish').val( postL10n.update );
     585                                publishOn = wp.i18n.__( 'Published on:' );
     586                                $('#publish').val( wp.i18n.__( 'Update' ) );
    587587                        }
    588588                        if ( originalDate.toUTCString() == attemptedDate.toUTCString() ) { //hack
    589589                                $('#timestamp').html(stamp);
    590590                        } else {
    591591                                $('#timestamp').html(
    592592                                        '\n' + publishOn + ' <b>' +
    593                                         postL10n.dateFormat
     593                                        /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
     594                                        wp.i18n.__( '%1$s %2$s, %3$s @ %4$s:%5$s' )
    594595                                                .replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) )
    595596                                                .replace( '%2$s', parseInt( jj, 10 ) )
    596597                                                .replace( '%3$s', aa )
    jQuery(document).ready( function($) { 
    601602                        }
    602603
    603604                        if ( $postVisibilitySelect.find('input:radio:checked').val() == 'private' ) {
    604                                 $('#publish').val( postL10n.update );
     605                                $('#publish').val( wp.i18n.__( 'Update' ) );
    605606                                if ( 0 === optPublish.length ) {
    606                                         postStatus.append('<option value="publish">' + postL10n.privatelyPublished + '</option>');
     607                                        postStatus.append('<option value="publish">' + wp.i18n.__( 'Privately Published' ) + '</option>');
    607608                                } else {
    608                                         optPublish.html( postL10n.privatelyPublished );
     609                                        optPublish.html( wp.i18n.__( 'Privately Published' ) );
    609610                                }
    610611                                $('option[value="publish"]', postStatus).prop('selected', true);
    611612                                $('#misc-publishing-actions .edit-post-status').hide();
    jQuery(document).ready( function($) { 
    616617                                                postStatus.val($('#hidden_post_status').val());
    617618                                        }
    618619                                } else {
    619                                         optPublish.html( postL10n.published );
     620                                        optPublish.html( wp.i18n.__( 'Published' ) );
    620621                                }
    621622                                if ( postStatus.is(':hidden') )
    622623                                        $('#misc-publishing-actions .edit-post-status').show();
    jQuery(document).ready( function($) { 
    627628                        } else {
    628629                                $('#save-post').show();
    629630                                if ( $('option:selected', postStatus).val() == 'pending' ) {
    630                                         $('#save-post').show().val( postL10n.savePending );
     631                                        $('#save-post').show().val( wp.i18n.__( 'Save as Pending' ) );
    631632                                } else {
    632                                         $('#save-post').show().val( postL10n.saveDraft );
     633                                        $('#save-post').show().val( wp.i18n.__( 'Save Draft' ) );
    633634                                }
    634635                        }
    635636                        return true;
    jQuery(document).ready( function($) { 
    658659                });
    659660
    660661                $postVisibilitySelect.find('.save-post-visibility').click( function( event ) { // crazyhorse - multiple ok cancels
     662                        var visibility;
     663
    661664                        $postVisibilitySelect.slideUp('fast');
    662665                        $('#visibility .edit-visibility').show().focus();
    663666                        updateText();
    jQuery(document).ready( function($) { 
    666669                                $('#sticky').prop('checked', false);
    667670                        } // WEAPON LOCKED
    668671
    669                         if ( $('#sticky').prop('checked') ) {
    670                                 sticky = 'Sticky';
    671                         } else {
    672                                 sticky = '';
     672                        switch ( $postVisibilitySelect.find( 'input:radio:checked' ).val() ) {
     673                                case 'password':
     674                                        visibility = wp.i18n.__( 'Password Protected' );
     675                                        break;
     676                                case 'private':
     677                                        visibility = wp.i18n.__( 'Private' );
     678                                        break;
     679                                default:
     680                                        visibility = $( '#sticky' ).prop( 'checked' ) ? wp.i18n.__( 'Public, Sticky' ) : wp.i18n.__( 'Public' );
     681                                        break;
    673682                        }
    674683
    675                         $('#post-visibility-display').html(     postL10n[ $postVisibilitySelect.find('input:radio:checked').val() + sticky ]    );
     684                        $('#post-visibility-display').html(     visibility );
    676685                        event.preventDefault();
    677686                });
    678687
    jQuery(document).ready( function($) { 
    768777                $el = $( '#editable-post-name' );
    769778                revert_e = $el.html();
    770779
    771                 buttons.html( '<button type="button" class="save button button-small">' + postL10n.ok + '</button> <button type="button" class="cancel button-link">' + postL10n.cancel + '</button>' );
     780                buttons.html( '<button type="button" class="save button button-small">' + wp.i18n.__( 'OK' ) + '</button> <button type="button" class="cancel button-link">' + wp.i18n.__( 'Cancel' ) + '</button>' );
    772781                buttons.children( '.save' ).click( function() {
    773782                        var new_slug = $el.children( 'input' ).val();
    774783
    jQuery(document).ready( function($) { 
    795804                                permalink.html(permalinkOrig);
    796805                                real_slug.val(new_slug);
    797806                                $( '.edit-slug' ).focus();
    798                                 wp.a11y.speak( postL10n.permalinkSaved );
     807                                wp.a11y.speak( wp.i18n.__( 'Permalink saved' ), 'polite' );
    799808                        });
    800809                });
    801810
  • src/wp-admin/js/postbox.js

    diff --git src/wp-admin/js/postbox.js src/wp-admin/js/postbox.js
    index a8222ee..691e231 100644
    var postboxes; 
    202202                                        t.removeClass('empty-container');
    203203                                }
    204204                                else {
    205                                         t.addClass('empty-container');
    206                                         t.attr('data-emptyString', postBoxL10n.postBoxEmptyString);
     205                                        t.addClass( 'empty-container' );
     206                                        t.attr( 'data-emptyString', wp.i18n.__( 'Drag boxes here' ) );
    207207                                }
    208208                        });
    209209
  • src/wp-admin/js/press-this.js

    diff --git src/wp-admin/js/press-this.js src/wp-admin/js/press-this.js
    index bf2e830..e85ac64 100644
     
    4242                 *************************************************************** */
    4343
    4444                /**
    45                  * Emulates our PHP __() gettext function, powered by the strings exported in pressThisL10n.
    46                  *
    47                  * @param key string Key of the string to be translated, as found in pressThisL10n.
    48                  * @returns string Original or translated string, or empty string if no key.
    49                  */
    50                 function __( key ) {
    51                         if ( key && window.pressThisL10n ) {
    52                                 return window.pressThisL10n[key] || key;
    53                         }
    54 
    55                         return key || '';
    56                 }
    57 
    58                 /**
    5945                 * Strips HTML tags
    6046                 *
    6147                 * @param string string Text to have the HTML tags striped out of.
     
    301287                                        }
    302288                                }
    303289                        }).fail( function() {
    304                                 renderError( __( 'serverError' ) );
     290                                renderError( wp.i18n.__( 'Connection lost or the server is busy. Please try again later.' ) );
    305291                        });
    306292                }
    307293
     
    451437                        var $element = $mediaThumbWrap.clone().addClass( 'is-image' );
    452438
    453439                        $element.attr( 'data-wp-src', src ).css( 'background-image', 'url(' + displaySrc + ')' )
    454                                 .find( 'span' ).text( __( 'suggestedImgAlt' ).replace( '%d', i + 1 ) );
     440                                /* translators: %d: nth image found in a post */
     441                                .find( 'span' ).text( wp.i18n.__( 'Suggested image #%d' ).replace( '%d', i + 1 ) );
    455442
    456443                        $mediaList.append( $element );
    457444                }
     
    490477                                                cssClass += ' is-video';
    491478                                        }
    492479
    493                                         $element.attr( 'data-wp-src', src ).find( 'span' ).text( __( 'suggestedEmbedAlt' ).replace( '%d', i + 1 ) );
     480                                        /* translators: %d: nth embed found in a post */
     481                                        $element.attr( 'data-wp-src', src ).find( 'span' ).text( wp.i18n.__( 'Suggested embed #%d' ).replace( '%d', i + 1 ) );
    494482
    495483                                        if ( displaySrc ) {
    496484                                                $element.css( 'background-image', 'url(' + displaySrc + ')' );
     
    854842
    855843                        $window.on( 'beforeunload.press-this', function() {
    856844                                if ( saveAlert || ( editor && editor.isDirty() ) ) {
    857                                         return __( 'saveAlert' );
     845                                        return wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' );
    858846                                }
    859847                        } ).on( 'resize.press-this', function() {
    860848                                if ( ! editor || editor.isHidden() ) {
  • src/wp-admin/js/set-post-thumbnail.js

    diff --git src/wp-admin/js/set-post-thumbnail.js src/wp-admin/js/set-post-thumbnail.js
    index 68abbcc..27c032b 100644
     
    1 /* global setPostThumbnailL10n, ajaxurl, post_id, alert */
     1/* global ajaxurl, post_id, alert */
    22/* exported WPSetAsThumbnail */
    33
    44function WPSetAsThumbnail( id, nonce ) {
    55        var $link = jQuery('a#wp-post-thumbnail-' + id);
    66
    7         $link.text( setPostThumbnailL10n.saving );
     7        $link.text( wp.i18n.__( 'Saving...' ) ); // No ellipsis.
    88        jQuery.post(ajaxurl, {
    99                action: 'set-post-thumbnail', post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie )
    1010        }, function(str){
    1111                var win = window.dialogArguments || opener || parent || top;
    12                 $link.text( setPostThumbnailL10n.setThumbnail );
     12                $link.text( wp.i18n.__( 'Use as featured image' ) );
    1313                if ( str == '0' ) {
    14                         alert( setPostThumbnailL10n.error );
     14                        alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) );
    1515                } else {
    1616                        jQuery('a.wp-post-thumbnail').show();
    17                         $link.text( setPostThumbnailL10n.done );
     17                        $link.text( wp.i18n.__( 'Done' ) );
    1818                        $link.fadeOut( 2000 );
    1919                        win.WPSetThumbnailID(id);
    2020                        win.WPSetThumbnailHTML(str);
  • src/wp-admin/js/tags-box.js

    diff --git src/wp-admin/js/tags-box.js src/wp-admin/js/tags-box.js
    index af823ac..8766ec7 100644
    var tagBox, array_unique_noempty; 
    2121
    2222        tagBox = {
    2323                clean : function(tags) {
    24                         var comma = window.tagsBoxL10n.tagDelimiter;
     24                        var comma = wp.i18n._x( ',', 'tag delimiter' );
    2525                        if ( ',' !== comma )
    2626                                tags = tags.replace(new RegExp(comma, 'g'), ',');
    2727                        tags = tags.replace(/\s*,\s*/g, ',').replace(/,+/g, ',').replace(/[,\s]+$/, '').replace(/^[,\s]+/, '');
    var tagBox, array_unique_noempty; 
    3535                                num = id.split('-check-num-')[1],
    3636                                taxbox = $(el).closest('.tagsdiv'),
    3737                                thetags = taxbox.find('.the-tags'),
    38                                 comma = window.tagsBoxL10n.tagDelimiter,
     38                                comma = wp.i18n._x( ',', 'tag delimiter' ),
    3939                                current_tags = thetags.val().split( comma ),
    4040                                new_tags = [];
    4141
    var tagBox, array_unique_noempty; 
    6565
    6666                        disabled = thetags.prop('disabled');
    6767
    68                         current_tags = thetags.val().split( window.tagsBoxL10n.tagDelimiter );
     68                        current_tags = thetags.val().split( wp.i18n._x( ',', 'tag delimiter' ) );
    6969                        tagchecklist.empty();
    7070
    7171                        $.each( current_tags, function( key, val ) {
    var tagBox, array_unique_noempty; 
    107107                        var tagsval, newtags, text,
    108108                                tags = $( '.the-tags', el ),
    109109                                newtag = $( 'input.newtag', el ),
    110                                 comma = window.tagsBoxL10n.tagDelimiter;
     110                                comma = wp.i18n._x( ',', 'tag delimiter' );
    111111
    112112                        a = a || false;
    113113
    var tagBox, array_unique_noempty; 
    177177                                var tax = $(this).closest('div.tagsdiv').attr('id');
    178178                                $(this).suggest(
    179179                                        ajaxurl + '?action=ajax-tag-search&tax=' + tax,
    180                                         { delay: 500, minchars: 2, multiple: true, multipleSep: window.tagsBoxL10n.tagDelimiter }
     180                                        { delay: 500, minchars: 2, multiple: true, multipleSep: wp.i18n._x( ',', 'tag delimiter' ) }
    181181                                );
    182182                        });
    183183
  • src/wp-admin/js/tags.js

    diff --git src/wp-admin/js/tags.js src/wp-admin/js/tags.js
    index 333a2eb..5628ad0 100644
    jQuery(document).ready(function($) { 
    1616                                        $('select#parent option[value="' + data.match(/tag_ID=(\d+)/)[1] + '"]').remove();
    1717                                        $('a.tag-link-' + data.match(/tag_ID=(\d+)/)[1]).remove();
    1818                                } else if ( '-1' == r ) {
    19                                         $('#ajax-response').empty().append('<div class="error"><p>' + tagsl10n.noPerm + '</p></div>');
     19                                        $('#ajax-response').empty().append('<div class="error"><p>' + wp.i18n.__( 'Sorry, you are not allowed to do that.' ) + '</p></div>');
    2020                                        tr.children().css('backgroundColor', '');
    2121                                } else {
    22                                         $('#ajax-response').empty().append('<div class="error"><p>' + tagsl10n.broken + '</p></div>');
     22                                        $('#ajax-response').empty().append('<div class="error"><p>' + wp.i18n.__( 'An unidentified error has occurred.' ) + '</p></div>');
    2323                                        tr.children().css('backgroundColor', '');
    2424                                }
    2525                        });
  • src/wp-admin/js/theme.js

    diff --git src/wp-admin/js/theme.js src/wp-admin/js/theme.js
    index 55706b3..77209ef 100644
    window.wp = window.wp || {}; 
    44( function($) {
    55
    66// Set up our namespace...
    7 var themes, l10n;
    8 themes = wp.themes = wp.themes || {};
     7var themes = wp.themes = wp.themes || {};
    98
    109// Store the theme data and settings for organized and quick access
    11 // themes.data.settings, themes.data.themes, themes.data.l10n
     10// themes.data.settings, themes.data.themes
    1211themes.data = _wpThemeSettings;
    13 l10n = themes.data.l10n;
    1412
    1513// Shortcut for isInstall check
    1614themes.isInstall = !! themes.data.settings.isInstall;
    themes.view.Appearance = wp.Backbone.View.extend({ 
    104102                // Render and append after screen title
    105103                view.render();
    106104                this.searchContainer
    107                         .append( $.parseHTML( '<label class="screen-reader-text" for="wp-filter-search-input">' + l10n.search + '</label>' ) )
     105                        .append( $.parseHTML( '<label class="screen-reader-text" for="wp-filter-search-input">' + wp.i18n.__( 'Search Themes' ) + '</label>' ) )
    108106                        .append( view.el );
    109107        },
    110108
    themes.view.Preview = themes.view.Details.extend({ 
    916914        collapse: function( event ) {
    917915                var $button = $( event.currentTarget );
    918916                if ( 'true' === $button.attr( 'aria-expanded' ) ) {
    919                         $button.attr({ 'aria-expanded': 'false', 'aria-label': l10n.expandSidebar });
     917                        $button.attr({ 'aria-expanded': 'false', 'aria-label': wp.i18n.__( 'Expand Sidebar' ) });
    920918                } else {
    921                         $button.attr({ 'aria-expanded': 'true', 'aria-label': l10n.collapseSidebar });
     919                        $button.attr({ 'aria-expanded': 'true', 'aria-label': wp.i18n.__( 'Collapse Sidebar' ) });
    922920                }
    923921
    924922                this.$el.toggleClass( 'collapsed' ).toggleClass( 'expanded' );
    themes.view.Themes = wp.Backbone.View.extend({ 
    11551153
    11561154                // 'Add new theme' element shown at the end of the grid
    11571155                if ( ! themes.isInstall && themes.data.settings.canInstall ) {
    1158                         this.$el.append( '<div class="theme add-new-theme"><a href="' + themes.data.settings.installURI + '"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">' + l10n.addNew + '</h2></a></div>' );
     1156                        this.$el.append( '<div class="theme add-new-theme"><a href="' + themes.data.settings.installURI + '"><div class="theme-screenshot"><span></span></div><h2 class="theme-name">' + wp.i18n.__( 'Add New Theme' ) + '</h2></a></div>' );
    11591157                }
    11601158
    11611159                this.parent.page++;
    themes.view.Themes = wp.Backbone.View.extend({ 
    12111209                                $modal.find( '.notice-warning' )
    12121210                                        .removeClass( 'notice-large' )
    12131211                                        .addClass( 'updating-message' )
    1214                                         .find( 'p' ).text( wp.updates.l10n.updating );
     1212                                        .find( 'p' ).text( wp.i18n.__( 'Updating...' ) );
    12151213                        } else if ( $card.find( '.notice-error' ).length ) {
    12161214                                $modal.find( '.notice-warning' ).remove();
    12171215                        }
    themes.view.Themes = wp.Backbone.View.extend({ 
    12871285        // Dispatch audible search results feedback message
    12881286        announceSearchResults: function( count ) {
    12891287                if ( 0 === count ) {
    1290                         wp.a11y.speak( l10n.noThemesFound );
     1288                        wp.a11y.speak( __( 'No themes found. Try a different search.' ), 'polite' );
    12911289                } else {
    1292                         wp.a11y.speak( l10n.themesFound.replace( '%d', count ) );
     1290                        wp.a11y.speak( wp.i18n._n( '%d Theme found', '%d Themes found', count ).replace( '%d', count ), 'polite' );
    12931291                }
    12941292        }
    12951293});
    themes.view.Search = wp.Backbone.View.extend({ 
    13031301        searching: false,
    13041302
    13051303        attributes: {
    1306                 placeholder: l10n.searchPlaceholder,
     1304                placeholder: __( 'Search themes...' ), // No ellipsis.
    13071305                type: 'search',
    13081306                'aria-describedby': 'live-search-desc'
    13091307        },
    themes.view.Installer = themes.view.Appearance.extend({ 
    15841582                this.listenTo( this.collection, 'query:fail', function() {
    15851583                        $( 'body' ).removeClass( 'loading-content' );
    15861584                        $( '.theme-browser' ).find( 'div.error' ).remove();
    1587                         $( '.theme-browser' ).find( 'div.themes' ).before( '<div class="error"><p>' + l10n.error + '</p></div>' );
     1585                        $( '.theme-browser' ).find( 'div.themes' ).before( '<div class="error"><p>' + wp.i18n.__( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) + '</p></div>' );
    15881586                });
    15891587
    15901588                if ( this.view ) {
  • src/wp-admin/js/updates.js

    diff --git src/wp-admin/js/updates.js src/wp-admin/js/updates.js
    index 239829f..6298c7f 100644
     
    1414 * @param {object}  wp                                  WP object.
    1515 * @param {object}  settings                            WP Updates settings.
    1616 * @param {string}  settings.ajax_nonce                 AJAX nonce.
    17  * @param {object}  settings.l10n                       Translation strings.
     17 * @param {bool}    settings.isNetworkAdmin             Whether we're in the network admin or not.
    1818 * @param {object=} settings.plugins                    Base names of plugins in their different states.
    1919 * @param {Array}   settings.plugins.all                Base names of all plugins.
    2020 * @param {Array}   settings.plugins.active             Base names of active plugins.
     
    5050        wp.updates.ajaxNonce = settings.ajax_nonce;
    5151
    5252        /**
    53          * Localized strings.
     53         * Whether we're in the network admin or not.
    5454         *
    55          * @since 4.2.0
     55         * @since 4.7.0
    5656         *
    57          * @type {object}
     57         * @type {bool}
    5858         */
    59         wp.updates.l10n = settings.l10n;
     59        wp.updates.isNetworkAdmin = settings.isNetworkAdmin;
    6060
    6161        /**
    6262         * Current search term.
     
    351351                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
    352352                        $updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' );
    353353                        $message   = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' );
    354                         message    = wp.updates.l10n.updatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() );
     354                        /* translators: %s: Plugin name and version */
     355                        message    = wp.i18n.__( 'Updating %s...' ).replace( '%s', $updateRow.find( '.plugin-title strong' ).text() );
    355356                } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
    356357                        $card    = $( '.plugin-card-' + args.slug );
    357358                        $message = $card.find( '.update-now' ).addClass( 'updating-message' );
    358                         message  = wp.updates.l10n.updatingLabel.replace( '%s', $message.data( 'name' ) );
     359                        /* translators: %s: Plugin name and version */
     360                        message  = wp.i18n.__( 'Updating %s...' ).replace( '%s', $message.data( 'name' ) );
    359361
    360362                        // Remove previous error messages, if any.
    361363                        $card.removeClass( 'plugin-card-update-failed' ).find( '.notice.notice-error' ).remove();
    362364                }
    363365
    364                 if ( $message.html() !== wp.updates.l10n.updating ) {
     366                if ( $message.html() !== wp.i18n.__( 'Updating...' ) ) {
    365367                        $message.data( 'originaltext', $message.html() );
    366368                }
    367369
    368370                $message
    369371                        .attr( 'aria-label', message )
    370                         .text( wp.updates.l10n.updating );
     372                        .text( wp.i18n.__( 'Updating...' ) );
    371373
    372374                $document.trigger( 'wp-plugin-updating', args );
    373375
     
    409411                }
    410412
    411413                $updateMessage
    412                         .attr( 'aria-label', wp.updates.l10n.updatedLabel.replace( '%s', response.pluginName ) )
    413                         .text( wp.updates.l10n.updated );
     414                        /* translators: %s: Plugin name and version */
     415                        .attr( 'aria-label', wp.i18n.__( '%s updated!' ).replace( '%s', response.pluginName ) )
     416                        .text( wp.i18n.__( 'Updated!' ) );
    414417
    415                 wp.a11y.speak( wp.updates.l10n.updatedMsg, 'polite' );
     418                /* translators: JavaScript accessible string */
     419                wp.a11y.speak( wp.i18n.__( 'Update completed successfully.' ), 'polite' );
    416420
    417421                wp.updates.decrementCount( 'plugin' );
    418422
     
    444448                        return;
    445449                }
    446450
    447                 errorMessage = wp.updates.l10n.updateFailed.replace( '%s', response.errorMessage );
     451                /* translators: %s: Error string for a failed update */
     452                errorMessage = wp.i18n.__( 'Update Failed: %s' ).replace( '%s', response.errorMessage );
    448453
    449454                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
    450455                        if ( response.plugin ) {
     
    456461
    457462                        if ( response.pluginName ) {
    458463                                $message.find( 'p' )
    459                                         .attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', response.pluginName ) );
     464                                        /* translators: %s: Plugin name and version */
     465                                        .attr( 'aria-label', wp.i18n.__( '%s update failed' ).replace( '%s', response.pluginName ) );
    460466                        } else {
    461467                                $message.find( 'p' ).removeAttr( 'aria-label' );
    462468                        }
     
    469475                                } ) );
    470476
    471477                        $card.find( '.update-now' )
    472                                 .text( wp.updates.l10n.updateFailedShort ).removeClass( 'updating-message' );
     478                                .text( wp.i18n.__( 'Update Failed!' ) ).removeClass( 'updating-message' );
    473479
    474480                        if ( response.pluginName ) {
    475481                                $card.find( '.update-now' )
    476                                         .attr( 'aria-label', wp.updates.l10n.updateFailedLabel.replace( '%s', response.pluginName ) );
     482                                        /* translators: %s: Plugin name and version */
     483                                        .attr( 'aria-label', wp.i18n.__( '%s update failed' ).replace( '%s', response.pluginName ) );
    477484                        } else {
    478485                                $card.find( '.update-now' ).removeAttr( 'aria-label' );
    479486                        }
     
    488495
    489496                                        $card.find( '.update-now' )
    490497                                                .attr( 'aria-label', false )
    491                                                 .text( wp.updates.l10n.updateNow );
     498                                                .text( wp.i18n.__( 'Update Now' ) );
    492499                                }, 200 );
    493500                        } );
    494501                }
     
    523530                        $message = $( '[data-slug="' + args.slug + '"]' );
    524531                }
    525532
    526                 if ( $message.html() !== wp.updates.l10n.installing ) {
     533                if ( $message.html() !== wp.i18n.__( 'Installing...' ) ) {
    527534                        $message.data( 'originaltext', $message.html() );
    528535                }
    529536
    530537                $message
    531538                        .addClass( 'updating-message' )
    532                         .attr( 'aria-label', wp.updates.l10n.pluginInstallingLabel.replace( '%s', $message.data( 'name' ) ) )
    533                         .text( wp.updates.l10n.installing );
     539                        /* translators: %s: Plugin name and version */
     540                        .attr( 'aria-label', wp.i18n._x( 'Installing %s...', 'plugin' ).replace( '%s', $message.data( 'name' ) ) )
     541                        .text( wp.i18n.__( 'Installing...' ) );
    534542
    535                 wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' );
     543                wp.a11y.speak( wp.i18n.__( 'Installing... please wait.' ), 'polite' );
    536544
    537545                // Remove previous error messages, if any.
    538546                $card.removeClass( 'plugin-card-install-failed' ).find( '.notice.notice-error' ).remove();
     
    554562         * @param {string} response.activateUrl URL to activate the just installed plugin.
    555563         */
    556564        wp.updates.installPluginSuccess = function( response ) {
    557                 var $message = $( '.plugin-card-' + response.slug ).find( '.install-now' );
     565                var $message            = $( '.plugin-card-' + response.slug ).find( '.install-now' ),
     566                    activatePlugin      = wp.i18n.__( 'Activate' ),
     567                    /* translators: %s: Plugin name */
     568                    activatePluginLabel = wp.i18n._x( 'Activate %s', 'plugin' );
    558569
    559570                $message
    560571                        .removeClass( 'updating-message' )
    561572                        .addClass( 'updated-message installed button-disabled' )
    562                         .attr( 'aria-label', wp.updates.l10n.pluginInstalledLabel.replace( '%s', response.pluginName ) )
    563                         .text( wp.updates.l10n.installed );
     573                        /* translators: %s: Plugin name and version */
     574                        .attr( 'aria-label', wp.i18n._x( '%s installed!', 'plugin' ).replace( '%s', response.pluginName ) )
     575                        .text( wp.i18n.__( 'Installed!' ) );
    564576
    565                 wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
     577                wp.a11y.speak( wp.i18n.__( 'Installation completed successfully.' ), 'polite' );
    566578
    567579                $document.trigger( 'wp-plugin-install-success', response );
    568580
    569581                if ( response.activateUrl ) {
    570582                        setTimeout( function() {
     583                                if ( wp.updates.isNetworkAdmin ) {
     584                                        activatePlugin = wp.i18n.__( 'Network Activate' );
     585                                        /* translators: %s: Plugin name */
     586                                        activatePluginLabel = wp.i18n._x( 'Network Activate %s', 'plugin' );
     587                                }
    571588
    572589                                // Transform the 'Install' button into an 'Activate' button.
    573590                                $message.removeClass( 'install-now installed button-disabled updated-message' ).addClass( 'activate-now button-primary' )
    574591                                        .attr( 'href', response.activateUrl )
    575                                         .attr( 'aria-label', wp.updates.l10n.activatePluginLabel.replace( '%s', response.pluginName ) )
    576                                         .text( wp.updates.l10n.activatePlugin );
     592                                        .attr( 'aria-label', activatePluginLabel.replace( '%s', response.pluginName ) )
     593                                        .text( activatePlugin );
    577594                        }, 1000 );
    578595                }
    579596        };
     
    603620                        return;
    604621                }
    605622
    606                 errorMessage = wp.updates.l10n.installFailed.replace( '%s', response.errorMessage );
     623                /* translators: %s: Error string for a failed installation */
     624                errorMessage = wp.i18n.__( 'Installation failed: %s' ).replace( '%s', response.errorMessage );
    607625
    608626                $card
    609627                        .addClass( 'plugin-card-update-failed' )
     
    621639
    622640                $button
    623641                        .removeClass( 'updating-message' ).addClass( 'button-disabled' )
    624                         .attr( 'aria-label', wp.updates.l10n.pluginInstallFailedLabel.replace( '%s', $button.data( 'name' ) ) )
    625                         .text( wp.updates.l10n.installFailedShort );
     642                        /* translators: %s: Plugin name and version */
     643                        .attr( 'aria-label', wp.i18n._x( '%s installation failed', 'plugin' ).replace( '%s', $button.data( 'name' ) ) )
     644                        .text( wp.i18n.__( 'Install Failed!' ) );
    626645
    627646                wp.a11y.speak( errorMessage, 'assertive' );
    628647
     
    644663                wp.updates.addAdminNotice( {
    645664                        id:        'install-success',
    646665                        className: 'notice-success is-dismissible',
    647                         message:   wp.updates.l10n.importerInstalledMsg.replace( '%s', response.activateUrl + '&from=import' )
     666                        /* translators: %s: Activation URL */
     667                        message:   wp.i18n.__( 'Importer installed successfully. <a href="%s">Run importer</a>' ).replace( '%s', response.activateUrl + '&from=import' )
    648668                } );
    649669
    650670                $( '[data-slug="' + response.slug + '"]' )
     
    652672                        .addClass( 'activate-now' )
    653673                        .attr({
    654674                                'href': response.activateUrl + '&from=import',
    655                                 'aria-label': wp.updates.l10n.activateImporterLabel.replace( '%s', response.pluginName )
     675                                /* translators: %s: Importer name */
     676                                'aria-label': wp.i18n.__( 'Run %s' ).replace( '%s', response.pluginName )
    656677                        })
    657                         .text( wp.updates.l10n.activateImporter );
     678                        .text( wp.i18n.__( 'Run Importer' ) );
    658679
    659                 wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
     680                wp.a11y.speak( wp.i18n.__( 'Installation completed successfully.' ), 'polite' );
    660681
    661682                $document.trigger( 'wp-importer-install-success', response );
    662683        };
     
    674695         * @param {string}  response.errorMessage The error that occurred.
    675696         */
    676697        wp.updates.installImporterError = function( response ) {
    677                 var errorMessage = wp.updates.l10n.installFailed.replace( '%s', response.errorMessage ),
     698                /* translators: %s: Error string for a failed installation */
     699                var errorMessage = wp.i18n.__( 'Installation failed: %s' ).replace( '%s', response.errorMessage ),
    678700                        $installLink = $( '[data-slug="' + response.slug + '"]' ),
    679701                        pluginName = $installLink.data( 'name' );
    680702
     
    694716
    695717                $installLink
    696718                        .removeClass( 'updating-message' )
    697                         .text( wp.updates.l10n.installNow )
    698                         .attr( 'aria-label', wp.updates.l10n.installNowLabel.replace( '%s', pluginName ) );
     719                        .text( wp.i18n.__( 'Install Now' ) )
     720                        /* translators: %s: Plugin name */
     721                        .attr( 'aria-label', wp.i18n.__( 'Install %s now' ).replace( '%s', pluginName ) );
    699722
    700723                wp.a11y.speak( errorMessage, 'assertive' );
    701724
     
    723746                        error: wp.updates.deletePluginError
    724747                }, args );
    725748
    726                 if ( $link.html() !== wp.updates.l10n.deleting ) {
     749                if ( $link.html() !== wp.i18n.__( 'Deleting...' ) ) {
    727750                        $link
    728751                                .data( 'originaltext', $link.html() )
    729                                 .text( wp.updates.l10n.deleting );
     752                                .text( wp.i18n.__( 'Deleting...' ) );
    730753                }
    731754
    732                 wp.a11y.speak( wp.updates.l10n.deleting, 'polite' );
     755                wp.a11y.speak( wp.i18n.__( 'Deleting...' ), 'polite' );
    733756
    734757                $document.trigger( 'wp-plugin-deleting', args );
    735758
     
    816839                                $views.find( '.all' ).remove();
    817840
    818841                                if ( ! $form.find( 'tr.no-items' ).length ) {
    819                                         $form.find( '#the-list' ).append( '<tr class="no-items"><td class="colspanchange" colspan="' + columnCount + '">' + wp.updates.l10n.noPlugins + '</td></tr>' );
     842                                        $form.find( '#the-list' ).append( '<tr class="no-items"><td class="colspanchange" colspan="' + columnCount + '">' + wp.i18n.__( 'You do not appear to have any plugins available at this time.' ) + '</td></tr>' );
    820843                                }
    821844                        }
    822845                } );
    823846
    824                 wp.a11y.speak( wp.updates.l10n.deleted, 'polite' );
     847                wp.a11y.speak( wp.i18n.__( 'Deleted!' ), 'polite' );
    825848
    826849                $document.trigger( 'wp-plugin-delete-success', response );
    827850        };
     
    916939                        $notice = $notice.addClass( 'updating-message' ).find( 'p' );
    917940                }
    918941
    919                 if ( $notice.html() !== wp.updates.l10n.updating ) {
     942                if ( $notice.html() !== wp.i18n.__( 'Updating...' ) ) {
    920943                        $notice.data( 'originaltext', $notice.html() );
    921944                }
    922945
    923                 wp.a11y.speak( wp.updates.l10n.updatingMsg, 'polite' );
    924                 $notice.text( wp.updates.l10n.updating );
     946                /* translators: JavaScript accessible string */
     947                wp.a11y.speak( __( 'Updating... please wait.' ), 'polite' ); // No ellipsis.
     948                $notice.text( wp.i18n.__( 'Updating...' ) ); // No ellipsis.
    925949
    926950                $document.trigger( 'wp-theme-updating', args );
    927951
     
    945969                        $theme         = $( '[data-slug="' + response.slug + '"]' ),
    946970                        updatedMessage = {
    947971                                className: 'updated-message notice-success notice-alt',
    948                                 message:   wp.updates.l10n.updated
     972                                message:   wp.i18n.__( 'Updated!' )
    949973                        },
    950974                        $notice, newText;
    951975
     
    967991                }
    968992
    969993                wp.updates.addAdminNotice( _.extend( { selector: $notice }, updatedMessage ) );
    970                 wp.a11y.speak( wp.updates.l10n.updatedMsg, 'polite' );
     994                /* translators: JavaScript accessible string */
     995                wp.a11y.speak( wp.i18n.__( 'Update completed successfully.' ), 'polite' );
    971996
    972997                wp.updates.decrementCount( 'theme' );
    973998
     
    9921017         */
    9931018        wp.updates.updateThemeError = function( response ) {
    9941019                var $theme       = $( '[data-slug="' + response.slug + '"]' ),
    995                         errorMessage = wp.updates.l10n.updateFailed.replace( '%s', response.errorMessage ),
     1020                    /* translators: %s: Error string for a failed update */
     1021                        errorMessage = wp.i18n.__( 'Update Failed: %s' ).replace( '%s', response.errorMessage ),
    9961022                        $notice;
    9971023
    9981024                if ( ! wp.updates.isValidResponse( response, 'update' ) ) {
     
    10441070
    10451071                $message.addClass( 'updating-message' );
    10461072                $message.parents( '.theme' ).addClass( 'focus' );
    1047                 if ( $message.html() !== wp.updates.l10n.installing ) {
     1073                if ( $message.html() !== wp.i18n.__( 'Installing...' ) ) {
    10481074                        $message.data( 'originaltext', $message.html() );
    10491075                }
    10501076
    10511077                $message
    1052                         .text( wp.updates.l10n.installing )
    1053                         .attr( 'aria-label', wp.updates.l10n.themeInstallingLabel.replace( '%s', $message.data( 'name' ) ) );
    1054                 wp.a11y.speak( wp.updates.l10n.installingMsg, 'polite' );
     1078                        .text( wp.i18n__( 'Installing...' ) )
     1079                        /* translators: %s: Theme name and version */
     1080                        .attr( 'aria-label', wp.i18n._x( 'Installing %s...', 'theme' ).replace( '%s', $message.data( 'name' ) ) );
     1081                wp.a11y.speak( wp.i18n.__( 'Installing... please wait.' ), 'polite' );
    10551082
    10561083                // Remove previous error messages, if any.
    10571084                $( '.install-theme-info, [data-slug="' + args.slug + '"]' ).removeClass( 'theme-install-failed' ).find( '.notice.notice-error' ).remove();
     
    10731100         * @param {string} response.activateUrl  URL to activate the just installed theme.
    10741101         */
    10751102        wp.updates.installThemeSuccess = function( response ) {
    1076                 var $card = $( '.wp-full-overlay-header, [data-slug=' + response.slug + ']' ),
    1077                         $message;
     1103                var $card              = $( '.wp-full-overlay-header, [data-slug=' + response.slug + ']' ),
     1104                    activateTheme      = wp.i18n.__( 'Activate' ),
     1105                    activateThemeLabel = wp.i18n._x( 'Activate %s', 'theme' ),
     1106                    $message;
    10781107
    10791108                $document.trigger( 'wp-theme-install-success', response );
    10801109
    10811110                $message = $card.find( '.button-primary' )
    10821111                        .removeClass( 'updating-message' )
    10831112                        .addClass( 'updated-message disabled' )
    1084                         .attr( 'aria-label', wp.updates.l10n.themeInstalledLabel.replace( '%s', response.themeName ) )
    1085                         .text( wp.updates.l10n.installed );
     1113                        /* translators: %s: Theme name and version */
     1114                        .attr( 'aria-label', wp.i18n._x( '%s installed!', 'theme' ).replace( '%s', response.themeName ) )
     1115                        .text( wp.i18n.__( 'Installed!' ) );
    10861116
    1087                 wp.a11y.speak( wp.updates.l10n.installedMsg, 'polite' );
     1117                wp.a11y.speak( wp.i18n.__( 'Installation completed successfully.' ), 'polite' );
    10881118
    10891119                setTimeout( function() {
    10901120
    10911121                        if ( response.activateUrl ) {
     1122                                if ( wp.updates.isNetworkAdmin ) {
     1123                                        activateTheme = wp.i18n.__( 'Network Enable' );
     1124                                        /* translators: %s: Theme name */
     1125                                        activateThemeLabel = wp.i18n._x( 'Network Activate %s', 'theme' );
     1126                                }
    10921127
    10931128                                // Transform the 'Install' button into an 'Activate' button.
    10941129                                $message
    10951130                                        .attr( 'href', response.activateUrl )
    10961131                                        .removeClass( 'theme-install updated-message disabled' )
    10971132                                        .addClass( 'activate' )
    1098                                         .attr( 'aria-label', wp.updates.l10n.activateThemeLabel.replace( '%s', response.themeName ) )
    1099                                         .text( wp.updates.l10n.activateTheme );
     1133                                        .attr( 'aria-label', activateThemeLabel.replace( '%s', response.themeName ) )
     1134                                        .text( activateTheme );
    11001135                        }
    11011136
    11021137                        if ( response.customizeUrl ) {
     
    11061141                                        return $( '<a>' )
    11071142                                                .attr( 'href', response.customizeUrl )
    11081143                                                .addClass( 'button button-secondary load-customize' )
    1109                                                 .text( wp.updates.l10n.livePreview );
     1144                                                .text( wp.i18n.__( 'Live Preview' ) );
    11101145                                } );
    11111146                        }
    11121147                }, 1000 );
     
    11251160         */
    11261161        wp.updates.installThemeError = function( response ) {
    11271162                var $card, $button,
    1128                         errorMessage = wp.updates.l10n.installFailed.replace( '%s', response.errorMessage ),
     1163                    /* translators: %s: Error string for a failed installation */
     1164                        errorMessage = wp.i18n.__( 'Installation failed: %s' ).replace( '%s', response.errorMessage ),
    11291165                        $message     = wp.updates.adminNotice( {
    11301166                                className: 'update-message notice-error notice-alt',
    11311167                                message:   errorMessage
     
    11491185
    11501186                $button
    11511187                        .removeClass( 'updating-message' )
    1152                         .attr( 'aria-label', wp.updates.l10n.themeInstallFailedLabel.replace( '%s', $button.data( 'name' ) ) )
    1153                         .text( wp.updates.l10n.installFailedShort );
     1188                        /* translators: %s: Theme name and version */
     1189                        .attr( 'aria-label', wp.i18n._x( '%s installation failed', 'theme' ).replace( '%s', $button.data( 'name' ) ) )
     1190                        .text( wp.i18n.__( 'Install Failed!' ) );
    11541191
    11551192                wp.a11y.speak( errorMessage, 'assertive' );
    11561193
     
    11831220                        error: wp.updates.deleteThemeError
    11841221                }, args );
    11851222
    1186                 if ( $button && $button.html() !== wp.updates.l10n.deleting ) {
     1223                if ( $button && $button.html() !== wp.i18n.__( 'Deleting...' ) ) {
    11871224                        $button
    11881225                                .data( 'originaltext', $button.html() )
    1189                                 .text( wp.updates.l10n.deleting );
     1226                                .text( wp.i18n.__( 'Deleting...' ) );
    11901227                }
    11911228
    1192                 wp.a11y.speak( wp.updates.l10n.deleting, 'polite' );
     1229                wp.a11y.speak( wp.i18n.__( 'Deleting...' ), 'polite' );
    11931230
    11941231                // Remove previous error messages, if any.
    11951232                $( '.theme-info .update-message' ).remove();
     
    12531290                        } );
    12541291                }
    12551292
    1256                 wp.a11y.speak( wp.updates.l10n.deleted, 'polite' );
     1293                wp.a11y.speak( wp.i18n.__( 'Deleted!' ), 'polite' );
    12571294
    12581295                $document.trigger( 'wp-theme-delete-success', response );
    12591296        };
     
    12741311                        $button      = $( '.theme-actions .delete-theme' ),
    12751312                        updateRow    = wp.template( 'item-update-row' ),
    12761313                        $updateRow   = $themeRow.siblings( '#' + response.slug + '-update' ),
    1277                         errorMessage = wp.updates.l10n.deleteFailed.replace( '%s', response.errorMessage ),
     1314                        /* translators: %s: Error string for a failed deletion */
     1315                        errorMessage = wp.i18n.__( 'Deletion failed: %s' ).replace( '%s', response.errorMessage ),
    12781316                        $message     = wp.updates.adminNotice( {
    12791317                                className: 'update-message notice-error notice-alt',
    12801318                                message:   errorMessage
     
    15661604         *                                                'update' or 'install'.
    15671605         */
    15681606        wp.updates.isValidResponse = function( response, action ) {
    1569                 var error = wp.updates.l10n.unknownError,
     1607                var error = wp.i18n.__( 'An unknown error occurred' ),
    15701608                    errorMessage;
    15711609
    15721610                // Make sure the response is a valid data object and not a Promise object.
     
    15751613                }
    15761614
    15771615                if ( _.isString( response ) && '-1' === response ) {
    1578                         error = wp.updates.l10n.nonceError;
     1616                        error = wp.i18n.__( 'An error has occurred. Please reload the page and try again.' );
    15791617                } else if ( _.isString( response ) ) {
    15801618                        error = response;
    15811619                } else if ( 'undefined' !== typeof response.readyState && 0 === response.readyState ) {
    1582                         error = wp.updates.l10n.connectionError;
     1620                        error = wp.i18n.__( 'Connection lost or the server is busy. Please try again later.' );
    15831621                } else if ( _.isString( response.responseText ) && '' !== response.responseText ) {
    15841622                        error = response.responseText;
    15851623                } else if ( _.isString( response.statusText ) ) {
     
    15881626
    15891627                switch ( action ) {
    15901628                        case 'update':
    1591                                 errorMessage = wp.updates.l10n.updateFailed;
     1629                                /* translators: %s: Error string for a failed update */
     1630                                errorMessage = wp.i18n.__( 'Update Failed: %s' );
    15921631                                break;
    15931632
    15941633                        case 'install':
    1595                                 errorMessage = wp.updates.l10n.installFailed;
     1634                                /* translators: %s: Error string for a failed installation */
     1635                                errorMessage = wp.i18n.__( 'Installation failed: %s' );
    15961636                                break;
    15971637
    15981638                        case 'delete':
    1599                                 errorMessage = wp.updates.l10n.deleteFailed;
     1639                                /* translators: %s: Error string for a failed deletion */
     1640                                errorMessage = wp.i18n.__( 'Deletion failed: %s' );
    16001641                                break;
    16011642                }
    16021643
     
    16201661                        .removeClass( 'updating-message' )
    16211662                        .removeAttr( 'aria-label' )
    16221663                        .prop( 'disabled', true )
    1623                         .text( wp.updates.l10n.updateFailedShort );
     1664                        .text( wp.i18n.__( 'Update Failed!' ) );
    16241665
    16251666                $( '.updating-message:not(.button):not(.thickbox)' )
    16261667                        .removeClass( 'updating-message notice-warning' )
     
    16441685         */
    16451686        wp.updates.beforeunload = function() {
    16461687                if ( wp.updates.ajaxLocked ) {
    1647                         return wp.updates.l10n.beforeunload;
     1688                        return wp.i18n.__( 'Updates may not complete if you navigate away from this page.' );
    16481689                }
    16491690        };
    16501691
     
    17491790
    17501791                                if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
    17511792                                        if ( 'update-plugin' === job.action ) {
    1752                                                 $message.attr( 'aria-label', wp.updates.l10n.updateNowLabel.replace( '%s', $message.data( 'name' ) ) );
     1793                                                /* translators: %s: Plugin name and version */
     1794                                                $message.attr( 'aria-label', wp.i18n.__( 'Update %s now' ).replace( '%s', $message.data( 'name' ) ) );
    17531795                                        } else if ( 'install-plugin' === job.action ) {
    1754                                                 $message.attr( 'aria-label', wp.updates.l10n.installNowLabel.replace( '%s', $message.data( 'name' ) ) );
     1796                                                /* translators: %s: Plugin name */
     1797                                                $message.attr( 'aria-label', wp.i18n.__( 'Install %s now' ).replace( '%s', $message.data( 'name' ) ) );
    17551798                                        }
    17561799                                }
    17571800                        }
    17581801
    1759                         wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
     1802                        /* translators: JavaScript accessible string */
     1803                        wp.a11y.speak( wp.i18n.__( 'Update canceled.' ), 'polite' );
    17601804                } );
    17611805
    17621806                /**
     
    18321876
    18331877                                        $message
    18341878                                                .removeClass( 'updating-message' )
    1835                                                 .text( wp.updates.l10n.installNow );
     1879                                                .text( wp.i18n.__( 'Install Now' ) );
    18361880
    1837                                         wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
     1881                                        /* translators: JavaScript accessible string */
     1882                                        wp.a11y.speak( wp.i18n.__( 'Update canceled.' ), 'polite' );
    18381883                                } );
    18391884                        }
    18401885
     
    18671912
    18681913                                        $button
    18691914                                                .removeClass( 'updating-message' )
    1870                                                 .text( wp.updates.l10n.installNow )
    1871                                                 .attr( 'aria-label', wp.updates.l10n.installNowLabel.replace( '%s', pluginName ) );
     1915                                                .text( wp.i18n.__( 'Install Now' ) )
     1916                                                /* translators: %s: Plugin name */
     1917                                                .attr( 'aria-label', wp.i18n.__( 'Install %s now' ).replace( '%s', pluginName ) );
    18721918
    1873                                         wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' );
     1919                                        /* translators: JavaScript accessible string */
     1920                                        wp.a11y.speak( wp.i18n.__( 'Update canceled.' ), 'polite' );
    18741921                                } );
    18751922                        }
    18761923
     
    18931940
    18941941                        event.preventDefault();
    18951942
    1896                         if ( ! window.confirm( wp.updates.l10n.aysDeleteUninstall.replace( '%s', $pluginRow.find( '.plugin-title strong' ).text() ) ) ) {
     1943                        /* translators: %s: Plugin name */
     1944                        if ( ! window.confirm( wp.i18n.__( 'Are you sure you want to delete %s and its data?' ).replace( '%s', $pluginRow.find( '.plugin-title strong' ).text() ) ) ) {
    18971945                                return;
    18981946                        }
    18991947
     
    19441992
    19451993                        event.preventDefault();
    19461994
    1947                         if ( ! window.confirm( wp.updates.l10n.aysDelete.replace( '%s', $themeRow.find( '.theme-title strong' ).text() ) ) ) {
     1995                        /* translators: %s: Theme name */
     1996                        if ( ! window.confirm( wp.i18n.__( 'Are you sure you want to delete %s?' ).replace( '%s', $themeRow.find( '.theme-title strong' ).text() ) ) ) {
    19481997                                return;
    19491998                        }
    19501999
     
    19702019                                success       = 0,
    19712020                                error         = 0,
    19722021                                errorMessages = [],
    1973                                 type, action;
     2022                                type, action, bulkDeleteMsg;
    19742023
    19752024                        // Determine which type of item we're dealing with.
    19762025                        switch ( pagenow ) {
     
    19952044                                return wp.updates.addAdminNotice( {
    19962045                                        id:        'no-items-selected',
    19972046                                        className: 'notice-error is-dismissible',
    1998                                         message:   wp.updates.l10n.noItemsSelected
     2047                                        message:   wp.i18n.__( 'Please select at least one item to perform this action on.' )
    19992048                                } );
    20002049                        }
    20012050
     
    20062055                                        break;
    20072056
    20082057                                case 'delete-selected':
    2009                                         if ( ! window.confirm( 'plugin' === type ? wp.updates.l10n.aysBulkDelete : wp.updates.l10n.aysBulkDeleteThemes ) ) {
     2058                                        bulkDeleteMsg = wp.i18n.__( 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?' );
     2059
     2060                                        if ( 'plugin' === type ) {
     2061                                                bulkDeleteMsg = wp.i18n.__( 'Are you sure you want to delete the selected plugins and their data?' );
     2062                                        }
     2063
     2064                                        if ( ! window.confirm( bulkDeleteMsg ) ) {
    20102065                                                event.preventDefault();
    20112066                                                return;
    20122067                                        }
     
    21432198                                        .append( $( '<a />', {
    21442199                                                'class': 'current',
    21452200                                                'href': searchLocation,
    2146                                                 'text': wp.updates.l10n.searchResultsLabel
     2201                                                'text': wp.i18n.__( 'Search Results' )
    21472202                                        } ) );
    21482203
    21492204                                $( '.wp-filter .filter-links .current' )
     
    21662221                                delete wp.updates.searchRequest;
    21672222
    21682223                                if ( 0 === response.count ) {
    2169                                         wp.a11y.speak( wp.updates.l10n.noPluginsFound );
     2224                                        wp.a11y.speak( wp.i18n.__( 'No plugins found. Try a different search.' ) );
    21702225                                } else {
    2171                                         wp.a11y.speak( wp.updates.l10n.pluginsFound.replace( '%d', response.count ) );
     2226                                        wp.a11y.speak( wp.i18n._n( '%d plugin found', '%d plugins found', response.count ) );
    21722227                                }
    21732228                        } );
    21742229                }, 500 ) );
     
    22152270                        wp.updates.searchRequest = wp.ajax.post( 'search-plugins', data ).done( function( response ) {
    22162271
    22172272                                // Can we just ditch this whole subtitle business?
    2218                                 var $subTitle    = $( '<span />' ).addClass( 'subtitle' ).html( wp.updates.l10n.searchResults.replace( '%s', _.escape( data.s ) ) ),
     2273                                /* translators: %s: Search string */
     2274                                var $subTitle    = $( '<span />' ).addClass( 'subtitle' ).html( wp.i18n.__( 'Search results for &#8220;%s&#8221;' ).replace( '%s', _.escape( data.s ) ) ),
    22192275                                        $oldSubTitle = $( '.wrap .subtitle' );
    22202276
    22212277                                if ( ! data.s.length ) {
     
    22312287                                delete wp.updates.searchRequest;
    22322288
    22332289                                if ( 0 === response.count ) {
    2234                                         wp.a11y.speak( wp.updates.l10n.noPluginsFound );
     2290                                        wp.a11y.speak( wp.i18n.__( 'No plugins found. Try a different search.' ) );
    22352291                                } else {
    2236                                         wp.a11y.speak( wp.updates.l10n.pluginsFound.replace( '%d', response.count ) );
     2292                                        wp.a11y.speak( wp.i18n._n( '%d plugin found', '%d plugins found', response.count ) );
    22372293                                }
    22382294                        } );
    22392295                }, 500 ) );
  • src/wp-admin/js/user-profile.js

    diff --git src/wp-admin/js/user-profile.js src/wp-admin/js/user-profile.js
    index 650fbd5..feb054a 100644
     
    1 /* global ajaxurl, pwsL10n, userProfileL10n */
     1/* global ajaxurl */
    22(function($) {
    33        var updateLock = false,
    44
     
    5050                }
    5151
    5252                // Once zxcvbn loads, passwords strength is known.
    53                 $( '#pw-weak-text-label' ).html( userProfileL10n.warnWeak );
     53                $( '#pw-weak-text-label' ).html( wp.i18n.__( 'Confirm use of weak password' ) );
    5454        }
    5555
    5656        function bindPass1() {
     
    100100                $toggleButton
    101101                        .data( 'toggle', 0 )
    102102                        .attr({
    103                                 'aria-label': userProfileL10n.ariaHide
     103                                'aria-label': wp.i18n.esc_attr__( 'Hide password' )
    104104                        })
    105105                        .find( '.text' )
    106                                 .text( userProfileL10n.hide )
     106                                .text( wp.i18n.__( 'Hide' ) )
    107107                        .end()
    108108                        .find( '.dashicons' )
    109109                                .removeClass( 'dashicons-visibility' )
     
    130130                                $toggleButton
    131131                                        .data( 'toggle', 1 )
    132132                                        .attr({
    133                                                 'aria-label': userProfileL10n.ariaShow
     133                                                'aria-label': wp.i18n.esc_attr__( 'Show password' )
    134134                                        })
    135135                                        .find( '.text' )
    136                                                 .text( userProfileL10n.show )
     136                                                .text( wp.i18n.__( 'Show' ) )
    137137                                        .end()
    138138                                        .find( '.dashicons' )
    139139                                                .removeClass('dashicons-hidden')
     
    290290
    291291                switch ( strength ) {
    292292                        case -1:
    293                                 $( '#pass-strength-result' ).addClass( 'bad' ).html( pwsL10n.unknown );
     293                                $( '#pass-strength-result' ).addClass( 'bad' ).html( wp.i18n._x( 'Password strength unknown', 'password strength' ) );
    294294                                break;
    295295                        case 2:
    296                                 $('#pass-strength-result').addClass('bad').html( pwsL10n.bad );
     296                                $('#pass-strength-result').addClass('bad').html( wp.i18n._x( 'Weak', 'password strength' ) );
    297297                                break;
    298298                        case 3:
    299                                 $('#pass-strength-result').addClass('good').html( pwsL10n.good );
     299                                $('#pass-strength-result').addClass('good').html( wp.i18n._x( 'Medium', 'password strength' ) );
    300300                                break;
    301301                        case 4:
    302                                 $('#pass-strength-result').addClass('strong').html( pwsL10n.strong );
     302                                $('#pass-strength-result').addClass('strong').html( wp.i18n._x( 'Strong', 'password strength' ) );
    303303                                break;
    304304                        case 5:
    305                                 $('#pass-strength-result').addClass('short').html( pwsL10n.mismatch );
     305                                $('#pass-strength-result').addClass('short').html( wp.i18n._x( 'Mismatch', 'password mismatch' ) );
    306306                                break;
    307307                        default:
    308                                 $('#pass-strength-result').addClass('short').html( pwsL10n['short'] );
     308                                $('#pass-strength-result').addClass('short').html( wp.i18n._x( 'Very weak', 'password strength' ) );
    309309                }
    310310        }
    311311
     
    448448        /* Warn the user if password was generated but not saved */
    449449        $( window ).on( 'beforeunload', function () {
    450450                if ( true === updateLock ) {
    451                         return userProfileL10n.warn;
     451                        return wp.i18n.__( 'Your new password has not been saved.' );
    452452                }
    453453        } );
    454454
  • src/wp-admin/js/word-count.js

    diff --git src/wp-admin/js/word-count.js src/wp-admin/js/word-count.js
    index 89afdcc..9f8790b 100644
     
    3737         * @param {RegExp} settings.shortcodesRegExp                  Optional. Regular expression to find shortcodes.
    3838         * @param {Object} settings.l10n                              Optional. Localization object containing specific
    3939         *                                                            configuration for the current localization.
    40          * @param {String} settings.l10n.type                         Optional. Method of finding words to count.
    4140         * @param {Array}  settings.l10n.shortcodes                   Optional. Array of shortcodes that should be removed
    4241         *                                                            from the text.
    4342         *
     
    136135                 * \u2028 = line separator
    137136                 * \u2029 = paragraph separator
    138137                 */
    139                 characters_including_spacesRegExp: /[^\f\n\r\t\v\u00AD\u2028\u2029]/g,
    140                 l10n: window.wordCountL10n || {}
     138                characters_including_spacesRegExp: /[^\f\n\r\t\v\u00AD\u2028\u2029]/g
    141139        };
    142140
    143141        /**
     
    157155                var count = 0;
    158156
    159157                // Use default type if none was provided.
    160                 type = type || this.settings.l10n.type;
     158
     159                /*
     160                 * translators: If your word count is based on single characters (e.g. East Asian characters),
     161                 * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.
     162                 * Do not translate into your own language.
     163                 */
     164                type = type || wp.i18n._x( 'words', 'Word count type. Do not translate!' );
    161165
    162166                // Sanitize type to one of three possibilities: 'words', 'characters_excluding_spaces' or 'characters_including_spaces'.
    163167                if ( type !== 'characters_excluding_spaces' && type !== 'characters_including_spaces' ) {
  • src/wp-admin/theme-install.php

    diff --git src/wp-admin/theme-install.php src/wp-admin/theme-install.php
    index 6b38465..f2f8508 100644
    wp_localize_script( 'theme', '_wpThemeSettings', array( 
    4242                'installURI'    => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null,
    4343                'adminUrl'      => parse_url( self_admin_url(), PHP_URL_PATH )
    4444        ),
    45         'l10n' => array(
    46                 'addNew' => __( 'Add New Theme' ),
    47                 'search' => __( 'Search Themes' ),
    48                 'searchPlaceholder' => __( 'Search themes...' ), // placeholder (no ellipsis)
    49                 'upload' => __( 'Upload Theme' ),
    50                 'back'   => __( 'Back' ),
    51                 'error'  => __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ),
    52                 'themesFound'   => __( 'Number of Themes found: %d' ),
    53                 'noThemesFound' => __( 'No themes found. Try a different search.' ),
    54                 'collapseSidebar'    => __( 'Collapse Sidebar' ),
    55                 'expandSidebar'      => __( 'Expand Sidebar' ),
    56         ),
    5745        'installedThemes' => array_keys( $installed_themes ),
    5846) );
    5947
  • src/wp-includes/class-wp-customize-widgets.php

    diff --git src/wp-includes/class-wp-customize-widgets.php src/wp-includes/class-wp-customize-widgets.php
    index 16549ff..aae92d8 100644
    final class WP_Customize_Widgets { 
    722722                        'registeredWidgets'    => $wp_registered_widgets,
    723723                        'availableWidgets'     => $available_widgets, // @todo Merge this with registered_widgets
    724724                        'l10n' => array(
    725                                 'saveBtnLabel'     => __( 'Apply' ),
    726                                 'saveBtnTooltip'   => __( 'Save and preview changes before publishing them.' ),
    727                                 'removeBtnLabel'   => __( 'Remove' ),
    728                                 'removeBtnTooltip' => __( 'Trash widget by moving it to the inactive widgets sidebar.' ),
    729                                 'error'            => __( 'An error has occurred. Please reload the page and try again.' ),
    730                                 'widgetMovedUp'    => __( 'Widget moved up' ),
    731                                 'widgetMovedDown'  => __( 'Widget moved down' ),
    732                                 'noAreasRendered'  => __( 'There are no widget areas currently rendered in the preview. Navigate in the preview to a template that makes use of a widget area in order to access its widgets here.' ),
    733                                 'reorderModeOn'    => __( 'Reorder mode enabled' ),
    734                                 'reorderModeOff'   => __( 'Reorder mode closed' ),
    735725                                'reorderLabelOn'   => esc_attr__( 'Reorder widgets' ),
    736726                                'reorderLabelOff'  => esc_attr__( 'Close reorder mode' ),
    737727                        ),
  • src/wp-includes/js/media-audiovideo.js

    diff --git src/wp-includes/js/media-audiovideo.js src/wp-includes/js/media-audiovideo.js
    index e37a221..7fdf7bf 100644
     
    11(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
    22var media = wp.media,
    3         baseSettings = window._wpmejsSettings || {},
    4         l10n = window._wpMediaViewsL10n || {};
     3        baseSettings = window._wpmejsSettings || {};
    54
    65/**
    76 * @mixin
    wp.media.mixin = { 
    7978 */
    8079wp.media.playlist = new wp.media.collection({
    8180        tag: 'playlist',
    82         editTitle : l10n.editPlaylistTitle,
     81        editTitle : wp.i18n.__( 'Edit Audio Playlist' ),
    8382        defaults : {
    8483                id: wp.media.view.settings.post.id,
    8584                style: 'light',
    media.view.VideoDetails = require( './views/video-details.js' ); 
    226225 * @augments Backbone.Model
    227226 */
    228227var State = wp.media.controller.State,
    229         l10n = wp.media.view.l10n,
    230228        AudioDetails;
    231229
    232230AudioDetails = State.extend({
    233231        defaults: {
    234232                id: 'audio-details',
    235233                toolbar: 'audio-details',
    236                 title: l10n.audioDetailsTitle,
     234                title: wp.i18n.__( 'Cancel Edit' ),
    237235                content: 'audio-details',
    238236                menu: 'audio-details',
    239237                router: false,
    module.exports = AudioDetails; 
    259257 * @augments Backbone.Model
    260258 */
    261259var State = wp.media.controller.State,
    262         l10n = wp.media.view.l10n,
    263260        VideoDetails;
    264261
    265262VideoDetails = State.extend({
    266263        defaults: {
    267264                id: 'video-details',
    268265                toolbar: 'video-details',
    269                 title: l10n.videoDetailsTitle,
     266                title: wp.i18n.__( 'Video Details' ),
    270267                content: 'video-details',
    271268                menu: 'video-details',
    272269                router: false,
    AudioDetails = MediaDetails.extend({ 
    389386                content: 'audio-details',
    390387                toolbar: 'audio-details',
    391388                type:    'link',
    392                 title:    l10n.audioDetailsTitle,
     389                title:    wp.i18n.__( 'Audio Details' ),
    393390                priority: 120
    394391        },
    395392
    396393        initialize: function( options ) {
    397394                options.DetailsView = wp.media.view.AudioDetails;
    398                 options.cancelText = l10n.audioDetailsCancel;
    399                 options.addText = l10n.audioAddSourceTitle;
     395                options.cancelText = wp.i18n.__( 'Cancel Edit' );
     396                options.addText = wp.i18n.__( 'Add Audio Source' );
    400397
    401398                MediaDetails.prototype.initialize.call( this, options );
    402399        },
    AudioDetails = MediaDetails.extend({ 
    417414                        new MediaLibrary( {
    418415                                type: 'audio',
    419416                                id: 'replace-audio',
    420                                 title: l10n.audioReplaceTitle,
     417                                title: wp.i18n.__( 'Replace Audio' ),
    421418                                toolbar: 'replace-audio',
    422419                                media: this.media,
    423420                                menu: 'audio-details'
    AudioDetails = MediaDetails.extend({ 
    426423                        new MediaLibrary( {
    427424                                type: 'audio',
    428425                                id: 'add-audio-source',
    429                                 title: l10n.audioAddSourceTitle,
     426                                title: wp.i18n.__( 'Add Audio Source' ),
    430427                                toolbar: 'add-audio-source',
    431428                                media: this.media,
    432429                                menu: false
    MediaDetails = Select.extend({ 
    542539        },
    543540
    544541        renderDetailsToolbar: function() {
    545                 this.setPrimaryButton( l10n.update, function( controller, state ) {
     542                this.setPrimaryButton( wp.i18n.__( 'Update' ), function( controller, state ) {
    546543                        controller.close();
    547544                        state.trigger( 'update', controller.media.toJSON() );
    548545                } );
    549546        },
    550547
    551548        renderReplaceToolbar: function() {
    552                 this.setPrimaryButton( l10n.replace, function( controller, state ) {
     549                this.setPrimaryButton( wp.i18n.__( 'Replace' ), function( controller, state ) {
    553550                        var attachment = state.get( 'selection' ).single();
    554551                        controller.media.changeAttachment( attachment );
    555552                        state.trigger( 'replace', controller.media.toJSON() );
    VideoDetails = MediaDetails.extend({ 
    594591                content: 'video-details',
    595592                toolbar: 'video-details',
    596593                type:    'link',
    597                 title:    l10n.videoDetailsTitle,
     594                title:    wp.i18n.__( 'Video Details' ),
    598595                priority: 120
    599596        },
    600597
    601598        initialize: function( options ) {
    602599                options.DetailsView = wp.media.view.VideoDetails;
    603                 options.cancelText = l10n.videoDetailsCancel;
    604                 options.addText = l10n.videoAddSourceTitle;
     600                options.cancelText = wp.i18n.__( 'Cancel Edit' );
     601                options.addText = wp.i18n.__( 'Add Video Source' );
    605602
    606603                MediaDetails.prototype.initialize.call( this, options );
    607604        },
    VideoDetails = MediaDetails.extend({ 
    624621                        new MediaLibrary( {
    625622                                type: 'video',
    626623                                id: 'replace-video',
    627                                 title: l10n.videoReplaceTitle,
     624                                title: wp.i18n.__( 'Replace Video' ),
    628625                                toolbar: 'replace-video',
    629626                                media: this.media,
    630627                                menu: 'video-details'
    VideoDetails = MediaDetails.extend({ 
    633630                        new MediaLibrary( {
    634631                                type: 'video',
    635632                                id: 'add-video-source',
    636                                 title: l10n.videoAddSourceTitle,
     633                                title: wp.i18n.__( 'Add Video Source' ),
    637634                                toolbar: 'add-video-source',
    638635                                media: this.media,
    639636                                menu: false
    VideoDetails = MediaDetails.extend({ 
    642639                        new MediaLibrary( {
    643640                                type: 'image',
    644641                                id: 'select-poster-image',
    645                                 title: l10n.videoSelectPosterImageTitle,
     642                                title: wp.i18n.__( 'Select Poster Image' ),
    646643                                toolbar: 'select-poster-image',
    647644                                media: this.media,
    648645                                menu: 'video-details'
    VideoDetails = MediaDetails.extend({ 
    651648                        new MediaLibrary( {
    652649                                type: 'text',
    653650                                id: 'add-track',
    654                                 title: l10n.videoAddTrackTitle,
     651                                title: wp.i18n.__( 'Add Subtitles' ),
    655652                                toolbar: 'add-track',
    656653                                media: this.media,
    657654                                menu: 'video-details'
    VideoDetails = MediaDetails.extend({ 
    660657        },
    661658
    662659        renderSelectPosterImageToolbar: function() {
    663                 this.setPrimaryButton( l10n.videoSelectPosterImageTitle, function( controller, state ) {
     660                this.setPrimaryButton( wp.i18n.__( 'Select Poster Image' ), function( controller, state ) {
    664661                        var urls = [], attachment = state.get( 'selection' ).single();
    665662
    666663                        controller.media.set( 'poster', attachment.get( 'url' ) );
    VideoDetails = MediaDetails.extend({ 
    682679        },
    683680
    684681        renderAddTrackToolbar: function() {
    685                 this.setPrimaryButton( l10n.videoAddTrackTitle, function( controller, state ) {
     682                this.setPrimaryButton( wp.i18n.__( 'Add Subtitles' ), function( controller, state ) {
    686683                        var attachment = state.get( 'selection' ).single(),
    687684                                content = controller.media.get( 'content' );
    688685
  • src/wp-includes/js/media-editor.js

    diff --git src/wp-includes/js/media-editor.js src/wp-includes/js/media-editor.js
    index aa40746..c4e85a1 100644
     
    663663                                _wpnonce:     settings.post.nonce
    664664                        }).done( function( html ) {
    665665                                if ( html == '0' ) {
    666                                         window.alert( window.setPostThumbnailL10n.error );
     666                                        window.alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) );
    667667                                        return;
    668668                                }
    669669                                $( '.inside', '#postimagediv' ).html( html );
  • src/wp-includes/js/media-grid.js

    diff --git src/wp-includes/js/media-grid.js src/wp-includes/js/media-grid.js
    index 5d0faa2..b5d092a 100644
     
    88 * @augments wp.media.controller.State
    99 * @augments Backbone.Model
    1010 */
    11 var l10n = wp.media.view.l10n,
    12         EditAttachmentMetadata;
    13 
    14 EditAttachmentMetadata = wp.media.controller.State.extend({
     11var EditAttachmentMetadata = wp.media.controller.State.extend({
    1512        defaults: {
    1613                id:      'edit-attachment',
    1714                // Title string passed to the frame's title region view.
    18                 title:   l10n.attachmentDetails,
     15                title:   wp.i18n.__( 'Attachment Details' ),
    1916                // Region mode defaults.
    2017                content: 'edit-metadata',
    2118                menu:    false,
    module.exports = DeleteSelectedPermanently; 
    190187 * @augments Backbone.View
    191188 */
    192189var Button = wp.media.view.Button,
    193         l10n = wp.media.view.l10n,
    194190        DeleteSelected;
    195191
    196192DeleteSelected = Button.extend({
    DeleteSelected = Button.extend({ 
    204200
    205201        filterChange: function( model ) {
    206202                if ( 'trash' === model.get( 'status' ) ) {
    207                         this.model.set( 'text', l10n.untrashSelected );
     203                        this.model.set( 'text', wp.i18n.__( 'Untrash Selected' ) );
    208204                } else if ( wp.media.view.settings.mediaTrash ) {
    209                         this.model.set( 'text', l10n.trashSelected );
     205                        this.model.set( 'text', wp.i18n.__( 'Trash Selected' ) );
    210206                } else {
    211                         this.model.set( 'text', l10n.deleteSelected );
     207                        this.model.set( 'text', wp.i18n.__( 'Delete Selected' ) );
    212208                }
    213209        },
    214210
    module.exports = DeleteSelected; 
    241237 * @augments Backbone.View
    242238 */
    243239var Button = wp.media.view.Button,
    244         l10n = wp.media.view.l10n,
    245240        SelectModeToggle;
    246241
    247242SelectModeToggle = Button.extend({
    SelectModeToggle = Button.extend({ 
    283278                if ( this.controller.isModeActive( 'select' ) ) {
    284279                        this.model.set( {
    285280                                size: 'large',
    286                                 text: l10n.cancelSelection
     281                                text: wp.i18n.__( 'Cancel Selection' )
    287282                        } );
    288283                        children.not( '.spinner, .media-button' ).hide();
    289284                        this.$el.show();
    SelectModeToggle = Button.extend({ 
    291286                } else {
    292287                        this.model.set( {
    293288                                size: '',
    294                                 text: l10n.bulkSelect
     289                                text: wp.i18n.__( 'Bulk Select' )
    295290                        } );
    296291                        this.controller.content.get().$el.removeClass( 'fixed' );
    297292                        toolbar.$el.css( 'width', '' );
  • src/wp-includes/js/media-views.js

    diff --git src/wp-includes/js/media-views.js src/wp-includes/js/media-views.js
    index e8a8202..418cbce 100644
    module.exports = CollectionAdd; 
    136136 * @param {string}                     attributes.collectionType         The collection type. (e.g. 'playlist').
    137137 */
    138138var Library = wp.media.controller.Library,
    139         l10n = wp.media.view.l10n,
    140139        $ = jQuery,
    141140        CollectionEdit;
    142141
    CollectionEdit = Library.extend({ 
    249248
    250249                // Add the 'Reverse order' button to the toolbar.
    251250                attachmentsBrowserView.toolbar.set( 'reverse', {
    252                         text:     l10n.reverseOrder,
     251                        text:     wp.i18n.__( 'Reverse order' ),
    253252                        priority: 80,
    254253
    255254                        click: function() {
    module.exports = CollectionEdit; 
    271270 * @augments wp.media.controller.State
    272271 * @augments Backbone.Model
    273272 */
    274 var l10n = wp.media.view.l10n,
    275         Cropper;
    276 
    277 Cropper = wp.media.controller.State.extend({
     273var Cropper = wp.media.controller.State.extend({
    278274        defaults: {
    279275                id:          'cropper',
    280                 title:       l10n.cropImage,
     276                title:       wp.i18n.__( 'Crop Image' ),
    281277                // Region mode defaults.
    282278                toolbar:     'crop',
    283279                content:     'crop',
    Cropper = wp.media.controller.State.extend({ 
    323319                        items: {
    324320                                insert: {
    325321                                        style:    'primary',
    326                                         text:     l10n.cropImage,
     322                                        text:     wp.i18n.__( 'Crop Image' ),
    327323                                        priority: 80,
    328324                                        requires: { library: false, selection: false },
    329325
    Cropper = wp.media.controller.State.extend({ 
    334330                                                selection = controller.state().get('selection').first();
    335331                                                selection.set({cropDetails: controller.state().imgSelect.getSelection()});
    336332
    337                                                 this.$el.text(l10n.cropping);
     333                                                this.$el.text( wp.i18n.__( 'Cropping&hellip;' ) );
    338334                                                this.$el.attr('disabled', true);
    339335
    340336                                                controller.state().doCrop( selection ).done( function( croppedImage ) {
    Cropper = wp.media.controller.State.extend({ 
    352348                        _.extend( toolbarOptions.items, {
    353349                                skip: {
    354350                                        style:      'secondary',
    355                                         text:       l10n.skipCropping,
     351                                        text:       wp.i18n.__( 'Skip Cropping' ),
    356352                                        priority:   70,
    357353                                        requires:   { library: false, selection: false },
    358354                                        click:      function() {
    module.exports = CustomizeImageCropper; 
    445441 * @param {string}                    [attributes.menu=false]         Initial mode for the menu region.
    446442 * @param {string}                    [attributes.url]                Unused. @todo Consider removal.
    447443 */
    448 var l10n = wp.media.view.l10n,
    449         EditImage;
    450 
    451 EditImage = wp.media.controller.State.extend({
     444var EditImage = wp.media.controller.State.extend({
    452445        defaults: {
    453446                id:      'edit-image',
    454                 title:   l10n.editImage,
     447                title:   wp.i18n.__( 'Edit Image' ),
    455448                menu:    false,
    456449                toolbar: 'edit-image',
    457450                content: 'edit-image',
    EditImage = wp.media.controller.State.extend({ 
    485478                        items: {
    486479                                back: {
    487480                                        style: 'primary',
    488                                         text:     l10n.back,
     481                                        text:     wp.i18n.__( 'Back' ),
    489482                                        priority: 20,
    490483                                        click:    function() {
    491484                                                if ( previous ) {
    module.exports = EditImage; 
    524517 * @param {string} [attributes.url]                   The embed URL.
    525518 * @param {object} [attributes.metadata={}]           Properties of the embed, which will override attributes.url if set.
    526519 */
    527 var l10n = wp.media.view.l10n,
    528         $ = Backbone.$,
     520var $ = Backbone.$,
    529521        Embed;
    530522
    531523Embed = wp.media.controller.State.extend({
    532524        defaults: {
    533525                id:       'embed',
    534                 title:    l10n.insertFromUrlTitle,
     526                title:    wp.i18n.__( 'Insert from URL' ),
    535527                content:  'embed',
    536528                menu:     'default',
    537529                toolbar:  'main-embed',
    module.exports = FeaturedImage; 
    794786 */
    795787var Selection = wp.media.model.Selection,
    796788        Library = wp.media.controller.Library,
    797         l10n = wp.media.view.l10n,
    798789        GalleryAdd;
    799790
    800791GalleryAdd = Library.extend({
    801792        defaults: _.defaults({
    802793                id:            'gallery-library',
    803                 title:         l10n.addToGalleryTitle,
     794                title:         wp.i18n.__( 'Add to Gallery' ),
    804795                multiple:      'add',
    805796                filterable:    'uploaded',
    806797                menu:          'gallery',
    module.exports = GalleryAdd; 
    885876 *                                                                        If none supplied, defaults to wp.media.view.Attachment.EditLibrary.
    886877 */
    887878var Library = wp.media.controller.Library,
    888         l10n = wp.media.view.l10n,
    889879        GalleryEdit;
    890880
    891881GalleryEdit = Library.extend({
    892882        defaults: {
    893883                id:               'gallery-edit',
    894                 title:            l10n.editGalleryTitle,
     884                title:            wp.i18n.__( 'Edit Gallery' ),
    895885                multiple:         false,
    896886                searchable:       false,
    897887                sortable:         true,
    GalleryEdit = Library.extend({ 
    981971                });
    982972
    983973                browser.toolbar.set( 'reverse', {
    984                         text:     l10n.reverseOrder,
     974                        text:     wp.i18n.__( 'Reverse order' ),
    985975                        priority: 80,
    986976
    987977                        click: function() {
    module.exports = GalleryEdit; 
    10201010 */
    10211011var State = wp.media.controller.State,
    10221012        Library = wp.media.controller.Library,
    1023         l10n = wp.media.view.l10n,
    10241013        ImageDetails;
    10251014
    10261015ImageDetails = State.extend({
    10271016        defaults: _.defaults({
    10281017                id:       'image-details',
    1029                 title:    l10n.imageDetailsTitle,
     1018                title:    wp.i18n.__( 'Image Details' ),
    10301019                content:  'image-details',
    10311020                menu:     false,
    10321021                router:   false,
    module.exports = ImageDetails; 
    10901079 * @param {boolean}                         [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user.
    10911080 * @param {boolean}                         [attributes.syncSelection=true]      Whether the Attachments selection should be persisted from the last state.
    10921081 */
    1093 var l10n = wp.media.view.l10n,
    1094         getUserSetting = window.getUserSetting,
     1082var getUserSetting = window.getUserSetting,
    10951083        setUserSetting = window.setUserSetting,
    10961084        Library;
    10971085
    10981086Library = wp.media.controller.State.extend({
    10991087        defaults: {
    11001088                id:                 'library',
    1101                 title:              l10n.mediaLibraryTitle,
     1089                title:              wp.i18n.__( 'Media Library' ),
    11021090                multiple:           false,
    11031091                content:            'upload',
    11041092                menu:               'default',
    module.exports = Region; 
    16101598 * @param {boolean}                    [attributes.syncSelection=true]      Whether the Attachments selection should be persisted from the last state.
    16111599 */
    16121600var Library = wp.media.controller.Library,
    1613         l10n = wp.media.view.l10n,
    16141601        ReplaceImage;
    16151602
    16161603ReplaceImage = Library.extend({
    16171604        defaults: _.defaults({
    16181605                id:            'replace-image',
    1619                 title:         l10n.replaceImageTitle,
     1606                title:         wp.i18n.__( 'Replace Image' ),
    16201607                multiple:      false,
    16211608                filterable:    'uploaded',
    16221609                toolbar:       'replace',
    All = wp.media.view.AttachmentFilters.extend({ 
    25092496                });
    25102497
    25112498                filters.all = {
    2512                         text:  l10n.allMediaItems,
     2499                        text:  wp.i18n.__( 'All media items' ),
    25132500                        props: {
    25142501                                status:  null,
    25152502                                type:    null,
    All = wp.media.view.AttachmentFilters.extend({ 
    25352522                }
    25362523
    25372524                filters.unattached = {
    2538                         text:  l10n.unattached,
     2525                        text:  wp.i18n.__( 'Unattached' ),
    25392526                        props: {
    25402527                                status:     null,
    25412528                                uploadedTo: 0,
    All = wp.media.view.AttachmentFilters.extend({ 
    25502537                        this.controller.isModeActive( 'grid' ) ) {
    25512538
    25522539                        filters.trash = {
    2553                                 text:  l10n.trash,
     2540                                text:  wp.i18n._x( 'Trash', 'noun' ),
    25542541                                props: {
    25552542                                        uploadedTo: null,
    25562543                                        status:     'trash',
    module.exports = All; 
    25782565 * @augments wp.Backbone.View
    25792566 * @augments Backbone.View
    25802567 */
    2581 var l10n = wp.media.view.l10n,
    2582         DateFilter;
    2583 
    2584 DateFilter = wp.media.view.AttachmentFilters.extend({
     2568var DateFilter = wp.media.view.AttachmentFilters.extend({
    25852569        id: 'media-attachment-date-filters',
    25862570
    25872571        createFilters: function() {
    DateFilter = wp.media.view.AttachmentFilters.extend({ 
    25962580                        };
    25972581                });
    25982582                filters.all = {
    2599                         text:  l10n.allDates,
     2583                        text:  wp.i18n.__( 'All dates' ),
    26002584                        props: {
    26012585                                monthnum: false,
    26022586                                year:  false
    Uploaded = wp.media.view.AttachmentFilters.extend({ 
    26342618
    26352619                this.filters = {
    26362620                        all: {
    2637                                 text:  text || l10n.allMediaItems,
     2621                                text:  text || wp.i18n.__( 'All media items' ),
    26382622                                props: {
    26392623                                        uploadedTo: null,
    26402624                                        orderby: 'date',
    Uploaded = wp.media.view.AttachmentFilters.extend({ 
    26542638                        },
    26552639
    26562640                        unattached: {
    2657                                 text:  l10n.unattached,
     2641                                text:  wp.i18n.__( 'Unattached' ),
    26582642                                props: {
    26592643                                        uploadedTo: 0,
    26602644                                        orderby: 'menuOrder',
    module.exports = Attachment; 
    32253209 * @augments Backbone.View
    32263210 */
    32273211var Attachment = wp.media.view.Attachment,
    3228         l10n = wp.media.view.l10n,
    32293212        Details;
    32303213
    32313214Details = Attachment.extend({
    Details = Attachment.extend({ 
    32803263        deleteAttachment: function( event ) {
    32813264                event.preventDefault();
    32823265
    3283                 if ( window.confirm( l10n.warnDelete ) ) {
     3266                if ( window.confirm( wp.i18n.__( "You are about to permanently delete this item.\n  'Cancel' to stop, 'OK' to delete." ) ) ) {
    32843267                        this.model.destroy();
    32853268                        // Keep focus inside media modal
    32863269                        // after image is deleted
    module.exports = Attachments; 
    37513734 */
    37523735var View = wp.media.View,
    37533736        mediaTrash = wp.media.view.settings.mediaTrash,
    3754         l10n = wp.media.view.l10n,
    37553737        $ = jQuery,
    37563738        AttachmentsBrowser;
    37573739
    AttachmentsBrowser = View.extend({ 
    38293811                        // "Filters" will return a <select>, need to render
    38303812                        // screen reader text before
    38313813                        this.toolbar.set( 'filtersLabel', new wp.media.view.Label({
    3832                                 value: l10n.filterByType,
     3814                                value: wp.i18n.__( 'Filter by type' ),
    38333815                                attributes: {
    38343816                                        'for':  'media-attachment-filters'
    38353817                                },
    AttachmentsBrowser = View.extend({ 
    38693851
    38703852                        // DateFilter is a <select>, screen reader text needs to be rendered before
    38713853                        this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({
    3872                                 value: l10n.filterByDate,
     3854                                value: wp.i18n.__( 'Filter by date' ),
    38733855                                attributes: {
    38743856                                        'for': 'media-attachment-date-filters'
    38753857                                },
    AttachmentsBrowser = View.extend({ 
    38833865
    38843866                        // BulkSelection is a <div> with subviews, including screen reader text
    38853867                        this.toolbar.set( 'selectModeToggleButton', new wp.media.view.SelectModeToggleButton({
    3886                                 text: l10n.bulkSelect,
     3868                                text: wp.i18n.__( 'Bulk Select' ),
    38873869                                controller: this.controller,
    38883870                                priority: -70
    38893871                        }).render() );
    AttachmentsBrowser = View.extend({ 
    38923874                                filters: Filters,
    38933875                                style: 'primary',
    38943876                                disabled: true,
    3895                                 text: mediaTrash ? l10n.trashSelected : l10n.deleteSelected,
     3877                                text: mediaTrash ? wp.i18n.__( 'Trash Selected' ) : wp.i18n.__( 'Delete Selected' ),
    38963878                                controller: this.controller,
    38973879                                priority: -60,
    38983880                                click: function() {
    AttachmentsBrowser = View.extend({ 
    39043886                                                return;
    39053887                                        }
    39063888
    3907                                         if ( ! mediaTrash && ! window.confirm( l10n.warnBulkDelete ) ) {
     3889                                        if ( ! mediaTrash && ! window.confirm( wp.i18n.__( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ) ) ) {
    39083890                                                return;
    39093891                                        }
    39103892
    39113893                                        if ( mediaTrash &&
    39123894                                                'trash' !== selection.at( 0 ).get( 'status' ) &&
    3913                                                 ! window.confirm( l10n.warnBulkTrash ) ) {
     3895                                                ! window.confirm( wp.i18n.__( "You are about to trash these items.\n  'Cancel' to stop, 'OK' to delete." ) ) ) {
    39143896
    39153897                                                return;
    39163898                                        }
    AttachmentsBrowser = View.extend({ 
    39523934                                        filters: Filters,
    39533935                                        style: 'primary',
    39543936                                        disabled: true,
    3955                                         text: l10n.deleteSelected,
     3937                                        text: wp.i18n.__( 'Delete Selected' ),
    39563938                                        controller: this.controller,
    39573939                                        priority: -55,
    39583940                                        click: function() {
    39593941                                                var removed = [], selection = this.controller.state().get( 'selection' );
    39603942
    3961                                                 if ( ! selection.length || ! window.confirm( l10n.warnBulkDelete ) ) {
     3943                                                if ( ! selection.length || ! window.confirm( wp.i18n.__( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ) ) ) {
    39623944                                                        return;
    39633945                                                }
    39643946
    AttachmentsBrowser = View.extend({ 
    39803962                } else if ( this.options.date ) {
    39813963                        // DateFilter is a <select>, screen reader text needs to be rendered before
    39823964                        this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({
    3983                                 value: l10n.filterByDate,
     3965                                value: wp.i18n.__( 'Filter by date' ),
    39843966                                attributes: {
    39853967                                        'for': 'media-attachment-date-filters'
    39863968                                },
    AttachmentsBrowser = View.extend({ 
    39963978                if ( this.options.search ) {
    39973979                        // Search is an input, screen reader text needs to be rendered before
    39983980                        this.toolbar.set( 'searchLabel', new wp.media.view.Label({
    3999                                 value: l10n.searchMediaLabel,
     3981                                value: wp.i18n.__( 'Search Media' ),
    40003982                                attributes: {
    40013983                                        'for': 'media-search-input'
    40023984                                },
    AttachmentsBrowser = View.extend({ 
    40113993
    40123994                if ( this.options.dragInfo ) {
    40133995                        this.toolbar.set( 'dragInfo', new View({
    4014                                 el: $( '<div class="instructions">' + l10n.dragInfo + '</div>' )[0],
     3996                                el: $( '<div class="instructions">' + wp.i18n.__( 'Drag and drop to reorder media files.' ) + '</div>' )[0],
    40153997                                priority: -40
    40163998                        }) );
    40173999                }
    40184000
    40194001                if ( this.options.suggestedWidth && this.options.suggestedHeight ) {
    40204002                        this.toolbar.set( 'suggestedDimensions', new View({
    4021                                 el: $( '<div class="instructions">' + l10n.suggestedDimensions + ' ' + this.options.suggestedWidth + ' &times; ' + this.options.suggestedHeight + '</div>' )[0],
     4003                                el: $( '<div class="instructions">' + wp.i18n.__( 'Suggested image dimensions:' ) + ' ' + this.options.suggestedWidth + ' &times; ' + this.options.suggestedHeight + '</div>' )[0],
    40224004                                priority: -40
    40234005                        }) );
    40244006                }
    AttachmentsBrowser = View.extend({ 
    40544036                this.uploader = new wp.media.view.UploaderInline({
    40554037                        controller: this.controller,
    40564038                        status:     false,
    4057                         message:    this.controller.isModeActive( 'grid' ) ? '' : l10n.noItemsFound,
     4039                        message:    this.controller.isModeActive( 'grid' ) ? '' : wp.i18n.__( 'No items found.' ),
    40584040                        canClose:   this.controller.isModeActive( 'grid' )
    40594041                });
    40604042
    AttachmentsBrowser = View.extend({ 
    40984080                        });
    40994081
    41004082                        this.attachmentsNoResults.$el.addClass( 'hidden no-media' );
    4101                         this.attachmentsNoResults.$el.html( l10n.noMedia );
     4083                        this.attachmentsNoResults.$el.html( wp.i18n.__( 'No media files found.' ) );
    41024084
    41034085                        this.views.add( this.attachmentsNoResults );
    41044086                }
    module.exports = Button; 
    43514333 */
    43524334var View = wp.media.View,
    43534335        UploaderStatus = wp.media.view.UploaderStatus,
    4354         l10n = wp.media.view.l10n,
    43554336        $ = jQuery,
    43564337        Cropper;
    43574338
    Cropper = View.extend({ 
    43754356        },
    43764357        prepare: function() {
    43774358                return {
    4378                         title: l10n.cropYourImage,
     4359                        title: wp.i18n.__( 'Crop your image' ),
    43794360                        url: this.options.attachment.get('url')
    43804361                };
    43814362        },
    Cropper = View.extend({ 
    43944375
    43954376                this.views.add( '.upload-errors', new wp.media.view.UploaderStatusError({
    43964377                        filename: UploaderStatus.prototype.filename(filename),
    4397                         message: window._wpMediaViewsL10n.cropError
     4378                        message: wp.i18n.__( 'There has been an error cropping your image.' )
    43984379                }), { at: 0 });
    43994380        }
    44004381});
    module.exports = Frame; 
    49514932 * @mixes wp.media.controller.StateMachine
    49524933 */
    49534934var Select = wp.media.view.MediaFrame.Select,
    4954         l10n = wp.media.view.l10n,
    49554935        ImageDetails;
    49564936
    49574937ImageDetails = Select.extend({
    ImageDetails = Select.extend({ 
    49624942                content: 'image-details',
    49634943                toolbar: 'image-details',
    49644944                type:    'link',
    4965                 title:    l10n.imageDetailsTitle,
     4945                title:    wp.i18n.__( 'Image Details' ),
    49664946                priority: 120
    49674947        },
    49684948
    ImageDetails = Select.extend({ 
    49934973                                library: wp.media.query( { type: 'image' } ),
    49944974                                image: this.image,
    49954975                                multiple:  false,
    4996                                 title:     l10n.imageReplaceTitle,
     4976                                title:     wp.i18n.__( 'Replace Image' ),
    49974977                                toolbar: 'replace',
    49984978                                priority:  80,
    49994979                                displaySettings: true
    ImageDetails = Select.extend({ 
    50375017                        items: {
    50385018                                select: {
    50395019                                        style:    'primary',
    5040                                         text:     l10n.update,
     5020                                        text:     wp.i18n.__( 'Update' ),
    50415021                                        priority: 80,
    50425022
    50435023                                        click: function() {
    ImageDetails = Select.extend({ 
    50685048                        controller: this,
    50695049                        items: {
    50705050                                back: {
    5071                                         text:     l10n.back,
     5051                                        text:     wp.i18n.__( 'Back' ),
    50725052                                        priority: 20,
    50735053                                        click:    function() {
    50745054                                                if ( previous ) {
    ImageDetails = Select.extend({ 
    50815061
    50825062                                replace: {
    50835063                                        style:    'primary',
    5084                                         text:     l10n.replace,
     5064                                        text:     wp.i18n.__( 'Replace' ),
    50855065                                        priority: 80,
    50865066
    50875067                                        click: function() {
    Post = Select.extend({ 
    51675147                        // Main states.
    51685148                        new Library({
    51695149                                id:         'insert',
    5170                                 title:      l10n.insertMediaTitle,
     5150                                title:      wp.i18n.__( 'Insert Media' ),
    51715151                                priority:   20,
    51725152                                toolbar:    'main-insert',
    51735153                                filterable: 'all',
    Post = Select.extend({ 
    51885168
    51895169                        new Library({
    51905170                                id:         'gallery',
    5191                                 title:      l10n.createGalleryTitle,
     5171                                title:      wp.i18n.__( 'Create Gallery' ),
    51925172                                priority:   40,
    51935173                                toolbar:    'main-gallery',
    51945174                                filterable: 'uploaded',
    Post = Select.extend({ 
    52165196
    52175197                        new Library({
    52185198                                id:         'playlist',
    5219                                 title:      l10n.createPlaylistTitle,
     5199                                title:      wp.i18n.__( 'Create Audio Playlist' ),
    52205200                                priority:   60,
    52215201                                toolbar:    'main-playlist',
    52225202                                filterable: 'uploaded',
    Post = Select.extend({ 
    52325212                        new wp.media.controller.CollectionEdit({
    52335213                                type: 'audio',
    52345214                                collectionType: 'playlist',
    5235                                 title:          l10n.editPlaylistTitle,
     5215                                title:          wp.i18n.__( 'Edit Audio Playlist' ),
    52365216                                SettingsView:   wp.media.view.Settings.Playlist,
    52375217                                library:        options.selection,
    52385218                                editing:        options.editing,
    52395219                                menu:           'playlist',
    5240                                 dragInfoText:   l10n.playlistDragInfo,
     5220                                dragInfoText:   wp.i18n.__( 'Drag and drop to reorder tracks.' ),
    52415221                                dragInfo:       false
    52425222                        }),
    52435223
    52445224                        new wp.media.controller.CollectionAdd({
    52455225                                type: 'audio',
    52465226                                collectionType: 'playlist',
    5247                                 title: l10n.addToPlaylistTitle
     5227                                title: wp.i18n.__( 'Add to Audio Playlist' )
    52485228                        }),
    52495229
    52505230                        new Library({
    52515231                                id:         'video-playlist',
    5252                                 title:      l10n.createVideoPlaylistTitle,
     5232                                title:      wp.i18n.__( 'Create Video Playlist' ),
    52535233                                priority:   60,
    52545234                                toolbar:    'main-video-playlist',
    52555235                                filterable: 'uploaded',
    Post = Select.extend({ 
    52645244                        new wp.media.controller.CollectionEdit({
    52655245                                type: 'video',
    52665246                                collectionType: 'playlist',
    5267                                 title:          l10n.editVideoPlaylistTitle,
     5247                                title:          wp.i18n.__( 'Create Video Playlist' ),
    52685248                                SettingsView:   wp.media.view.Settings.Playlist,
    52695249                                library:        options.selection,
    52705250                                editing:        options.editing,
    52715251                                menu:           'video-playlist',
    5272                                 dragInfoText:   l10n.videoPlaylistDragInfo,
     5252                                dragInfoText:   wp.i18n.__( 'Drag and drop to reorder videos.' ),
    52735253                                dragInfo:       false
    52745254                        }),
    52755255
    52765256                        new wp.media.controller.CollectionAdd({
    52775257                                type: 'video',
    52785258                                collectionType: 'playlist',
    5279                                 title: l10n.addToVideoPlaylistTitle
     5259                                title: wp.i18n.__( 'Add to Video Playlist' )
    52805260                        })
    52815261                ]);
    52825262
    Post = Select.extend({ 
    53935373
    53945374                view.set({
    53955375                        cancel: {
    5396                                 text:     l10n.cancelGalleryTitle,
     5376                                text:     wp.i18n.__( '&#8592; Cancel Gallery' ),
    53975377                                priority: 20,
    53985378                                click:    function() {
    53995379                                        if ( previous ) {
    Post = Select.extend({ 
    54215401
    54225402                view.set({
    54235403                        cancel: {
    5424                                 text:     l10n.cancelPlaylistTitle,
     5404                                text:     wp.i18n.__( '&#8592; Cancel Audio Playlist' ),
    54255405                                priority: 20,
    54265406                                click:    function() {
    54275407                                        if ( previous ) {
    Post = Select.extend({ 
    54455425
    54465426                view.set({
    54475427                        cancel: {
    5448                                 text:     l10n.cancelVideoPlaylistTitle,
     5428                                text:     wp.i18n.__( '&#8592; Cancel Video Playlist' ),
    54495429                                priority: 20,
    54505430                                click:    function() {
    54515431                                        if ( previous ) {
    Post = Select.extend({ 
    54955475                }).render();
    54965476
    54975477                view.toolbar.set( 'backToLibrary', {
    5498                         text:     l10n.returnToLibrary,
     5478                        text:     wp.i18n.__( '&#8592; Return to library' ),
    54995479                        priority: -100,
    55005480
    55015481                        click: function() {
    Post = Select.extend({ 
    55795559
    55805560                view.set( 'gallery', {
    55815561                        style:    'primary',
    5582                         text:     l10n.createNewGallery,
     5562                        text:     wp.i18n.__( 'Create a new gallery' ),
    55835563                        priority: 60,
    55845564                        requires: { selection: true },
    55855565
    Post = Select.extend({ 
    56095589
    56105590                view.set( 'playlist', {
    56115591                        style:    'primary',
    5612                         text:     l10n.createNewPlaylist,
     5592                        text:     wp.i18n.__( 'Create a new playlist' ),
    56135593                        priority: 100,
    56145594                        requires: { selection: true },
    56155595
    Post = Select.extend({ 
    56395619
    56405620                view.set( 'video-playlist', {
    56415621                        style:    'primary',
    5642                         text:     l10n.createNewVideoPlaylist,
     5622                        text:     wp.i18n.__( 'Create a new video playlist' ),
    56435623                        priority: 100,
    56445624                        requires: { selection: true },
    56455625
    Post = Select.extend({ 
    56825662                        items: {
    56835663                                insert: {
    56845664                                        style:    'primary',
    5685                                         text:     editing ? l10n.updateGallery : l10n.insertGallery,
     5665                                        text:     editing ? wp.i18n.__( 'Update gallery' ) : wp.i18n.__( 'Insert gallery' ),
    56865666                                        priority: 80,
    56875667                                        requires: { library: true },
    56885668
    Post = Select.extend({ 
    57115691                        items: {
    57125692                                insert: {
    57135693                                        style:    'primary',
    5714                                         text:     l10n.addToGallery,
     5694                                        text:     wp.i18n.__( 'Add to gallery' ),
    57155695                                        priority: 80,
    57165696                                        requires: { selection: true },
    57175697
    Post = Select.extend({ 
    57395719                        items: {
    57405720                                insert: {
    57415721                                        style:    'primary',
    5742                                         text:     editing ? l10n.updatePlaylist : l10n.insertPlaylist,
     5722                                        text:     editing ? wp.i18n.__( 'Update audio playlist' ) : wp.i18n.__( 'Insert audio playlist' ),
    57435723                                        priority: 80,
    57445724                                        requires: { library: true },
    57455725
    Post = Select.extend({ 
    57685748                        items: {
    57695749                                insert: {
    57705750                                        style:    'primary',
    5771                                         text:     l10n.addToPlaylist,
     5751                                        text:     wp.i18n.__( 'Add to audio playlist' ),
    57725752                                        priority: 80,
    57735753                                        requires: { selection: true },
    57745754
    Post = Select.extend({ 
    57965776                        items: {
    57975777                                insert: {
    57985778                                        style:    'primary',
    5799                                         text:     editing ? l10n.updateVideoPlaylist : l10n.insertVideoPlaylist,
     5779                                        text:     editing ? wp.i18n.__( 'Update video playlist' ) : wp.i18n.__( 'Insert video playlist' ),
    58005780                                        priority: 140,
    58015781                                        requires: { library: true },
    58025782
    Post = Select.extend({ 
    58255805                        items: {
    58265806                                insert: {
    58275807                                        style:    'primary',
    5828                                         text:     l10n.addToVideoPlaylist,
     5808                                        text:     wp.i18n.__( 'Add to video playlist' ),
    58295809                                        priority: 140,
    58305810                                        requires: { selection: true },
    58315811
    module.exports = Post; 
    58625842 */
    58635843
    58645844var MediaFrame = wp.media.view.MediaFrame,
    5865         l10n = wp.media.view.l10n,
    58665845        Select;
    58675846
    58685847Select = MediaFrame.extend({
    Select = MediaFrame.extend({ 
    59495928        browseRouter: function( routerView ) {
    59505929                routerView.set({
    59515930                        upload: {
    5952                                 text:     l10n.uploadFilesTitle,
     5931                                text:     wp.i18n.__( 'Upload Files' ),
    59535932                                priority: 20
    59545933                        },
    59555934                        browse: {
    5956                                 text:     l10n.mediaLibraryTitle,
     5935                                text:     wp.i18n.__( 'Media Library' ),
    59575936                                priority: 40
    59585937                        }
    59595938                });
    Search = wp.media.View.extend({ 
    70617040
    70627041        attributes: {
    70637042                type:        'search',
    7064                 placeholder: l10n.search
     7043                placeholder: wp.i18n.__( 'Search' )
    70657044        },
    70667045
    70677046        events: {
    module.exports = Search; 
    70997078 * @augments wp.Backbone.View
    71007079 * @augments Backbone.View
    71017080 */
    7102 var l10n = wp.media.view.l10n,
    7103         Selection;
     7081var Selection;
    71047082
    71057083Selection = wp.media.View.extend({
    71067084        tagName:   'div',
    Selection = wp.media.View.extend({ 
    71517129                this.$el.toggleClass( 'one', 1 === collection.length );
    71527130                this.$el.toggleClass( 'editing', editing );
    71537131
    7154                 this.$('.count').text( l10n.selected.replace('%d', collection.length) );
     7132                this.$('.count').text( wp.i18n._n( '%d selected', '%d selected', collection.length ) );
    71557133        },
    71567134
    71577135        edit: function( event ) {
    module.exports = Embed; 
    77807758 * @augments Backbone.View
    77817759 */
    77827760var Toolbar = wp.media.view.Toolbar,
    7783         l10n = wp.media.view.l10n,
    77847761        Select;
    77857762
    77867763Select = Toolbar.extend({
    Select = Toolbar.extend({ 
    77947771                        state: false,
    77957772                        reset: true,
    77967773                        close: true,
    7797                         text:  l10n.select,
     7774                        text:  wp.i18n.__( 'Select' ),
    77987775
    77997776                        // Does the button rely on the selection?
    78007777                        requires: {
    module.exports = Select; 
    78527829 * @augments Backbone.View
    78537830 */
    78547831var View = wp.media.View,
    7855         l10n = wp.media.view.l10n,
    78567832        $ = jQuery,
    78577833        EditorUploader;
    78587834
    EditorUploader = View.extend({ 
    79927968                        this.workflow = wp.media.editor.open( window.wpActiveEditor, {
    79937969                                frame:    'post',
    79947970                                state:    'insert',
    7995                                 title:    l10n.addMedia,
     7971                                title:    wp.i18n.__( 'Add Media' ),
    79967972                                multiple: true
    79977973                        });
    79987974
  • src/wp-includes/js/media/audiovideo.manifest.js

    diff --git src/wp-includes/js/media/audiovideo.manifest.js src/wp-includes/js/media/audiovideo.manifest.js
    index 7217e02..bf370b8 100644
     
    11var media = wp.media,
    2         baseSettings = window._wpmejsSettings || {},
    3         l10n = window._wpMediaViewsL10n || {};
     2        baseSettings = window._wpmejsSettings || {};
    43
    54/**
    65 * @mixin
    wp.media.mixin = { 
    7877 */
    7978wp.media.playlist = new wp.media.collection({
    8079        tag: 'playlist',
    81         editTitle : l10n.editPlaylistTitle,
     80        editTitle : wp.i18n.__( 'Edit Audio Playlist' ),
    8281        defaults : {
    8382                id: wp.media.view.settings.post.id,
    8483                style: 'light',
  • src/wp-includes/js/media/views/attachments/browser.js

    diff --git src/wp-includes/js/media/views/attachments/browser.js src/wp-includes/js/media/views/attachments/browser.js
    index bd83278..7bcd4d4 100644
     
    2020 */
    2121var View = wp.media.View,
    2222        mediaTrash = wp.media.view.settings.mediaTrash,
    23         l10n = wp.media.view.l10n,
    2423        $ = jQuery,
    2524        AttachmentsBrowser;
    2625
    AttachmentsBrowser = View.extend({ 
    9897                        // "Filters" will return a <select>, need to render
    9998                        // screen reader text before
    10099                        this.toolbar.set( 'filtersLabel', new wp.media.view.Label({
    101                                 value: l10n.filterByType,
     100                                value: wp.i18n.__( 'Filter by type' ),
    102101                                attributes: {
    103102                                        'for':  'media-attachment-filters'
    104103                                },
    AttachmentsBrowser = View.extend({ 
    138137
    139138                        // DateFilter is a <select>, screen reader text needs to be rendered before
    140139                        this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({
    141                                 value: l10n.filterByDate,
     140                                value: wp.i18n.__( 'Filter by date' ),
    142141                                attributes: {
    143142                                        'for': 'media-attachment-date-filters'
    144143                                },
    AttachmentsBrowser = View.extend({ 
    152151
    153152                        // BulkSelection is a <div> with subviews, including screen reader text
    154153                        this.toolbar.set( 'selectModeToggleButton', new wp.media.view.SelectModeToggleButton({
    155                                 text: l10n.bulkSelect,
     154                                text: wp.i18n.__( 'Bulk Select' ),
    156155                                controller: this.controller,
    157156                                priority: -70
    158157                        }).render() );
    AttachmentsBrowser = View.extend({ 
    161160                                filters: Filters,
    162161                                style: 'primary',
    163162                                disabled: true,
    164                                 text: mediaTrash ? l10n.trashSelected : l10n.deleteSelected,
     163                                text: mediaTrash ? wp.i18n.__( 'Trash Selected' ) : wp.i18n.__( 'Delete Selected' ),
    165164                                controller: this.controller,
    166165                                priority: -60,
    167166                                click: function() {
    AttachmentsBrowser = View.extend({ 
    173172                                                return;
    174173                                        }
    175174
    176                                         if ( ! mediaTrash && ! window.confirm( l10n.warnBulkDelete ) ) {
     175                                        if ( ! mediaTrash && ! window.confirm( wp.i18n.__( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ) ) ) {
    177176                                                return;
    178177                                        }
    179178
    180179                                        if ( mediaTrash &&
    181180                                                'trash' !== selection.at( 0 ).get( 'status' ) &&
    182                                                 ! window.confirm( l10n.warnBulkTrash ) ) {
     181                                                ! window.confirm( wp.i18n.__( "You are about to trash these items.\n  'Cancel' to stop, 'OK' to delete." ) ) ) {
    183182
    184183                                                return;
    185184                                        }
    AttachmentsBrowser = View.extend({ 
    221220                                        filters: Filters,
    222221                                        style: 'primary',
    223222                                        disabled: true,
    224                                         text: l10n.deleteSelected,
     223                                        text: wp.i18n.__( 'Delete Selected' ),
    225224                                        controller: this.controller,
    226225                                        priority: -55,
    227226                                        click: function() {
    228227                                                var removed = [], selection = this.controller.state().get( 'selection' );
    229228
    230                                                 if ( ! selection.length || ! window.confirm( l10n.warnBulkDelete ) ) {
     229                                                if ( ! selection.length || ! window.confirm( wp.i18n.__( "You are about to permanently delete these items.\n  'Cancel' to stop, 'OK' to delete." ) ) ) {
    231230                                                        return;
    232231                                                }
    233232
    AttachmentsBrowser = View.extend({ 
    249248                } else if ( this.options.date ) {
    250249                        // DateFilter is a <select>, screen reader text needs to be rendered before
    251250                        this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({
    252                                 value: l10n.filterByDate,
     251                                value: wp.i18n.__( 'Filter by date' ),
    253252                                attributes: {
    254253                                        'for': 'media-attachment-date-filters'
    255254                                },
    AttachmentsBrowser = View.extend({ 
    265264                if ( this.options.search ) {
    266265                        // Search is an input, screen reader text needs to be rendered before
    267266                        this.toolbar.set( 'searchLabel', new wp.media.view.Label({
    268                                 value: l10n.searchMediaLabel,
     267                                value: wp.i18n.__( 'Search Media' ),
    269268                                attributes: {
    270269                                        'for': 'media-search-input'
    271270                                },
    AttachmentsBrowser = View.extend({ 
    280279
    281280                if ( this.options.dragInfo ) {
    282281                        this.toolbar.set( 'dragInfo', new View({
    283                                 el: $( '<div class="instructions">' + l10n.dragInfo + '</div>' )[0],
     282                                el: $( '<div class="instructions">' + wp.i18n.__( 'Drag and drop to reorder media files.' ) + '</div>' )[0],
    284283                                priority: -40
    285284                        }) );
    286285                }
    287286
    288287                if ( this.options.suggestedWidth && this.options.suggestedHeight ) {
    289288                        this.toolbar.set( 'suggestedDimensions', new View({
    290                                 el: $( '<div class="instructions">' + l10n.suggestedDimensions + ' ' + this.options.suggestedWidth + ' &times; ' + this.options.suggestedHeight + '</div>' )[0],
     289                                el: $( '<div class="instructions">' + wp.i18n.__( 'Suggested image dimensions:' ) + ' ' + this.options.suggestedWidth + ' &times; ' + this.options.suggestedHeight + '</div>' )[0],
    291290                                priority: -40
    292291                        }) );
    293292                }
    AttachmentsBrowser = View.extend({ 
    323322                this.uploader = new wp.media.view.UploaderInline({
    324323                        controller: this.controller,
    325324                        status:     false,
    326                         message:    this.controller.isModeActive( 'grid' ) ? '' : l10n.noItemsFound,
     325                        message:    this.controller.isModeActive( 'grid' ) ? '' : wp.i18n.__( 'No items found.' ),
    327326                        canClose:   this.controller.isModeActive( 'grid' )
    328327                });
    329328
    AttachmentsBrowser = View.extend({ 
    367366                        });
    368367
    369368                        this.attachmentsNoResults.$el.addClass( 'hidden no-media' );
    370                         this.attachmentsNoResults.$el.html( l10n.noMedia );
     369                        this.attachmentsNoResults.$el.html( wp.i18n.__( 'No media files found.' ) );
    371370
    372371                        this.views.add( this.attachmentsNoResults );
    373372                }
  • src/wp-includes/js/media/views/button/select-mode-toggle.js

    diff --git src/wp-includes/js/media/views/button/select-mode-toggle.js src/wp-includes/js/media/views/button/select-mode-toggle.js
    index 820e5de..73e03fd 100644
     
    88 * @augments Backbone.View
    99 */
    1010var Button = wp.media.view.Button,
    11         l10n = wp.media.view.l10n,
    1211        SelectModeToggle;
    1312
    1413SelectModeToggle = Button.extend({
    SelectModeToggle = Button.extend({ 
    5049                if ( this.controller.isModeActive( 'select' ) ) {
    5150                        this.model.set( {
    5251                                size: 'large',
    53                                 text: l10n.cancelSelection
     52                                text: wp.i18n.__( 'Cancel Selection' )
    5453                        } );
    5554                        children.not( '.spinner, .media-button' ).hide();
    5655                        this.$el.show();
    SelectModeToggle = Button.extend({ 
    5857                } else {
    5958                        this.model.set( {
    6059                                size: '',
    61                                 text: l10n.bulkSelect
     60                                text: wp.i18n.__( 'Bulk Select' )
    6261                        } );
    6362                        this.controller.content.get().$el.removeClass( 'fixed' );
    6463                        toolbar.$el.css( 'width', '' );
  • src/wp-includes/js/media/views/cropper.js

    diff --git src/wp-includes/js/media/views/cropper.js src/wp-includes/js/media/views/cropper.js
    index 9eb75c3..a7be928 100644
     
    1414 */
    1515var View = wp.media.View,
    1616        UploaderStatus = wp.media.view.UploaderStatus,
    17         l10n = wp.media.view.l10n,
    1817        $ = jQuery,
    1918        Cropper;
    2019
    Cropper = View.extend({ 
    3837        },
    3938        prepare: function() {
    4039                return {
    41                         title: l10n.cropYourImage,
     40                        title: wp.i18n.__( 'Crop your image' ),
    4241                        url: this.options.attachment.get('url')
    4342                };
    4443        },
    Cropper = View.extend({ 
    5756
    5857                this.views.add( '.upload-errors', new wp.media.view.UploaderStatusError({
    5958                        filename: UploaderStatus.prototype.filename(filename),
    60                         message: window._wpMediaViewsL10n.cropError
     59                        message: wp.i18n.__( 'There has been an error cropping your image.' )
    6160                }), { at: 0 });
    6261        }
    6362});
  • src/wp-includes/js/media/views/frame/post.js

    diff --git src/wp-includes/js/media/views/frame/post.js src/wp-includes/js/media/views/frame/post.js
    index f4d078f..628f606 100644
    Post = Select.extend({ 
    5353                        // Main states.
    5454                        new Library({
    5555                                id:         'insert',
    56                                 title:      l10n.insertMediaTitle,
     56                                title:      wp.i18n.__( 'Insert Media' ),
    5757                                priority:   20,
    5858                                toolbar:    'main-insert',
    5959                                filterable: 'all',
    Post = Select.extend({ 
    7474
    7575                        new Library({
    7676                                id:         'gallery',
    77                                 title:      l10n.createGalleryTitle,
     77                                title:      wp.i18n.__( 'Create Gallery' ),
    7878                                priority:   40,
    7979                                toolbar:    'main-gallery',
    8080                                filterable: 'uploaded',
    Post = Select.extend({ 
    102102
    103103                        new Library({
    104104                                id:         'playlist',
    105                                 title:      l10n.createPlaylistTitle,
     105                                title:      wp.i18n.__( 'Create Audio Playlist' ),
    106106                                priority:   60,
    107107                                toolbar:    'main-playlist',
    108108                                filterable: 'uploaded',
    Post = Select.extend({ 
    118118                        new wp.media.controller.CollectionEdit({
    119119                                type: 'audio',
    120120                                collectionType: 'playlist',
    121                                 title:          l10n.editPlaylistTitle,
     121                                title:          wp.i18n.__( 'Edit Audio Playlist' ),
    122122                                SettingsView:   wp.media.view.Settings.Playlist,
    123123                                library:        options.selection,
    124124                                editing:        options.editing,
    125125                                menu:           'playlist',
    126                                 dragInfoText:   l10n.playlistDragInfo,
     126                                dragInfoText:   wp.i18n.__( 'Drag and drop to reorder tracks.' ),
    127127                                dragInfo:       false
    128128                        }),
    129129
    130130                        new wp.media.controller.CollectionAdd({
    131131                                type: 'audio',
    132132                                collectionType: 'playlist',
    133                                 title: l10n.addToPlaylistTitle
     133                                title: wp.i18n.__( 'Add to Audio Playlist' )
    134134                        }),
    135135
    136136                        new Library({
    137137                                id:         'video-playlist',
    138                                 title:      l10n.createVideoPlaylistTitle,
     138                                title:      wp.i18n.__( 'Create Video Playlist' ),
    139139                                priority:   60,
    140140                                toolbar:    'main-video-playlist',
    141141                                filterable: 'uploaded',
    Post = Select.extend({ 
    150150                        new wp.media.controller.CollectionEdit({
    151151                                type: 'video',
    152152                                collectionType: 'playlist',
    153                                 title:          l10n.editVideoPlaylistTitle,
     153                                title:          wp.i18n.__( 'Edit Video Playlist' ),
    154154                                SettingsView:   wp.media.view.Settings.Playlist,
    155155                                library:        options.selection,
    156156                                editing:        options.editing,
    157157                                menu:           'video-playlist',
    158                                 dragInfoText:   l10n.videoPlaylistDragInfo,
     158                                dragInfoText:   wp.i18n.__( 'Drag and drop to reorder videos.' ),
    159159                                dragInfo:       false
    160160                        }),
    161161
    162162                        new wp.media.controller.CollectionAdd({
    163163                                type: 'video',
    164164                                collectionType: 'playlist',
    165                                 title: l10n.addToVideoPlaylistTitle
     165                                title: wp.i18n.__( 'Add to Video Playlist' )
    166166                        })
    167167                ]);
    168168
    Post = Select.extend({ 
    279279
    280280                view.set({
    281281                        cancel: {
    282                                 text:     l10n.cancelGalleryTitle,
     282                                text:     wp.i18n.__( '&#8592; Cancel Gallery' ),
    283283                                priority: 20,
    284284                                click:    function() {
    285285                                        if ( previous ) {
    Post = Select.extend({ 
    307307
    308308                view.set({
    309309                        cancel: {
    310                                 text:     l10n.cancelPlaylistTitle,
     310                                text:     wp.i18n.__( '&#8592; Cancel Audio Playlist' ),
    311311                                priority: 20,
    312312                                click:    function() {
    313313                                        if ( previous ) {
    Post = Select.extend({ 
    331331
    332332                view.set({
    333333                        cancel: {
    334                                 text:     l10n.cancelVideoPlaylistTitle,
     334                                text:     wp.i18n.__( '&#8592; Cancel Video Playlist' ),
    335335                                priority: 20,
    336336                                click:    function() {
    337337                                        if ( previous ) {
    Post = Select.extend({ 
    381381                }).render();
    382382
    383383                view.toolbar.set( 'backToLibrary', {
    384                         text:     l10n.returnToLibrary,
     384                        text:     wp.i18n.__( '&#8592; Return to library' ),
    385385                        priority: -100,
    386386
    387387                        click: function() {
    Post = Select.extend({ 
    465465
    466466                view.set( 'gallery', {
    467467                        style:    'primary',
    468                         text:     l10n.createNewGallery,
     468                        text:     wp.i18n.__( 'Create a new gallery' ),
    469469                        priority: 60,
    470470                        requires: { selection: true },
    471471
    Post = Select.extend({ 
    495495
    496496                view.set( 'playlist', {
    497497                        style:    'primary',
    498                         text:     l10n.createNewPlaylist,
     498                        text:     wp.i18n.__( 'Create a new playlist' ),
    499499                        priority: 100,
    500500                        requires: { selection: true },
    501501
    Post = Select.extend({ 
    525525
    526526                view.set( 'video-playlist', {
    527527                        style:    'primary',
    528                         text:     l10n.createNewVideoPlaylist,
     528                        text:     wp.i18n.__( 'Create a new video playlist' ),
    529529                        priority: 100,
    530530                        requires: { selection: true },
    531531
    Post = Select.extend({ 
    568568                        items: {
    569569                                insert: {
    570570                                        style:    'primary',
    571                                         text:     editing ? l10n.updateGallery : l10n.insertGallery,
     571                                        text:     editing ? wp.i18n.__( 'Update gallery' ) : wp.i18n.__( 'Insert gallery' ),
    572572                                        priority: 80,
    573573                                        requires: { library: true },
    574574
    Post = Select.extend({ 
    597597                        items: {
    598598                                insert: {
    599599                                        style:    'primary',
    600                                         text:     l10n.addToGallery,
     600                                        text:     wp.i18n.__( 'Add to gallery' ),
    601601                                        priority: 80,
    602602                                        requires: { selection: true },
    603603
    Post = Select.extend({ 
    625625                        items: {
    626626                                insert: {
    627627                                        style:    'primary',
    628                                         text:     editing ? l10n.updatePlaylist : l10n.insertPlaylist,
     628                                        text:     editing ? wp.i18n.__( 'Update audio playlist' ) : wp.i18n.__( 'Insert audio playlist' ),
    629629                                        priority: 80,
    630630                                        requires: { library: true },
    631631
    Post = Select.extend({ 
    654654                        items: {
    655655                                insert: {
    656656                                        style:    'primary',
    657                                         text:     l10n.addToPlaylist,
     657                                        text:     wp.i18n.__( 'Add to audio playlist' ),
    658658                                        priority: 80,
    659659                                        requires: { selection: true },
    660660
    Post = Select.extend({ 
    682682                        items: {
    683683                                insert: {
    684684                                        style:    'primary',
    685                                         text:     editing ? l10n.updateVideoPlaylist : l10n.insertVideoPlaylist,
     685                                        text:     editing ? wp.i18n.__( 'Update video playlist' ) : wp.i18n.__( 'Insert video playlist' ),
    686686                                        priority: 140,
    687687                                        requires: { library: true },
    688688
    Post = Select.extend({ 
    711711                        items: {
    712712                                insert: {
    713713                                        style:    'primary',
    714                                         text:     l10n.addToVideoPlaylist,
     714                                        text:     wp.i18n.__( 'Add to video playlist' ),
    715715                                        priority: 140,
    716716                                        requires: { selection: true },
    717717
  • src/wp-includes/js/plupload/handlers.js

    diff --git src/wp-includes/js/plupload/handlers.js src/wp-includes/js/plupload/handlers.js
    index 7f3a8c2..87fd256 100644
     
    1 /* global plupload, pluploadL10n, ajaxurl, post_id, wpUploaderInit, deleteUserSetting, setUserSetting, getUserSetting, shortform */
     1/* global plupload, ajaxurl, post_id, wpUploaderInit, deleteUserSetting, setUserSetting, getUserSetting, shortform */
    22var topWin = window.dialogArguments || opener || parent || top, uploader, uploader_init;
    33
    44// progress and success handlers for media multi uploads
    function fileUploading( up, file ) { 
    4848        if ( max > hundredmb && file.size > hundredmb ) {
    4949                setTimeout( function() {
    5050                        if ( file.status < 3 && file.loaded === 0 ) { // not uploading
    51                                 wpFileError( file, pluploadL10n.big_upload_failed.replace( '%1$s', '<a class="uploader-html" href="#">' ).replace( '%2$s', '</a>' ) );
     51                                wpFileError( file, wp.i18n.__( 'Please try uploading this file with the %1$sbrowser uploader%2$s.' ).replace( '%1$s', '<a class="uploader-html" href="#">' ).replace( '%2$s', '</a>' ) );
    5252                                up.stop(); // stops the whole queue
    5353                                up.removeFile( file );
    5454                                up.start(); // restart the queue
    function uploadSuccess(fileObj, serverData) { 
    8888                item.html(serverData);
    8989                return;
    9090        } else {
    91                 jQuery('.percent', item).html( pluploadL10n.crunching );
     91                jQuery('.percent', item).html( wp.i18n.__( 'Crunching&hellip;' ) );
    9292        }
    9393
    9494        prepareMediaItem(fileObj, serverData);
    function itemAjaxError(id, message) { 
    213213                return;
    214214
    215215        item.html('<div class="error-div">' +
    216                                 '<a class="dismiss" href="#">' + pluploadL10n.dismiss + '</a>' +
    217                                 '<strong>' + pluploadL10n.error_uploading.replace('%s', jQuery.trim(filename)) + '</strong> ' +
     216                                '<a class="dismiss" href="#">' + wp.i18n.__( 'Dismiss' ) + '</a>' +
     217                                /* translators: s: file name */
     218                                '<strong>' + wp.i18n.__( '&#8220;%s&#8221; has failed to upload.' ).replace('%s', jQuery.trim(filename)) + '</strong> ' +
    218219                                message +
    219220                                '</div>').data('last-err', id);
    220221}
    function deleteSuccess(data) { 
    249250
    250251        jQuery('.filename:empty', item).remove();
    251252        jQuery('.filename .title', item).css('font-weight','bold');
    252         jQuery('.filename', item).append('<span class="trashnotice"> ' + pluploadL10n.deleted + ' </span>').siblings('a.toggle').hide();
     253        jQuery('.filename', item).append('<span class="trashnotice"> ' + wp.i18n.__( 'moved to the trash.' ) + ' </span>').siblings('a.toggle').hide();
    253254        jQuery('.filename', item).append( jQuery('a.undo', item).removeClass('hidden') );
    254255        jQuery('.menu_order_input', item).hide();
    255256
    function uploadError(fileObj, errorCode, message, uploader) { 
    282283
    283284        switch (errorCode) {
    284285                case plupload.FAILED:
    285                         wpFileError(fileObj, pluploadL10n.upload_failed);
     286                        wpFileError( fileObj, wp.i18n.__( 'Upload failed.' ) );
    286287                        break;
    287288                case plupload.FILE_EXTENSION_ERROR:
    288                         wpFileExtensionError( uploader, fileObj, pluploadL10n.invalid_filetype );
     289                        wpFileExtensionError( uploader, fileObj, wp.i18n.__( 'This file type is not allowed. Please try another.' ) );
    289290                        break;
    290291                case plupload.FILE_SIZE_ERROR:
    291                         uploadSizeError(uploader, fileObj);
     292                        uploadSizeError( uploader, fileObj );
    292293                        break;
    293294                case plupload.IMAGE_FORMAT_ERROR:
    294                         wpFileError(fileObj, pluploadL10n.not_an_image);
     295                        wpFileError( fileObj, wp.i18n.__( 'This file is not an image. Please try another.' ) );
    295296                        break;
    296297                case plupload.IMAGE_MEMORY_ERROR:
    297                         wpFileError(fileObj, pluploadL10n.image_memory_exceeded);
     298                        wpFileError( fileObj, wp.i18n.__( 'Memory exceeded. Please try another smaller file.' ) );
    298299                        break;
    299300                case plupload.IMAGE_DIMENSIONS_ERROR:
    300                         wpFileError(fileObj, pluploadL10n.image_dimensions_exceeded);
     301                        wpFileError( fileObj, wp.i18n.__( 'This is larger than the maximum size. Please try another.' ) );
    301302                        break;
    302303                case plupload.GENERIC_ERROR:
    303                         wpQueueError(pluploadL10n.upload_failed);
     304                        wpQueueError( wp.i18n.__( 'Upload failed.' ) );
    304305                        break;
    305306                case plupload.IO_ERROR:
    306307                        max = parseInt( uploader.settings.filters.max_file_size, 10 );
    307308
    308309                        if ( max > hundredmb && fileObj.size > hundredmb )
    309                                 wpFileError( fileObj, pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>') );
     310                                wpFileError( fileObj, wp.i18n.__( 'Please try uploading this file with the %1$sbrowser uploader%2$s.' ).replace( '%1$s', '<a class="uploader-html" href="#">' ).replace( '%2$s', '</a>' ) );
    310311                        else
    311                                 wpQueueError(pluploadL10n.io_error);
     312                                wpQueueError( wp.i18n.__( 'IO error.' ) );
    312313                        break;
    313314                case plupload.HTTP_ERROR:
    314                         wpQueueError(pluploadL10n.http_error);
     315                        wpQueueError( wp.i18n.__( 'HTTP error.' ) );
    315316                        break;
    316317                case plupload.INIT_ERROR:
    317318                        jQuery('.media-upload-form').addClass('html-uploader');
    318319                        break;
    319320                case plupload.SECURITY_ERROR:
    320                         wpQueueError(pluploadL10n.security_error);
     321                        wpQueueError( wp.i18n.__( 'Security error.' ) );
    321322                        break;
    322323/*              case plupload.UPLOAD_ERROR.UPLOAD_STOPPED:
    323324                case plupload.UPLOAD_ERROR.FILE_CANCELLED:
    324325                        jQuery('#media-item-' + fileObj.id).remove();
    325326                        break;*/
    326327                default:
    327                         wpFileError(fileObj, pluploadL10n.default_error);
     328                        wpFileError( fileObj, wp.i18n.__( 'An error occurred in the upload. Please try again later.' ) );
    328329        }
    329330}
    330331
    331332function uploadSizeError( up, file, over100mb ) {
    332333        var message;
    333334
    334         if ( over100mb )
    335                 message = pluploadL10n.big_upload_queued.replace('%s', file.name) + ' ' + pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>');
    336         else
    337                 message = pluploadL10n.file_exceeds_size_limit.replace('%s', file.name);
     335        if ( over100mb ) {
     336                /* translators: s: file name */
     337                message = wp.i18n.__( '%s exceeds the maximum upload size for the multi-file uploader when used in your browser.' ).replace( '%s', file.name ) + ' ' + wp.i18n.__( 'Please try uploading this file with the %1$sbrowser uploader%2$s.' ).replace( '%1$s', '<a class="uploader-html" href="#">' ).replace( '%2$s', '</a>' );
     338        } else {
     339                /* translators: s: file name */
     340                message = wp.i18n.__( '%s exceeds the maximum upload size for this site.' ).replace( '%s', file.name );
     341        }
    338342
    339343        jQuery('#media-items').append('<div id="media-item-' + file.id + '" class="media-item error"><p>' + message + '</p></div>');
    340344        up.removeFile(file);
  • src/wp-includes/js/plupload/wp-plupload.js

    diff --git src/wp-includes/js/plupload/wp-plupload.js src/wp-includes/js/plupload/wp-plupload.js
    index 032a38f..872f01a 100644
     
    1 /* global pluploadL10n, plupload, _wpPluploadSettings */
     1/* global plupload, _wpPluploadSettings */
    22
    33window.wp = window.wp || {};
    44
    window.wp = window.wp || {}; 
    120120                        }
    121121
    122122                        Uploader.errors.unshift({
    123                                 message: message || pluploadL10n.default_error,
     123                                message: message || wp.i18n.__( 'An error occurred in the upload. Please try again later.' ),
    124124                                data:    data,
    125125                                file:    file
    126126                        });
    window.wp = window.wp || {}; 
    264264                        try {
    265265                                response = JSON.parse( response.response );
    266266                        } catch ( e ) {
    267                                 return error( pluploadL10n.default_error, e, file );
     267                                return error( wp.i18n.__( 'An error occurred in the upload. Please try again later.' ), e, file );
    268268                        }
    269269
    270270                        if ( ! _.isObject( response ) || _.isUndefined( response.success ) )
    271                                 return error( pluploadL10n.default_error, null, file );
     271                                return error( wp.i18n.__( 'An error occurred in the upload. Please try again later.' ), null, file );
    272272                        else if ( ! response.success )
    273273                                return error( response.data && response.data.message, response.data, file );
    274274
    window.wp = window.wp || {}; 
    296296                 * @param {Object}            error    Contains code, message and sometimes file and other details.
    297297                 */
    298298                this.uploader.bind( 'Error', function( up, pluploadError ) {
    299                         var message = pluploadL10n.default_error,
     299                        var message = wp.i18n.__( 'An error occurred in the upload. Please try again later.' ),
    300300                                key;
    301301
    302302                        // Check for plupload errors.
    window.wp = window.wp || {}; 
    325325
    326326        // Map Plupload error codes to user friendly error messages.
    327327        Uploader.errorMap = {
    328                 'FAILED':                 pluploadL10n.upload_failed,
    329                 'FILE_EXTENSION_ERROR':   pluploadL10n.invalid_filetype,
    330                 'IMAGE_FORMAT_ERROR':     pluploadL10n.not_an_image,
    331                 'IMAGE_MEMORY_ERROR':     pluploadL10n.image_memory_exceeded,
    332                 'IMAGE_DIMENSIONS_ERROR': pluploadL10n.image_dimensions_exceeded,
    333                 'GENERIC_ERROR':          pluploadL10n.upload_failed,
    334                 'IO_ERROR':               pluploadL10n.io_error,
    335                 'HTTP_ERROR':             pluploadL10n.http_error,
    336                 'SECURITY_ERROR':         pluploadL10n.security_error,
     328                'FAILED':                 wp.i18n.__( 'Upload failed.' ),
     329                'FILE_EXTENSION_ERROR':   wp.i18n.__( 'This file type is not allowed. Please try another.' ),
     330                'IMAGE_FORMAT_ERROR':     wp.i18n.__( 'This file is not an image. Please try another.' ),
     331                'IMAGE_MEMORY_ERROR':     wp.i18n.__( 'Memory exceeded. Please try another smaller file.' ),
     332                'IMAGE_DIMENSIONS_ERROR': wp.i18n.__( 'This is larger than the maximum size. Please try another.' ),
     333                'GENERIC_ERROR':          wp.i18n.__( 'Upload failed.' ),
     334                'IO_ERROR':               wp.i18n.__( 'IO error.' ),
     335                'HTTP_ERROR':             wp.i18n.__( 'HTTP error.' ),
     336                'SECURITY_ERROR':         wp.i18n.__( 'Security error.' ),
    337337
    338338                'FILE_SIZE_ERROR': function( file ) {
    339                         return pluploadL10n.file_exceeds_size_limit.replace('%s', file.name);
     339                        /* translators: s: file name */
     340                        return wp.i18n.__( '%s exceeds the maximum upload size for this site.' ).replace('%s', file.name);
    340341                }
    341342        };
    342343
  • src/wp-includes/js/quicktags.js

    diff --git src/wp-includes/js/quicktags.js src/wp-includes/js/quicktags.js
    index 6d00901..804728f 100644
     
    1 /* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, prompt */
     1/* global adminpage, wpActiveEditor, wpLink, prompt */
    22/*
    33 * Quicktags
    44 *
    function edButton(id, display, tagStart, tagEnd, access) { 
    223223
    224224                if ( tb.addEventListener ) {
    225225                        tb.addEventListener( 'click', onclick, false );
    226                        
     226
    227227                        if ( wrap ) {
    228228                                wrap.addEventListener( 'click', setActiveEditor, false );
    229229                        }
    function edButton(id, display, tagStart, tagEnd, access) { 
    582582
    583583        // the close tags button
    584584        qt.CloseButton = function() {
    585                 qt.Button.call( this, 'close', quicktagsL10n.closeTags, '', quicktagsL10n.closeAllOpenTags );
     585                qt.Button.call( this, 'close', wp.i18n.__( 'close tags' ), '', wp.i18n.__( 'Close all open tags' ) );
    586586        };
    587587
    588588        qt.CloseButton.prototype = new qt.Button();
    function edButton(id, display, tagStart, tagEnd, access) { 
    614614        // the link button
    615615        qt.LinkButton = function() {
    616616                var attr = {
    617                         ariaLabel: quicktagsL10n.link
     617                        ariaLabel: wp.i18n.__( 'Insert link' )
    618618                };
    619619
    620620                qt.TagButton.call( this, 'link', 'link', '', '</a>', '', '', '', attr );
    function edButton(id, display, tagStart, tagEnd, access) { 
    633633                }
    634634
    635635                if ( t.isOpen(ed) === false ) {
    636                         URL = prompt( quicktagsL10n.enterURL, defaultValue );
     636                        URL = prompt( wp.i18n.__( 'Enter the URL' ), defaultValue );
    637637                        if ( URL ) {
    638638                                t.tagStart = '<a href="' + URL + '">';
    639639                                qt.TagButton.prototype.callback.call(t, e, c, ed);
    function edButton(id, display, tagStart, tagEnd, access) { 
    646646        // the img button
    647647        qt.ImgButton = function() {
    648648                var attr = {
    649                         ariaLabel: quicktagsL10n.image
     649                        ariaLabel: wp.i18n.__( 'Insert image' )
    650650                };
    651651
    652652                qt.TagButton.call( this, 'img', 'img', '', '', '', '', '', attr );
    function edButton(id, display, tagStart, tagEnd, access) { 
    656656                if ( ! defaultValue ) {
    657657                        defaultValue = 'http://';
    658658                }
    659                 var src = prompt(quicktagsL10n.enterImageURL, defaultValue), alt;
     659                var src = prompt( wp.i18n.__( 'Enter the URL of the image' ), defaultValue ), alt;
    660660                if ( src ) {
    661                         alt = prompt(quicktagsL10n.enterImageDescription, '');
     661                        alt = prompt( wp.i18n.__( 'Enter a description of the image' ), '' );
    662662                        this.tagStart = '<img src="' + src + '" alt="' + alt + '" />';
    663663                        qt.TagButton.prototype.callback.call(this, e, c, ed);
    664664                }
    665665        };
    666666
    667667        qt.DFWButton = function() {
    668                 qt.Button.call( this, 'dfw', '', 'f', quicktagsL10n.dfw );
     668                qt.Button.call( this, 'dfw', '', 'f', wp.i18n.__( 'Distraction-free writing mode' ) );
    669669        };
    670670        qt.DFWButton.prototype = new qt.Button();
    671671        qt.DFWButton.prototype.callback = function() {
    function edButton(id, display, tagStart, tagEnd, access) { 
    679679        };
    680680
    681681        qt.TextDirectionButton = function() {
    682                 qt.Button.call( this, 'textdirection', quicktagsL10n.textdirection, '', quicktagsL10n.toggleTextdirection );
     682                qt.Button.call( this, 'textdirection', wp.i18n.__( 'text direction' ), '', wp.i18n.__( 'Toggle Editor Text Direction' ) );
    683683        };
    684684        qt.TextDirectionButton.prototype = new qt.Button();
    685685        qt.TextDirectionButton.prototype.callback = function(e, c) {
    function edButton(id, display, tagStart, tagEnd, access) { 
    695695        };
    696696
    697697        // ensure backward compatibility
    698         edButtons[10]  = new qt.TagButton( 'strong', 'b', '<strong>', '</strong>', '', '', '', { ariaLabel: quicktagsL10n.strong, ariaLabelClose: quicktagsL10n.strongClose } );
    699         edButtons[20]  = new qt.TagButton( 'em', 'i', '<em>', '</em>', '', '', '', { ariaLabel: quicktagsL10n.em, ariaLabelClose: quicktagsL10n.emClose } );
     698        edButtons[10]  = new qt.TagButton( 'strong', 'b', '<strong>', '</strong>', '', '', '', { ariaLabel: wp.i18n.__( 'Bold' ), ariaLabelClose: wp.i18n.__( 'Close bold tag' ) } );
     699        edButtons[20]  = new qt.TagButton( 'em', 'i', '<em>', '</em>', '', '', '', { ariaLabel: wp.i18n.__( 'Italic' ), ariaLabelClose: wp.i18n.__( 'Close italic tag' ) } );
    700700        edButtons[30]  = new qt.LinkButton(); // special case
    701         edButtons[40]  = new qt.TagButton( 'block', 'b-quote', '\n\n<blockquote>', '</blockquote>\n\n', '', '', '', { ariaLabel: quicktagsL10n.blockquote, ariaLabelClose: quicktagsL10n.blockquoteClose } );
    702         edButtons[50]  = new qt.TagButton( 'del', 'del', '<del datetime="' + _datetime + '">', '</del>', '', '', '', { ariaLabel: quicktagsL10n.del, ariaLabelClose: quicktagsL10n.delClose } );
    703         edButtons[60]  = new qt.TagButton( 'ins', 'ins', '<ins datetime="' + _datetime + '">', '</ins>', '', '', '', { ariaLabel: quicktagsL10n.ins, ariaLabelClose: quicktagsL10n.insClose } );
     701        edButtons[40]  = new qt.TagButton( 'block', 'b-quote', '\n\n<blockquote>', '</blockquote>\n\n', '', '', '', { ariaLabel: wp.i18n.__( 'Blockquote' ), ariaLabelClose: wp.i18n.__( 'Close blockquote tag' ) } );
     702        edButtons[50]  = new qt.TagButton( 'del', 'del', '<del datetime="' + _datetime + '">', '</del>', '', '', '', { ariaLabel: wp.i18n.__( 'Deleted text (strikethrough)' ), ariaLabelClose: wp.i18n.__( 'Close deleted text tag' ) } );
     703        edButtons[60]  = new qt.TagButton( 'ins', 'ins', '<ins datetime="' + _datetime + '">', '</ins>', '', '', '', { ariaLabel: wp.i18n.__( 'Inserted text' ), ariaLabelClose: wp.i18n.__( 'Close inserted text tag' ) } );
    704704        edButtons[70]  = new qt.ImgButton(); // special case
    705         edButtons[80]  = new qt.TagButton( 'ul', 'ul', '<ul>\n', '</ul>\n\n', '', '', '', { ariaLabel: quicktagsL10n.ul, ariaLabelClose: quicktagsL10n.ulClose } );
    706         edButtons[90]  = new qt.TagButton( 'ol', 'ol', '<ol>\n', '</ol>\n\n', '', '', '', { ariaLabel: quicktagsL10n.ol, ariaLabelClose: quicktagsL10n.olClose } );
    707         edButtons[100] = new qt.TagButton( 'li', 'li', '\t<li>', '</li>\n', '', '', '', { ariaLabel: quicktagsL10n.li, ariaLabelClose: quicktagsL10n.liClose } );
    708         edButtons[110] = new qt.TagButton( 'code', 'code', '<code>', '</code>', '', '', '', { ariaLabel: quicktagsL10n.code, ariaLabelClose: quicktagsL10n.codeClose } );
    709         edButtons[120] = new qt.TagButton( 'more', 'more', '<!--more-->\n\n', '', '', '', '', { ariaLabel: quicktagsL10n.more } );
     705        edButtons[80]  = new qt.TagButton( 'ul', 'ul', '<ul>\n', '</ul>\n\n', '', '', '', { ariaLabel: wp.i18n.__( 'Bulleted list' ), ariaLabelClose: wp.i18n.__( 'Close bulleted list tag' ) } );
     706        edButtons[90]  = new qt.TagButton( 'ol', 'ol', '<ol>\n', '</ol>\n\n', '', '', '', { ariaLabel: wp.i18n.__( 'Numbered list' ), ariaLabelClose: wp.i18n.__( 'Close numbered list tag' ) } );
     707        edButtons[100] = new qt.TagButton( 'li', 'li', '\t<li>', '</li>\n', '', '', '', { ariaLabel: wp.i18n.__( 'List item' ), ariaLabelClose: wp.i18n.__( 'Close list item tag' ) } );
     708        edButtons[110] = new qt.TagButton( 'code', 'code', '<code>', '</code>', '', '', '', { ariaLabel: wp.i18n.__( 'Code' ), ariaLabelClose: wp.i18n.__( 'Close code tag' ) } );
     709        edButtons[120] = new qt.TagButton( 'more', 'more', '<!--more-->\n\n', '', '', '', '', { ariaLabel: wp.i18n.__( 'Insert Read More tag' ) } );
    710710        edButtons[140] = new qt.CloseButton();
    711711
    712712})();
  • src/wp-includes/js/swfupload/handlers.js

    diff --git src/wp-includes/js/swfupload/handlers.js src/wp-includes/js/swfupload/handlers.js
    index e27bd37..fc22063 100644
    function uploadProgress(fileObj, bytesDone, bytesTotal) { 
    4545        jQuery('.percent', item).html( Math.ceil(bytesDone / bytesTotal * 100) + '%' );
    4646
    4747        if ( bytesDone == bytesTotal )
    48                 jQuery('.bar', item).html('<strong class="crunching">' + swfuploadL10n.crunching + '</strong>');
     48                jQuery('.bar', item).html('<strong class="crunching">' + wp.i18n.__( 'Crunching&hellip;' ) + '</strong>');
    4949}
    5050
    5151function prepareMediaItem(fileObj, serverData) {
    function itemAjaxError(id, html) { 
    154154        var filename = jQuery('.filename', item).text();
    155155
    156156        item.html('<div class="error-div">'
    157                                 + '<a class="dismiss" href="#">' + swfuploadL10n.dismiss + '</a>'
    158                                 + '<strong>' + swfuploadL10n.error_uploading.replace('%s', filename) + '</strong><br />'
     157                                + '<a class="dismiss" href="#">' + wp.i18n.__( 'Dismiss' ) + '</a>'
     158                                /* translators: s: file name */
     159                                + '<strong>' + wp.i18n.__( '&#8220;%s&#8221; has failed to upload.' ).replace( '%s', filename ) + '</strong><br />'
    159160                                + html
    160161                                + '</div>');
    161162        item.find('a.dismiss').click(function(){jQuery(this).parents('.media-item').slideUp(200, function(){jQuery(this).remove();})});
    function deleteSuccess(data, textStatus) { 
    187188
    188189        jQuery('.filename:empty', item).remove();
    189190        jQuery('.filename .title', item).css('font-weight','bold');
    190         jQuery('.filename', item).append('<span class="trashnotice"> ' + swfuploadL10n.deleted + ' </span>').siblings('a.toggle').hide();
     191        jQuery('.filename', item).append('<span class="trashnotice"> ' + wp.i18n.__( 'moved to the trash.' ) + ' </span>').siblings('a.toggle').hide();
    191192        jQuery('.filename', item).append( jQuery('a.undo', item).removeClass('hidden') );
    192193        jQuery('.menu_order_input', item).hide();
    193194
    function wpFileError(fileObj, message) { 
    257258        var filename = jQuery('.filename', item).text();
    258259
    259260        item.html('<div class="error-div">'
    260                                 + '<a class="dismiss" href="#">' + swfuploadL10n.dismiss + '</a>'
    261                                 + '<strong>' + swfuploadL10n.error_uploading.replace('%s', filename) + '</strong><br />'
     261                                + '<a class="dismiss" href="#">' + wp.i18n.__( 'Dismiss' ) + '</a>'
     262                                /* translators: s: file name */
     263                                + '<strong>' + wp.i18n.__( '&#8220;%s&#8221; has failed to upload.' ).replace( '%s', filename ) + '</strong><br />'
    262264                                + message
    263265                                + '</div>');
    264266        item.find('a.dismiss').click(function(){jQuery(this).parents('.media-item').slideUp(200, function(){jQuery(this).remove();})});
    function wpFileError(fileObj, message) { 
    267269function fileQueueError(fileObj, error_code, message)  {
    268270        // Handle this error separately because we don't want to create a FileProgress element for it.
    269271        if ( error_code == SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED ) {
    270                 wpQueueError(swfuploadL10n.queue_limit_exceeded);
     272                wpQueueError( wp.i18n.__( 'You have attempted to queue too many files.' ) );
    271273        }
    272274        else if ( error_code == SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT ) {
    273275                fileQueued(fileObj);
    274                 wpFileError(fileObj, swfuploadL10n.file_exceeds_size_limit);
     276                /* translators: s: file name */
     277                wpFileError( fileObj, wp.i18n.__( '%s exceeds the maximum upload size for this site.' ) );
    275278        }
    276279        else if ( error_code == SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE ) {
    277280                fileQueued(fileObj);
    278                 wpFileError(fileObj, swfuploadL10n.zero_byte_file);
     281                wpFileError( fileObj, wp.i18n.__( 'This file is empty. Please try another.' ) );
    279282        }
    280283        else if ( error_code == SWFUpload.QUEUE_ERROR.INVALID_FILETYPE ) {
    281284                fileQueued(fileObj);
    282                 wpFileError(fileObj, swfuploadL10n.invalid_filetype);
     285                wpFileError( fileObj, wp.i18n.__( 'This file type is not allowed. Please try another.' ) );
    283286        }
    284287        else {
    285                 wpQueueError(swfuploadL10n.default_error);
     288                wpQueueError( wp.i18n.__( 'An error occurred in the upload. Please try again later.' ) );
    286289        }
    287290}
    288291
    function uploadError(fileObj, errorCode, message) { 
    324327
    325328        switch (errorCode) {
    326329                case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:
    327                         wpFileError(fileObj, swfuploadL10n.missing_upload_url);
     330                        wpFileError( fileObj, wp.i18n.__( 'There was a configuration error. Please contact the server administrator.' ) );
    328331                        break;
    329332                case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED:
    330                         wpFileError(fileObj, swfuploadL10n.upload_limit_exceeded);
     333                        wpFileError( fileObj, wp.i18n.__( 'You may only upload 1 file.' ) );
    331334                        break;
    332335                case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
    333                         wpQueueError(swfuploadL10n.http_error);
     336                        wpQueueError( wp.i18n.__( 'HTTP error.' ) );
    334337                        break;
    335338                case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED:
    336                         wpQueueError(swfuploadL10n.upload_failed);
     339                        wpQueueError( wp.i18n.__( 'Upload failed.' ) );
    337340                        break;
    338341                case SWFUpload.UPLOAD_ERROR.IO_ERROR:
    339                         wpQueueError(swfuploadL10n.io_error);
     342                        wpQueueError( wp.i18n.__( 'IO error.' ) );
    340343                        break;
    341344                case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR:
    342                         wpQueueError(swfuploadL10n.security_error);
     345                        wpQueueError( wp.i18n.__( 'Security error.' ) );
    343346                        break;
    344347                case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED:
    345348                case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED:
    346349                        jQuery('#media-item-' + fileObj.id).remove();
    347350                        break;
    348351                default:
    349                         wpFileError(fileObj, swfuploadL10n.default_error);
     352                        wpFileError( fileObj, wp.i18n.__( 'An error occurred in the upload. Please try again later.' ) );
    350353        }
    351354}
    352355
  • src/wp-includes/js/thickbox/thickbox.js

    diff --git src/wp-includes/js/thickbox/thickbox.js src/wp-includes/js/thickbox/thickbox.js
    index 391fd41..ef1c091 100644
    function tb_show(caption, url, imageGroup) {//function called when the user clic 
    4848                        jQuery("body","html").css({height: "100%", width: "100%"});
    4949                        jQuery("html").css("overflow","hidden");
    5050                        if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
    51                                 jQuery("body").append("<iframe id='TB_HideSelect'>"+thickboxL10n.noiframes+"</iframe><div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
     51                                jQuery("body").append("<iframe id='TB_HideSelect'>" + wp.i18n.__( 'This feature requires inline frames. You have iframes disabled or your browser does not support them.' ) + "</iframe><div id='TB_overlay'></div><div id='TB_window' class='thickbox-loading'></div>");
    5252                                jQuery("#TB_overlay").click(tb_remove);
    5353                        }
    5454                }else{//all others
    function tb_show(caption, url, imageGroup) {//function called when the user clic 
    9797                                                        if (TB_FoundURL) {
    9898                                                                TB_NextCaption = TB_TempArray[TB_Counter].title;
    9999                                                                TB_NextURL = TB_TempArray[TB_Counter].href;
    100                                                                 TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.next+"</a></span>";
     100                                                                TB_NextHTML = "<span id='TB_next'>&nbsp;&nbsp;<a href='#'>"+wp.i18n.__( 'Next &gt;' )+"</a></span>";
    101101                                                        } else {
    102102                                                                TB_PrevCaption = TB_TempArray[TB_Counter].title;
    103103                                                                TB_PrevURL = TB_TempArray[TB_Counter].href;
    104                                                                 TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>"+thickboxL10n.prev+"</a></span>";
     104                                                                TB_PrevHTML = "<span id='TB_prev'>&nbsp;&nbsp;<a href='#'>" + wp.i18n.__( '&lt; Prev' ) + "</a></span>";
    105105                                                        }
    106106                                                } else {
    107107                                                        TB_FoundURL = true;
    108                                                         TB_imageCount = thickboxL10n.image + ' ' + (TB_Counter + 1) + ' ' + thickboxL10n.of + ' ' + (TB_TempArray.length);
     108                                                        /* translators: 1: image number, 2: total number of images */
     109                                                        TB_imageCount = wp.i18n.__( 'Image %1$d of %2$d' ).replace( '%1$d', ( TB_Counter + 1 ) ).replace( '%2$d', TB_TempArray.length );
    109110                                                }
    110111                                }
    111112                        }
    function tb_show(caption, url, imageGroup) {//function called when the user clic 
    139140
    140141                        TB_WIDTH = imageWidth + 30;
    141142                        TB_HEIGHT = imageHeight + 60;
    142                         jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div>");
     143                        jQuery("#TB_window").append("<a href='' id='TB_ImageOff'><span class='screen-reader-text'>" + wp.i18n.__( 'Close' ) + "</span><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>" + wp.i18n.__( 'Close' ) + "</span><span class='tb-close-icon'></span></button></div>");
    143144
    144145                        jQuery("#TB_closeWindowButton").click(tb_remove);
    145146
    function tb_show(caption, url, imageGroup) {//function called when the user clic 
    204205                                        urlNoQuery = url.split('TB_');
    205206                                        jQuery("#TB_iframeContent").remove();
    206207                                        if(params['modal'] != "true"){//iframe no modal
    207                                                 jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>");
     208                                                jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>" + wp.i18n.__( 'Close' ) + "</span><span class='tb-close-icon'></span></button></div></div><iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >" + wp.i18n.__( 'This feature requires inline frames. You have iframes disabled or your browser does not support them.' ) + "</iframe>");
    208209                                        }else{//iframe modal
    209210                                        jQuery("#TB_overlay").unbind();
    210                                                 jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>"+thickboxL10n.noiframes+"</iframe>");
     211                                                jQuery("#TB_window").append("<iframe frameborder='0' hspace='0' allowtransparency='true' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;'>" + wp.i18n.__( 'This feature requires inline frames. You have iframes disabled or your browser does not support them.' ) + "</iframe>");
    211212                                        }
    212213                        }else{// not an iframe, ajax
    213214                                        if(jQuery("#TB_window").css("visibility") != "visible"){
    214215                                                if(params['modal'] != "true"){//ajax no modal
    215                                                 jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>"+thickboxL10n.close+"</span><span class='tb-close-icon'></span></button></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
     216                                                jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><button type='button' id='TB_closeWindowButton'><span class='screen-reader-text'>" + wp.i18n.__( 'Close' ) + "</span><span class='tb-close-icon'></span></button></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>");
    216217                                                }else{//ajax modal
    217218                                                jQuery("#TB_overlay").unbind();
    218219                                                jQuery("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>");
  • src/wp-includes/js/tinymce/plugins/wplink/plugin.js

    diff --git src/wp-includes/js/tinymce/plugins/wplink/plugin.js src/wp-includes/js/tinymce/plugins/wplink/plugin.js
    index 1ce1c92..27428e9 100644
     
    271271                        editor.nodeChanged();
    272272
    273273                        // Audible confirmation message when a link has been inserted in the Editor.
    274                         if ( typeof window.wpLinkL10n !== 'undefined' && ! hasLinkError ) {
    275                                 speak( window.wpLinkL10n.linkInserted );
     274                        if ( ! hasLinkError ) {
     275                                speak( wp.i18n.__( 'Link inserted.' ) );