Ticket #20491: 20491-applied.2.diff
| File 20491-applied.2.diff, 247.1 KB (added by , 9 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
38 38 // Set up HTML structure, hide things 39 39 el.addClass( 'wp-color-picker' ).hide().wrap( _wrap ); 40 40 self.wrap = el.parent(); 41 self.toggler = $( _before ).insertBefore( el ).css( { backgroundColor: self.initialValue } ).attr( 'title', wp ColorPickerL10n.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' ) ); 42 42 self.pickerContainer = $( _after ).insertAfter( el ); 43 43 self.button = $( _button ); 44 44 45 45 if ( self.options.defaultColor ) { 46 self.button.addClass( 'wp-picker-default' ).val( wp ColorPickerL10n.defaultString);46 self.button.addClass( 'wp-picker-default' ).val( wp.i18n.__( 'Default' ) ); 47 47 } else { 48 self.button.addClass( 'wp-picker-clear' ).val( wp ColorPickerL10n.clear);48 self.button.addClass( 'wp-picker-clear' ).val( wp.i18n.__( 'Clear' ) ); 49 49 } 50 50 51 51 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($) { 46 46 } 47 47 48 48 $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' ) 51 52 .replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) ) 52 53 .replace( '%2$s', parseInt( jj, 10 ) ) 53 54 .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 43a8f09..094d873 100644
1 /* global setUserSetting, ajaxurl, commonL10n,alert, confirm, pagenow */1 /* global setUserSetting, ajaxurl, alert, confirm, pagenow */ 2 2 var showNotice, adminMenu, columns, validateForm, screenMeta; 3 3 ( function( $, window, undefined ) { 4 4 var $document = $( document ), … … validateForm = function( form ) { 89 89 // stub for doing better warnings 90 90 showNotice = { 91 91 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 93 94 if ( confirm(msg) ) { 94 95 return true; 95 96 } … … $document.ready( function() { 404 405 $( '.notice.is-dismissible' ).each( function() { 405 406 var $el = $( this ), 406 407 $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.' ); 408 409 409 410 // Ensure plain text 410 411 $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 4410593..2e830fb 100644
1 /* global _wpCustomizeHeader, _wpCustomizeBackground, _wpMediaViewsL10n,MediaElementPlayer */1 /* global _wpCustomizeHeader, _wpCustomizeBackground, MediaElementPlayer */ 2 2 (function( exports, $ ){ 3 3 var Container, focus, normalizedTransitionendEventName, api = wp.customize; 4 4 … … 2259 2259 * Create a media modal select frame, and store it so the instance can be reused when needed. 2260 2260 */ 2261 2261 initFrame: function() { 2262 var l10n = _wpMediaViewsL10n;2263 2264 2262 this.frame = wp.media({ 2265 2263 button: { 2266 text: l10n.select,2264 text: wp.i18n.__( 'Select' ), 2267 2265 close: false 2268 2266 }, 2269 2267 states: [ … … 2450 2448 * Create a media modal select frame, and store it so the instance can be reused when needed. 2451 2449 */ 2452 2450 initFrame: function() { 2453 var l10n = _wpMediaViewsL10n;2454 2455 2451 this.frame = wp.media({ 2456 2452 button: { 2457 text: l10n.select,2453 text: wp.i18n.__( 'Select' ), 2458 2454 close: false 2459 2455 }, 2460 2456 states: [ … … 2706 2702 * @param {event} event 2707 2703 */ 2708 2704 openMedia: function(event) { 2709 var l10n = _wpMediaViewsL10n;2710 2711 2705 event.preventDefault(); 2712 2706 2713 2707 this.frame = wp.media({ 2714 2708 button: { 2715 text: l10n.selectAndCrop,2709 text: wp.i18n.__( 'Select and Crop' ), 2716 2710 close: false 2717 2711 }, 2718 2712 states: [ 2719 2713 new wp.media.controller.Library({ 2720 title: l10n.chooseImage,2714 title: wp.i18n.__( 'Choose Image' ), 2721 2715 library: wp.media.query({ type: 'image' }), 2722 2716 multiple: false, 2723 2717 date: false, … … 3104 3098 response = response.slice( 0, index ) + response.slice( index + signature.length ); 3105 3099 3106 3100 // Create the iframe and inject the html content. 3107 self.iframe = $( '<iframe />', { 'title': api.l10n.previewIframeTitle} ).appendTo( self.container );3101 self.iframe = $( '<iframe />', { 'title': wp.i18n.__( 'Site Preview' ) } ).appendTo( self.container ); 3108 3102 self.iframe.attr( 'onmousewheel', '' ); // Workaround for Safari bug. See WP Trac #38149. 3109 3103 3110 3104 // Bind load event after the iframe has been added to the page; … … 3151 3145 reject(); 3152 3146 } 3153 3147 3154 iframe = $( '<iframe />', { 'src': self.previewUrl(), 'title': api.l10n.previewIframeTitle} ).hide();3148 iframe = $( '<iframe />', { 'src': self.previewUrl(), 'title': wp.i18n.__( 'Site Preview' ) } ).hide(); 3155 3149 iframe.appendTo( self.container ); 3156 3150 iframe.on( 'load', function() { 3157 3151 self.triedLogin = true; … … 3423 3417 url: api.settings.url.login 3424 3418 }); 3425 3419 3426 iframe = $( '<iframe />', { 'src': api.settings.url.login, 'title': api.l10n.loginIframeTitle} ).appendTo( this.container );3420 iframe = $( '<iframe />', { 'src': api.settings.url.login, 'title': wp.i18n.__( 'Session expired' ) } ).appendTo( this.container ); 3427 3421 3428 3422 messenger.targetWindow( iframe[0].contentWindow ); 3429 3423 … … 3451 3445 3452 3446 cheatin: function() { 3453 3447 $( document.body ).empty().addClass( 'cheatin' ).append( 3454 '<h1>' + api.l10n.cheatin+ '</h1>' +3455 '<p>' + api.l10n.notAllowed+ '</p>'3448 '<h1>' + wp.i18n.__( 'Cheatin’ uh?' ) + '</h1>' + 3449 '<p>' + wp.i18n.__( 'Sorry, you are not allowed to customize this site.' ) + '</p>' 3456 3450 ); 3457 3451 }, 3458 3452 … … 3667 3661 3668 3662 $( function() { 3669 3663 api.settings = window._wpCustomizeSettings; 3670 api.l10n = window._wpCustomizeControlsL10n;3671 3664 3672 3665 // Check if we can run the Customizer. 3673 3666 if ( ! api.settings ) { … … 3980 3973 3981 3974 state.bind( 'change', function() { 3982 3975 if ( ! activated() ) { 3983 saveBtn.val( api.l10n.activate).prop( 'disabled', false );3984 closeBtn.find( '.screen-reader-text' ).text( api.l10n.cancel);3976 saveBtn.val( wp.i18n.__( 'Save & Activate' ) ).prop( 'disabled', false ); 3977 closeBtn.find( '.screen-reader-text' ).text( wp.i18n.__( 'Cancel' ) ); 3985 3978 3986 3979 } else if ( saved() ) { 3987 saveBtn.val( api.l10n.saved).prop( 'disabled', true );3988 closeBtn.find( '.screen-reader-text' ).text( api.l10n.close);3980 saveBtn.val( wp.i18n.__( 'Saved' ) ).prop( 'disabled', true ); 3981 closeBtn.find( '.screen-reader-text' ).text( wp.i18n.__( 'Close' ) ); 3989 3982 3990 3983 } else { 3991 saveBtn.val( api.l10n.save).prop( 'disabled', false );3992 closeBtn.find( '.screen-reader-text' ).text( api.l10n.cancel);3984 saveBtn.val( wp.i18n.__( 'Save & Publish' ) ).prop( 'disabled', false ); 3985 closeBtn.find( '.screen-reader-text' ).text( wp.i18n.__( 'Cancel' ) ); 3993 3986 } 3994 3987 }); 3995 3988 … … 4047 4040 overlay.toggleClass( 'collapsed', ! paneVisible ); 4048 4041 4049 4042 if ( ! paneVisible ) { 4050 $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'false', 'aria-label': api.l10n.expandSidebar});4043 $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'false', 'aria-label': wp.i18n.__( 'Expand Sidebar' ) }); 4051 4044 } else { 4052 $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'true', 'aria-label': api.l10n.collapseSidebar});4045 $( '.collapse-sidebar' ).attr({ 'aria-expanded': 'true', 'aria-label': wp.i18n.__( 'Expand Sidebar' ) }); 4053 4046 } 4054 4047 }); 4055 4048 … … 4139 4132 if ( title.length ) { 4140 4133 api( 'blogname', function( setting ) { 4141 4134 var updateTitle = function() { 4142 title.text( $.trim( setting() ) || api.l10n.untitledBlogName);4135 title.text( $.trim( setting() ) || wp.i18n.__( '(Untitled)' ) ); 4143 4136 }; 4144 4137 setting.bind( updateTitle ); 4145 4138 updateTitle(); … … 4174 4167 setTimeout( function() { 4175 4168 overlay.removeClass( 'customize-loading' ); 4176 4169 }, 1 ); 4177 return api.l10n.saveAlert;4170 return wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' ); 4178 4171 } 4179 4172 } ); 4180 4173 -
src/wp-admin/js/customize-nav-menus.js
diff --git src/wp-admin/js/customize-nav-menus.js src/wp-admin/js/customize-nav-menus.js index 71052a1..f96b8b3 100644
291 291 } else if ( page > 1 ) { 292 292 $section.addClass( 'loading-more' ); 293 293 $content.attr( 'aria-busy', 'true' ); 294 wp.a11y.speak( api.Menus.data.l10n.itemsLoadingMore);294 wp.a11y.speak( wp.i18n.__( 'Loading more results... please wait.' ) ); 295 295 } else if ( '' === self.searchTerm ) { 296 296 $content.html( '' ); 297 297 wp.a11y.speak( '' ); … … 330 330 self.pages.search = self.pages.search + 1; 331 331 } 332 332 if ( items && page > 1 ) { 333 wp.a11y.speak( api.Menus.data.l10n.itemsFoundMore.replace( '%d', items.length ) );333 wp.a11y.speak( wp.i18n.__( 'Additional items found: %d' ).replace( '%d', items.length ) ); 334 334 } else if ( items && page === 1 ) { 335 wp.a11y.speak( api.Menus.data.l10n.itemsFound.replace( '%d', items.length ) );335 wp.a11y.speak( wp.i18n.__( 'Number of items found: %d' ).replace( '%d', items.length ) ); 336 336 } 337 337 }); 338 338 … … 510 510 'title': itemName.val(), 511 511 'url': itemUrl.val(), 512 512 'type': 'custom', 513 'type_label': api.Menus.data.l10n.custom_label,513 'type_label': wp.i18n.__( 'Custom Link' ), 514 514 'object': 'custom' 515 515 }; 516 516 … … 875 875 params: { 876 876 type: 'nav_menu_name', 877 877 content: '<li id="customize-control-' + section.id.replace( '[', '-' ).replace( ']', '' ) + '-name" class="customize-control customize-control-nav_menu_name"></li>', // @todo core should do this for us; see #30741 878 label: api.Menus.data.l10n.menuNameLabel,878 label: wp.i18n.__( 'Menu Name' ), 879 879 active: true, 880 880 section: section.id, 881 881 priority: 0, … … 959 959 var $label, locationName; 960 960 $label = $( '<span class="menu-in-location"></span>' ); 961 961 locationName = api.Menus.data.locationSlugMappedToName[ themeLocationSlug ]; 962 $label.text( api.Menus.data.l10n.menuLocation.replace( '%s', locationName ) ); 962 /* translators: %s: menu location */ 963 $label.text( wp.i18n._x( '(Currently set to: %s)', 'menu' ).replace( '%s', locationName ) ); 963 964 $title.append( $label ); 964 965 }); 965 966 … … 1397 1398 1398 1399 control.container.slideUp( function() { 1399 1400 control.setting.set( false ); 1400 wp.a11y.speak( api.Menus.data.l10n.itemDeleted);1401 wp.a11y.speak( wp.i18n.__( 'Menu item deleted' ) ); 1401 1402 $adjacentFocusTarget.focus(); // keyboard accessibility 1402 1403 } ); 1403 1404 } ); … … 1427 1428 } 1428 1429 1429 1430 var titleEl = control.container.find( '.menu-item-title' ), 1430 titleText = item.title || item.original_title || api.Menus.data.l10n.untitled;1431 titleText = item.title || item.original_title || wp.i18n._x( '(no label)', 'missing menu item navigation label' ); 1431 1432 1432 1433 if ( item._invalid ) { 1433 titleText = api.Menus.data.l10n.invalidTitleTpl.replace( '%s', titleText ); 1434 /* translators: %s: title of menu item which is invalid */ 1435 titleText = wp.i18n.__( '%s (Invalid)' ).replace( '%s', titleText ); 1434 1436 } 1435 1437 1436 1438 // Don't update to an empty title. … … 1486 1488 1487 1489 if ( settingValue._invalid ) { 1488 1490 containerClasses.push( 'menu-item-invalid' ); 1489 control.params.title = api.Menus.data.l10n.invalidTitleTpl.replace( '%s', control.params.title ); 1491 /* translators: %s: title of menu item which is invalid */ 1492 control.params.title = wp.i18n.__( '%s (Invalid)' ).replace( '%s', control.params.title ); 1490 1493 } else if ( 'draft' === settingValue.status ) { 1491 1494 containerClasses.push( 'pending' ); 1492 control.params.title = api.Menus.data.pendingTitleTpl.replace( '%s', control.params.title ); 1495 /* translators: %s: title of menu item in draft status */ 1496 control.params.title = wp.i18n.__( '%s (Pending)' ).replace( '%s', control.params.title ); 1493 1497 } 1494 1498 1495 1499 control.params.el_classes = containerClasses.join( ' ' ); … … 1718 1722 */ 1719 1723 moveUp: function() { 1720 1724 this._changePosition( -1 ); 1721 wp.a11y.speak( api.Menus.data.l10n.movedUp);1725 wp.a11y.speak( wp.i18n.__( 'Menu item moved up' ) ); 1722 1726 }, 1723 1727 1724 1728 /** … … 1726 1730 */ 1727 1731 moveDown: function() { 1728 1732 this._changePosition( 1 ); 1729 wp.a11y.speak( api.Menus.data.l10n.movedDown);1733 wp.a11y.speak( wp.i18n.__( 'Menu item moved down' ) ); 1730 1734 }, 1731 1735 /** 1732 1736 * Move menu item and all children up one level of depth. 1733 1737 */ 1734 1738 moveLeft: function() { 1735 1739 this._changeDepth( -1 ); 1736 wp.a11y.speak( api.Menus.data.l10n.movedLeft);1740 wp.a11y.speak( wp.i18n.__( 'Menu item moved out of submenu' ) ); 1737 1741 }, 1738 1742 1739 1743 /** … … 1741 1745 */ 1742 1746 moveRight: function() { 1743 1747 this._changeDepth( 1 ); 1744 wp.a11y.speak( api.Menus.data.l10n.movedRight);1748 wp.a11y.speak( wp.i18n.__( 'Menu item is now a sub-item' ) ); 1745 1749 }, 1746 1750 1747 1751 /** … … 2239 2243 section.collapse({ 2240 2244 completeCallback: function() { 2241 2245 removeSection(); 2242 wp.a11y.speak( api.Menus.data.l10n.menuDeleted);2246 wp.a11y.speak( wp.i18n.__( 'Menu deleted' ) ); 2243 2247 api.panel( 'nav_menus' ).focus(); 2244 2248 } 2245 2249 }); … … 2384 2388 this.$sectionContent.sortable( this.isReordering ? 'disable' : 'enable' ); 2385 2389 if ( this.isReordering ) { 2386 2390 addNewItemBtn.attr({ 'tabindex': '-1', 'aria-hidden': 'true' }); 2387 reorderBtn.attr( 'aria-label', api.Menus.data.l10n.reorderLabelOff);2388 wp.a11y.speak( api.Menus.data.l10n.reorderModeOn);2391 reorderBtn.attr( 'aria-label', wp.i18n.esc_attr__( 'Close reorder mode' ) ); 2392 wp.a11y.speak( wp.i18n.__( 'Reorder mode enabled' ) ); 2389 2393 itemsTitle.attr( 'aria-hidden', 'false' ); 2390 2394 } else { 2391 2395 addNewItemBtn.removeAttr( 'tabindex aria-hidden' ); 2392 reorderBtn.attr( 'aria-label', api.Menus.data.l10n.reorderLabelOn);2393 wp.a11y.speak( api.Menus.data.l10n.reorderModeOff);2396 reorderBtn.attr( 'aria-label', wp.i18n.esc_attr__( 'Reorder menu items' ) ); 2397 wp.a11y.speak( wp.i18n.__( 'Reorder mode closed' ) ); 2394 2398 itemsTitle.attr( 'aria-hidden', 'true' ); 2395 2399 } 2396 2400 … … 2565 2569 setting.preview(); 2566 2570 menuControl.debouncedReflowMenuItems(); 2567 2571 2568 wp.a11y.speak( api.Menus.data.l10n.itemAdded);2572 wp.a11y.speak( wp.i18n.__( 'Menu item added' ) ); 2569 2573 2570 2574 return menuItemControl; 2571 2575 } … … 2661 2665 nameInput.val( '' ); 2662 2666 nameInput.removeClass( 'invalid' ); 2663 2667 2664 wp.a11y.speak( api.Menus.data.l10n.menuAdded);2668 wp.a11y.speak( wp.i18n.__( 'Menu created' ) ); 2665 2669 2666 2670 // Focus on the new menu section. 2667 2671 api.section( customizeId ).focus(); // @todo should we focus on the new menu's control and open the add-items panel? Thinking user flow... … … 3009 3013 name = name || ''; 3010 3014 name = $( '<div>' ).text( name ).html(); // Emulate esc_html() which is used in wp-admin/nav-menus.php. 3011 3015 name = $.trim( name ); 3012 return name || api.Menus.data.l10n.unnamed;3016 return name || wp.i18n._x( '(unnamed)', 'Missing menu name.' ); 3013 3017 } 3014 3018 3015 3019 })( wp.customize, wp, jQuery ); -
src/wp-admin/js/customize-widgets.js
diff --git src/wp-admin/js/customize-widgets.js src/wp-admin/js/customize-widgets.js index 2799b82..3d14df1 100644
4 4 if ( ! wp || ! wp.customize ) { return; } 5 5 6 6 // Set up our namespace... 7 var api = wp.customize, 8 l10n; 7 var api = wp.customize; 9 8 10 9 api.Widgets = api.Widgets || {}; 11 10 api.Widgets.savedWidgetIds = {}; 12 11 13 12 // Link settings 14 13 api.Widgets.data = _wpCustomizeWidgetsSettings || {}; 15 l10n = api.Widgets.data.l10n;16 delete api.Widgets.data.l10n;17 14 18 15 /** 19 16 * wp.customize.Widgets.WidgetModel … … 250 247 251 248 // Send a message to the aria-live region to announce how many search results. 252 249 announceSearchMatches: _.debounce( function() { 253 var message = l10n.widgetsFound.replace( '%d', this.searchMatchesCount ) ;250 var message = wp.i18n.__( 'Number of widgets found: %d' )( '%d', this.searchMatchesCount ) ; 254 251 255 252 if ( ! this.searchMatchesCount ) { 256 message = l10n.noWidgetsFound;253 message = wp.i18n.__( 'No widgets found.' ); 257 254 } 258 255 259 256 wp.a11y.speak( message ); … … 799 796 800 797 if ( isMoveUp ) { 801 798 self.moveUp(); 802 wp.a11y.speak( l10n.widgetMovedUp);799 wp.a11y.speak( wp.i18n.__( 'Widget moved up' ) ); 803 800 } else { 804 801 self.moveDown(); 805 wp.a11y.speak( l10n.widgetMovedDown);802 wp.a11y.speak( wp.i18n.__( 'Widget moved down' ) ); 806 803 } 807 804 808 805 $( this ).focus(); // re-focus after the container was moved … … 876 873 877 874 // Configure update button 878 875 $saveBtn = this.container.find( '.widget-control-save' ); 879 $saveBtn.val( l10n.saveBtnLabel);880 $saveBtn.attr( 'title', l10n.saveBtnTooltip);876 $saveBtn.val( wp.i18n.__( 'Apply' ) ); 877 $saveBtn.attr( 'title', wp.i18n.__( 'Save and preview changes before publishing them.' ) ); 881 878 $saveBtn.removeClass( 'button-primary' ); 882 879 $saveBtn.on( 'click', function( e ) { 883 880 e.preventDefault(); … … 989 986 } ); 990 987 991 988 replaceDeleteWithRemove = function() { 992 $removeBtn.text( l10n.removeBtnLabel); // wp_widget_control() outputs the link as "Delete"993 $removeBtn.attr( 'title', l10n.removeBtnTooltip);989 $removeBtn.text( wp.i18n.__( 'Remove' ) ); // wp_widget_control() outputs the link as "Delete" 990 $removeBtn.attr( 'title', wp.i18n.__( 'Trash widget by moving it to the inactive widgets sidebar.' ) ); 994 991 }; 995 992 996 993 if ( this.params.is_new ) { … … 1266 1263 } 1267 1264 } else { 1268 1265 // General error message 1269 message = l10n.error;1266 message = wp.i18n.__( 'An error has occurred. Please reload the page and try again.' ); 1270 1267 1271 1268 if ( r.data && r.data.message ) { 1272 1269 message = r.data.message; … … 1583 1580 'class': 'no-widget-areas-rendered-notice' 1584 1581 }); 1585 1582 noRenderedAreasNotice.append( $( '<em></em>', { 1586 text: l10n.noAreasRendered1583 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.' ) 1587 1584 } ) ); 1588 1585 panelMetaContainer.append( noRenderedAreasNotice ); 1589 1586 … … 1936 1933 } ); 1937 1934 1938 1935 addNewWidgetBtn.attr({ 'tabindex': '-1', 'aria-hidden': 'true' }); 1939 reorderBtn.attr( 'aria-label', l10n.reorderLabelOff);1940 wp.a11y.speak( l10n.reorderModeOn);1936 reorderBtn.attr( 'aria-label', wp.i18n.esc_attr__( 'Close reorder mode' ) ); 1937 wp.a11y.speak( wp.i18n.__( 'Reorder mode enabled' ) ); 1941 1938 // Hide widget titles while reordering: title is already in the reorder controls. 1942 1939 widgetsTitle.attr( 'aria-hidden', 'true' ); 1943 1940 } else { 1944 1941 addNewWidgetBtn.removeAttr( 'tabindex aria-hidden' ); 1945 reorderBtn.attr( 'aria-label', l10n.reorderLabelOn);1946 wp.a11y.speak( l10n.reorderModeOff);1942 reorderBtn.attr( 'aria-label', wp.i18n.esc_attr__( 'Reorder widgets' ) ); 1943 wp.a11y.speak( wp.i18n.__( 'Reorder mode closed' ) ); 1947 1944 widgetsTitle.attr( 'aria-hidden', 'false' ); 1948 1945 } 1949 1946 }, -
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, 98 98 updateHtmlTitle = function ( diff ) { 99 99 var newTitle, regExMatch, titleCount, commentFrag; 100 100 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 + ']+\\)' ) + '?' ); 102 103 // count funcs operate on a $'d element 103 104 titleDiv = titleDiv || $( '<div />' ); 104 105 newTitle = adminTitle; … … var getCount, updateCount, updateCountText, updatePending, updateApproved, 117 118 updateCount( titleDiv, titleCount ); 118 119 regExMatch = titleRegEx.exec( document.title ); 119 120 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() ) + ' ' ); 121 123 } 122 124 } else { 123 125 regExMatch = titleRegEx.exec( newTitle ); 124 126 if ( regExMatch ) { 125 newTitle = newTitle.replace( regExMatch[0], adminCommentsL10n.docTitleComments);127 newTitle = newTitle.replace( regExMatch[0], wp.i18n.__( 'Comments' ) ); 126 128 } 127 129 } 128 130 document.title = newTitle; … … setCommentsList = function() { 218 220 219 221 if ( c.is('.unapproved') ) { 220 222 if ( settings.data.id == replyID ) 221 replyButton.text( adminCommentsL10n.replyApprove);223 replyButton.text( wp.i18n.__( 'Approve and Reply' ) ); 222 224 223 225 c.find( '.row-actions span.view' ).addClass( 'hidden' ).end() 224 226 .find( 'div.comment_status' ).html( '0' ); 225 227 226 228 } else { 227 229 if ( settings.data.id == replyID ) 228 replyButton.text( adminCommentsL10n.reply);230 replyButton.text( wp.i18n.__( 'Reply' ) ); 229 231 230 232 c.find( '.row-actions span.view' ).removeClass( 'hidden' ).end() 231 233 .find( 'div.comment_status' ).html( '1' ); … … commentReply = { 607 609 }, 608 610 609 611 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." ) ) ) ) { 611 613 $( el ).find( 'a.vim-q' ).click(); 612 614 } 613 615 }, … … commentReply = { 715 717 c.after(editRow); 716 718 717 719 if ( c.hasClass('unapproved') ) { 718 replyButton.text( adminCommentsL10n.replyApprove);720 replyButton.text( wp.i18n.__( 'Approve and Reply' ) ); 719 721 } else { 720 replyButton.text( adminCommentsL10n.reply);722 replyButton.text( wp.i18n.__( 'Reply' ) ); 721 723 } 722 724 723 725 $('#replyrow').fadeIn(300, function(){ $(this).show(); }); … … commentReply = { 875 877 return true; 876 878 } 877 879 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." ) ); 879 881 } 880 882 }; 881 883 -
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 */ 2 2 window.wp = window.wp || {}; 3 3 4 4 var inlineEditPost; … … inlineEditPost = { 95 95 if ( $(this).prop('checked') ) { 96 96 c = false; 97 97 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>'; 100 100 } 101 101 }); 102 102 … … inlineEditPost = { 116 116 if ( 'post' === type ) { 117 117 // support multi taxonomies? 118 118 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() } ); 120 120 } 121 121 $('html, body').animate( { scrollTop: 0 }, 'fast' ); 122 122 }, … … inlineEditPost = { 184 184 var terms = $(this), 185 185 taxname = $(this).attr('id').replace('_' + id, ''), 186 186 textarea = $('textarea.tax_input_' + taxname, editRow), 187 comma = inlineEditL10n.comma;187 comma = wp.i18n._x( ',', 'tag delimiter' ).trim(); 188 188 189 189 terms.find( 'img' ).replaceWith( function() { return this.alt; } ); 190 190 terms = terms.text(); … … inlineEditPost = { 196 196 textarea.val(terms); 197 197 } 198 198 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() } ); 200 200 }); 201 201 202 202 // handle the post status … … inlineEditPost = { 276 276 $( inlineEditPost.what + id ).hide().fadeIn( 400, function() { 277 277 // Move focus back to the Quick Edit link. $( this ) is the row being animated. 278 278 $( this ).find( '.editinline' ).focus(); 279 wp.a11y.speak( inlineEditL10n.saved);279 wp.a11y.speak( wp.i18n.__( 'Changes saved.' ) ); 280 280 }); 281 281 } else { 282 282 r = r.replace( /<.[^<>]*?>/g, '' ); … … inlineEditPost = { 284 284 wp.a11y.speak( $errorSpan.text() ); 285 285 } 286 286 } 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' ); 289 289 } 290 290 }, 291 291 '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 daad73f..8b4701c 100644
1 /* global inlineEditL10n,ajaxurl */1 /* global ajaxurl */ 2 2 /** 3 3 * This file is used on the term overview page to power quick-editing terms. 4 4 */ … … inlineEditTax = { 221 221 row.hide().fadeIn( 400, function() { 222 222 // Move focus back to the Quick Edit link. 223 223 row.find( '.editinline' ).focus(); 224 wp.a11y.speak( inlineEditL10n.saved);224 wp.a11y.speak( wp.i18n.__( 'Changes saved.' ), 'polite' ); 225 225 }); 226 226 227 227 } else { … … inlineEditTax = { 233 233 wp.a11y.speak( $errorSpan.text() ); 234 234 } 235 235 } else { 236 $errorSpan.html( inlineEditL10n.error).show();237 wp.a11y.speak( inlineEditL10n.error);236 $errorSpan.html( wp.i18n.__( 'Error while saving the changes.' ) ).show(); 237 wp.a11y.speak( wp.i18n.__( 'Error while saving the changes.' ), 'polite' ); 238 238 } 239 239 } 240 240 ); -
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 */ 2 2 3 3 var findPosts; 4 4 ( function( $ ){ … … var findPosts; 61 61 spinner.removeClass( 'is-active' ); 62 62 }).done( function( x ) { 63 63 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.' ) ); 65 65 } 66 66 67 67 $( '#find-posts-response' ).html( x.data ); 68 68 }).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.' ) ); 70 70 }); 71 71 } 72 72 }; -
src/wp-admin/js/nav-menu.js
diff --git src/wp-admin/js/nav-menu.js src/wp-admin/js/nav-menu.js index 2410efe..c7c817f 100644
8 8 * @subpackage Administration 9 9 */ 10 10 11 /* global menus, postboxes, columns, isRtl, navMenuL10n,ajaxurl */11 /* global menus, postboxes, columns, isRtl, ajaxurl */ 12 12 13 13 var wpNavMenu; 14 14 … … var wpNavMenu; 583 583 if ( title ) { 584 584 titleEl.text( title ).removeClass( 'no-title' ); 585 585 } else { 586 titleEl.text( navMenuL10n.untitled).addClass( 'no-title' );586 titleEl.text( wp.i18n._x( '(no label)', 'missing menu item navigation label' ) ).addClass( 'no-title' ); 587 587 } 588 588 } ); 589 589 }, … … var wpNavMenu; 1025 1025 if ( 0 !== $('#menu-to-edit').length || 0 !== $('.menu-location-menus select').length ) { 1026 1026 window.onbeforeunload = function(){ 1027 1027 if ( api.menusChanged ) 1028 return navMenuL10n.saveAlert;1028 return wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' ); 1029 1029 }; 1030 1030 } else { 1031 1031 // Make the post boxes read-only, as they can't be used yet … … var wpNavMenu; 1172 1172 1173 1173 eventOnClickMenuDelete : function() { 1174 1174 // Delete warning AYS 1175 if ( window.confirm( navMenuL10n.warnDeleteMenu) ) {1175 if ( window.confirm( wp.i18n.__( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ) ) ) { 1176 1176 window.onbeforeunload = null; 1177 1177 return true; 1178 1178 } … … var wpNavMenu; 1203 1203 $item; 1204 1204 1205 1205 if( ! $items.length ) { 1206 $('.categorychecklist', panel).html( '<li><p>' + navMenuL10n.noResultsFound+ '</p></li>' );1206 $('.categorychecklist', panel).html( '<li><p>' + wp.i18n.__( 'No results found.' ) + '</p></li>' ); 1207 1207 $( '.spinner', panel ).removeClass( 'is-active' ); 1208 1208 wrapper.addClass( 'has-no-menu-item' ); 1209 1209 return; -
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 */ 2 2 3 3 /** 4 4 * Functionality for the plugin install screens. … … jQuery( document ).ready( function( $ ) { 139 139 // Open the Plugin details modal. 140 140 $( '.thickbox.open-plugin-details-modal' ).on( 'click', function( e ) { 141 141 // 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' ); 143 143 144 144 e.preventDefault(); 145 145 e.stopPropagation(); … … jQuery( document ).ready( function( $ ) { 152 152 // Set ARIA role and ARIA label. 153 153 tbWindow.attr({ 154 154 'role': 'dialog', 155 'aria-label': plugininstallL10n.plugin_modal_label155 'aria-label': wp.i18n.__( 'Plugin details' ) 156 156 }); 157 157 158 158 // 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 af9015b..dc4bb25 100644
1 /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */1 /* global ajaxurl, wpAjax, postboxes, pagenow, tinymce, alert, deleteUserSetting */ 2 2 /* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply */ 3 3 4 4 /** … … window.wp = window.wp || {}; 73 73 if ( commentsBox.st > commentsBox.total ) 74 74 $('#show-comments').hide(); 75 75 else 76 $('#show-comments').show().children('a').html( postL10n.showcomm);76 $('#show-comments').show().children('a').html( wp.i18n.__( 'Show more comments' ) ); 77 77 78 78 return; 79 79 } else if ( 1 == r ) { 80 $('#show-comments').html( postL10n.endcomm);80 $('#show-comments').html( wp.i18n.__( 'No more comments found.' ) ); 81 81 return; 82 82 } 83 83 … … window.wp = window.wp || {}; 105 105 * Overwrite the content of the Featured Image postbox 106 106 * 107 107 * @param {string} html New HTML to be displayed in the content area of the postbox. 108 * 108 * 109 109 * @global 110 110 */ 111 111 WPSetThumbnailHTML = function(html){ … … window.wp = window.wp || {}; 144 144 */ 145 145 function(str){ 146 146 if ( str == '0' ) { 147 alert( setPostThumbnailL10n.error);147 alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) ); 148 148 } else { 149 149 WPSetThumbnailHTML(str); 150 150 } … … jQuery(document).ready( function($) { 465 465 $submitButtons.removeClass( 'disabled' ); 466 466 } 467 467 }).on( 'before-autosave.edit-post', function() { 468 $( '.autosave-message' ).text( postL10n.savingText );468 $( '.autosave-message' ).text( wp.i18n.__( 'Saving...' ) ); // No ellipsis. 469 469 }).on( 'after-autosave.edit-post', function( event, data ) { 470 470 $( '.autosave-message' ).text( data.message ); 471 471 … … jQuery(document).ready( function($) { 484 484 if ( ( editor && ! editor.isHidden() && editor.isDirty() ) || 485 485 ( wp.autosave && wp.autosave.server.postChanged() ) ) { 486 486 487 return postL10n.saveAlert;487 return wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' ); 488 488 } 489 489 }).on( 'unload.edit-post', function( event ) { 490 490 if ( ! releaseLock ) { … … jQuery(document).ready( function($) { 729 729 730 730 // Determine what the publish should be depending on the date and post status. 731 731 if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) { 732 publishOn = postL10n.publishOnFuture;733 $('#publish').val( postL10n.schedule);732 publishOn = wp.i18n.__( 'Schedule for:' ); 733 $('#publish').val( wp.i18n.__( 'Schedule' ) ); 734 734 } else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' ) { 735 publishOn = postL10n.publishOn;736 $('#publish').val( postL10n.publish);735 publishOn = wp.i18n.__( 'Publish on:' ); 736 $('#publish').val( wp.i18n.__( 'Publish' ) ); 737 737 } else { 738 publishOn = postL10n.publishOnPast;739 $('#publish').val( postL10n.update);738 publishOn = wp.i18n.__( 'Published on:' ); 739 $('#publish').val( wp.i18n.__( 'Update' ) ); 740 740 } 741 741 742 742 // If the date is the same, set it to trigger update events. … … jQuery(document).ready( function($) { 746 746 } else { 747 747 $('#timestamp').html( 748 748 '\n' + publishOn + ' <b>' + 749 postL10n.dateFormat 749 /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ 750 wp.i18n.__( '%1$s %2$s, %3$s @ %4$s:%5$s' ) 750 751 .replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) ) 751 752 .replace( '%2$s', parseInt( jj, 10 ) ) 752 753 .replace( '%3$s', aa ) … … jQuery(document).ready( function($) { 758 759 759 760 // Add "privately published" to post status when applies. 760 761 if ( $postVisibilitySelect.find('input:radio:checked').val() == 'private' ) { 761 $('#publish').val( postL10n.update);762 $('#publish').val( wp.i18n.__( 'Update' ) ); 762 763 if ( 0 === optPublish.length ) { 763 postStatus.append('<option value="publish">' + postL10n.privatelyPublished+ '</option>');764 postStatus.append('<option value="publish">' + wp.i18n.__( 'Privately Published' ) + '</option>'); 764 765 } else { 765 optPublish.html( postL10n.privatelyPublished);766 optPublish.html( wp.i18n.__( 'Privately Published' ) ); 766 767 } 767 768 $('option[value="publish"]', postStatus).prop('selected', true); 768 769 $('#misc-publishing-actions .edit-post-status').hide(); … … jQuery(document).ready( function($) { 773 774 postStatus.val($('#hidden_post_status').val()); 774 775 } 775 776 } else { 776 optPublish.html( postL10n.published);777 optPublish.html( wp.i18n.__( 'Published' ) ); 777 778 } 778 779 if ( postStatus.is(':hidden') ) 779 780 $('#misc-publishing-actions .edit-post-status').show(); … … jQuery(document).ready( function($) { 788 789 } else { 789 790 $('#save-post').show(); 790 791 if ( $('option:selected', postStatus).val() == 'pending' ) { 791 $('#save-post').show().val( postL10n.savePending);792 $('#save-post').show().val( wp.i18n.__( 'Save as Pending' ) ); 792 793 } else { 793 $('#save-post').show().val( postL10n.saveDraft);794 $('#save-post').show().val( wp.i18n.__( 'Save Draft' ) ); 794 795 } 795 796 } 796 797 return true; … … jQuery(document).ready( function($) { 822 823 823 824 // Set the selected visibility as current. 824 825 $postVisibilitySelect.find('.save-post-visibility').click( function( event ) { // crazyhorse - multiple ok cancels 826 var visibility; 827 825 828 $postVisibilitySelect.slideUp('fast'); 826 829 $('#visibility .edit-visibility').show().focus(); 827 830 updateText(); … … jQuery(document).ready( function($) { 830 833 $('#sticky').prop('checked', false); 831 834 } 832 835 833 if ( $('#sticky').prop('checked') ) { 834 sticky = 'Sticky'; 835 } else { 836 sticky = ''; 836 switch ( $postVisibilitySelect.find( 'input:radio:checked' ).val() ) { 837 case 'password': 838 visibility = wp.i18n.__( 'Password Protected' ); 839 break; 840 case 'private': 841 visibility = wp.i18n.__( 'Private' ); 842 break; 843 default: 844 visibility = $( '#sticky' ).prop( 'checked' ) ? wp.i18n.__( 'Public, Sticky' ) : wp.i18n.__( 'Public' ); 845 break; 837 846 } 838 847 839 $('#post-visibility-display').html( postL10n[ $postVisibilitySelect.find('input:radio:checked').val() + sticky ]);848 $('#post-visibility-display').html( visibility ); 840 849 event.preventDefault(); 841 850 }); 842 851 … … jQuery(document).ready( function($) { 950 959 $el = $( '#editable-post-name' ); 951 960 revert_e = $el.html(); 952 961 953 buttons.html( '<button type="button" class="save button button-small">' + postL10n.ok + '</button> <button type="button" class="cancel button-link">' + postL10n.cancel+ '</button>' );962 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>' ); 954 963 955 964 // Save permalink changes. 956 965 buttons.children( '.save' ).click( function() { … … jQuery(document).ready( function($) { 983 992 permalink.html(permalinkOrig); 984 993 real_slug.val(new_slug); 985 994 $( '.edit-slug' ).focus(); 986 wp.a11y.speak( postL10n.permalinkSaved);995 wp.a11y.speak( wp.i18n.__( 'Permalink saved' ) ); 987 996 } 988 997 ); 989 998 }); -
src/wp-admin/js/postbox.js
diff --git src/wp-admin/js/postbox.js src/wp-admin/js/postbox.js index bbc73b2..c28cf13 100644
var postboxes; 348 348 t.removeClass('empty-container'); 349 349 } 350 350 else { 351 t.addClass( 'empty-container');352 t.attr( 'data-emptyString', postBoxL10n.postBoxEmptyString);351 t.addClass( 'empty-container' ); 352 t.attr( 'data-emptyString', wp.i18n.__( 'Drag boxes here' ) ); 353 353 } 354 354 }); 355 355 -
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
42 42 *************************************************************** */ 43 43 44 44 /** 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 /**59 45 * Strips HTML tags 60 46 * 61 47 * @param string string Text to have the HTML tags striped out of. … … 301 287 } 302 288 } 303 289 }).fail( function() { 304 renderError( __( 'serverError' ) );290 renderError( wp.i18n.__( 'Connection lost or the server is busy. Please try again later.' ) ); 305 291 }); 306 292 } 307 293 … … 451 437 var $element = $mediaThumbWrap.clone().addClass( 'is-image' ); 452 438 453 439 $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 ) ); 455 442 456 443 $mediaList.append( $element ); 457 444 } … … 490 477 cssClass += ' is-video'; 491 478 } 492 479 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 ) ); 494 482 495 483 if ( displaySrc ) { 496 484 $element.css( 'background-image', 'url(' + displaySrc + ')' ); … … 854 842 855 843 $window.on( 'beforeunload.press-this', function() { 856 844 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.' ); 858 846 } 859 847 } ).on( 'resize.press-this', function() { 860 848 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 */ 2 2 /* exported WPSetAsThumbnail */ 3 3 4 4 function WPSetAsThumbnail( id, nonce ) { 5 5 var $link = jQuery('a#wp-post-thumbnail-' + id); 6 6 7 $link.text( setPostThumbnailL10n.saving );7 $link.text( wp.i18n.__( 'Saving...' ) ); // No ellipsis. 8 8 jQuery.post(ajaxurl, { 9 9 action: 'set-post-thumbnail', post_id: post_id, thumbnail_id: id, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie ) 10 10 }, function(str){ 11 11 var win = window.dialogArguments || opener || parent || top; 12 $link.text( setPostThumbnailL10n.setThumbnail);12 $link.text( wp.i18n.__( 'Use as featured image' ) ); 13 13 if ( str == '0' ) { 14 alert( setPostThumbnailL10n.error);14 alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) ); 15 15 } else { 16 16 jQuery('a.wp-post-thumbnail').show(); 17 $link.text( setPostThumbnailL10n.done);17 $link.text( wp.i18n.__( 'Done' ) ); 18 18 $link.fadeOut( 2000 ); 19 19 win.WPSetThumbnailID(id); 20 20 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; 21 21 22 22 tagBox = { 23 23 clean : function(tags) { 24 var comma = w indow.tagsBoxL10n.tagDelimiter;24 var comma = wp.i18n._x( ',', 'tag delimiter' ); 25 25 if ( ',' !== comma ) 26 26 tags = tags.replace(new RegExp(comma, 'g'), ','); 27 27 tags = tags.replace(/\s*,\s*/g, ',').replace(/,+/g, ',').replace(/[,\s]+$/, '').replace(/^[,\s]+/, ''); … … var tagBox, array_unique_noempty; 35 35 num = id.split('-check-num-')[1], 36 36 taxbox = $(el).closest('.tagsdiv'), 37 37 thetags = taxbox.find('.the-tags'), 38 comma = w indow.tagsBoxL10n.tagDelimiter,38 comma = wp.i18n._x( ',', 'tag delimiter' ), 39 39 current_tags = thetags.val().split( comma ), 40 40 new_tags = []; 41 41 … … var tagBox, array_unique_noempty; 65 65 66 66 disabled = thetags.prop('disabled'); 67 67 68 current_tags = thetags.val().split( w indow.tagsBoxL10n.tagDelimiter);68 current_tags = thetags.val().split( wp.i18n._x( ',', 'tag delimiter' ) ); 69 69 tagchecklist.empty(); 70 70 71 71 $.each( current_tags, function( key, val ) { … … var tagBox, array_unique_noempty; 107 107 var tagsval, newtags, text, 108 108 tags = $( '.the-tags', el ), 109 109 newtag = $( 'input.newtag', el ), 110 comma = w indow.tagsBoxL10n.tagDelimiter;110 comma = wp.i18n._x( ',', 'tag delimiter' ); 111 111 112 112 a = a || false; 113 113 … … var tagBox, array_unique_noempty; 177 177 var tax = $(this).closest('div.tagsdiv').attr('id'); 178 178 $(this).suggest( 179 179 ajaxurl + '?action=ajax-tag-search&tax=' + tax, 180 { delay: 500, minchars: 2, multiple: true, multipleSep: w indow.tagsBoxL10n.tagDelimiter}180 { delay: 500, minchars: 2, multiple: true, multipleSep: wp.i18n._x( ',', 'tag delimiter' ) } 181 181 ); 182 182 }); 183 183 -
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($) { 16 16 $('select#parent option[value="' + data.match(/tag_ID=(\d+)/)[1] + '"]').remove(); 17 17 $('a.tag-link-' + data.match(/tag_ID=(\d+)/)[1]).remove(); 18 18 } 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>'); 20 20 tr.children().css('backgroundColor', ''); 21 21 } 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>'); 23 23 tr.children().css('backgroundColor', ''); 24 24 } 25 25 }); -
src/wp-admin/js/theme.js
diff --git src/wp-admin/js/theme.js src/wp-admin/js/theme.js index 1be6f18..7842c77 100644
window.wp = window.wp || {}; 4 4 ( function($) { 5 5 6 6 // Set up our namespace... 7 var themes, l10n; 8 themes = wp.themes = wp.themes || {}; 7 var themes = wp.themes = wp.themes || {}; 9 8 10 9 // Store the theme data and settings for organized and quick access 11 // themes.data.settings, themes.data.themes , themes.data.l10n10 // themes.data.settings, themes.data.themes 12 11 themes.data = _wpThemeSettings; 13 l10n = themes.data.l10n;14 12 15 13 // Shortcut for isInstall check 16 14 themes.isInstall = !! themes.data.settings.isInstall; … … themes.view.Appearance = wp.Backbone.View.extend({ 104 102 // Render and append after screen title 105 103 view.render(); 106 104 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>' ) ) 108 106 .append( view.el ); 109 107 }, 110 108 … … themes.view.Preview = themes.view.Details.extend({ 916 914 collapse: function( event ) { 917 915 var $button = $( event.currentTarget ); 918 916 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' ) }); 920 918 } else { 921 $button.attr({ 'aria-expanded': 'true', 'aria-label': l10n.collapseSidebar});919 $button.attr({ 'aria-expanded': 'true', 'aria-label': wp.i18n.__( 'Collapse Sidebar' ) }); 922 920 } 923 921 924 922 this.$el.toggleClass( 'collapsed' ).toggleClass( 'expanded' ); … … themes.view.Themes = wp.Backbone.View.extend({ 1155 1153 1156 1154 // 'Add new theme' element shown at the end of the grid 1157 1155 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>' ); 1159 1157 } 1160 1158 1161 1159 this.parent.page++; … … themes.view.Themes = wp.Backbone.View.extend({ 1211 1209 $modal.find( '.notice-warning' ) 1212 1210 .removeClass( 'notice-large' ) 1213 1211 .addClass( 'updating-message' ) 1214 .find( 'p' ).text( wp. updates.l10n.updating);1212 .find( 'p' ).text( wp.i18n.__( 'Updating...' ) ); 1215 1213 } else if ( $card.find( '.notice-error' ).length ) { 1216 1214 $modal.find( '.notice-warning' ).remove(); 1217 1215 } … … themes.view.Themes = wp.Backbone.View.extend({ 1287 1285 // Dispatch audible search results feedback message 1288 1286 announceSearchResults: function( count ) { 1289 1287 if ( 0 === count ) { 1290 wp.a11y.speak( l10n.noThemesFound);1288 wp.a11y.speak( __( 'No themes found. Try a different search.' ), 'polite' ); 1291 1289 } 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' ); 1293 1291 } 1294 1292 } 1295 1293 }); … … themes.view.Search = wp.Backbone.View.extend({ 1303 1301 searching: false, 1304 1302 1305 1303 attributes: { 1306 placeholder: l10n.searchPlaceholder,1304 placeholder: __( 'Search themes...' ), // No ellipsis. 1307 1305 type: 'search', 1308 1306 'aria-describedby': 'live-search-desc' 1309 1307 }, … … themes.view.Installer = themes.view.Appearance.extend({ 1585 1583 this.listenTo( this.collection, 'query:fail', function() { 1586 1584 $( 'body' ).removeClass( 'loading-content' ); 1587 1585 $( '.theme-browser' ).find( 'div.error' ).remove(); 1588 $( '.theme-browser' ).find( 'div.themes' ).before( '<div class="error"><p>' + l10n.error+ '</p></div>' );1586 $( '.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’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) + '</p></div>' ); 1589 1587 }); 1590 1588 1591 1589 if ( this.view ) { … … themes.view.Installer = themes.view.Appearance.extend({ 1695 1693 } 1696 1694 1697 1695 if ( ! tags ) { 1698 wp.a11y.speak( l10n.selectFeatureFilter ); 1696 /* translators: hidden accessibility text */ 1697 wp.a11y.speak( wp.i18n.__( 'Select one or more Theme features to filter by' ) ); 1699 1698 return; 1700 1699 } 1701 1700 -
src/wp-admin/js/updates.js
diff --git src/wp-admin/js/updates.js src/wp-admin/js/updates.js index 200241b..2106442 100644
14 14 * @param {object} wp WP object. 15 15 * @param {object} settings WP Updates settings. 16 16 * @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. 18 18 * @param {object=} settings.plugins Base names of plugins in their different states. 19 19 * @param {Array} settings.plugins.all Base names of all plugins. 20 20 * @param {Array} settings.plugins.active Base names of active plugins. … … 50 50 wp.updates.ajaxNonce = settings.ajax_nonce; 51 51 52 52 /** 53 * Localized strings.53 * Whether we're in the network admin or not. 54 54 * 55 * @since 4. 2.055 * @since 4.7.0 56 56 * 57 * @type { object}57 * @type {bool} 58 58 */ 59 wp.updates. l10n = settings.l10n;59 wp.updates.isNetworkAdmin = settings.isNetworkAdmin; 60 60 61 61 /** 62 62 * Current search term. … … 351 351 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 352 352 $updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' ); 353 353 $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() ); 355 356 } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { 356 357 $card = $( '.plugin-card-' + args.slug ); 357 358 $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' ) ); 359 361 360 362 // Remove previous error messages, if any. 361 363 $card.removeClass( 'plugin-card-update-failed' ).find( '.notice.notice-error' ).remove(); 362 364 } 363 365 364 if ( $message.html() !== wp. updates.l10n.updating) {366 if ( $message.html() !== wp.i18n.__( 'Updating...' ) ) { 365 367 $message.data( 'originaltext', $message.html() ); 366 368 } 367 369 368 370 $message 369 371 .attr( 'aria-label', message ) 370 .text( wp. updates.l10n.updating);372 .text( wp.i18n.__( 'Updating...' ) ); 371 373 372 374 $document.trigger( 'wp-plugin-updating', args ); 373 375 … … 409 411 } 410 412 411 413 $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!' ) ); 414 417 415 wp.a11y.speak( wp.updates.l10n.updatedMsg, 'polite' ); 418 /* translators: JavaScript accessible string */ 419 wp.a11y.speak( wp.i18n.__( 'Update completed successfully.' ), 'polite' ); 416 420 417 421 wp.updates.decrementCount( 'plugin' ); 418 422 … … 444 448 return; 445 449 } 446 450 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 ); 448 453 449 454 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 450 455 if ( response.plugin ) { … … 456 461 457 462 if ( response.pluginName ) { 458 463 $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 ) ); 460 466 } else { 461 467 $message.find( 'p' ).removeAttr( 'aria-label' ); 462 468 } … … 469 475 } ) ); 470 476 471 477 $card.find( '.update-now' ) 472 .text( wp. updates.l10n.updateFailedShort).removeClass( 'updating-message' );478 .text( wp.i18n.__( 'Update Failed!' ) ).removeClass( 'updating-message' ); 473 479 474 480 if ( response.pluginName ) { 475 481 $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 ) ); 477 484 } else { 478 485 $card.find( '.update-now' ).removeAttr( 'aria-label' ); 479 486 } … … 488 495 489 496 $card.find( '.update-now' ) 490 497 .attr( 'aria-label', false ) 491 .text( wp. updates.l10n.updateNow);498 .text( wp.i18n.__( 'Update Now' ) ); 492 499 }, 200 ); 493 500 } ); 494 501 } … … 523 530 $message = $( '[data-slug="' + args.slug + '"]' ); 524 531 } 525 532 526 if ( $message.html() !== wp. updates.l10n.installing) {533 if ( $message.html() !== wp.i18n.__( 'Installing...' ) ) { 527 534 $message.data( 'originaltext', $message.html() ); 528 535 } 529 536 530 537 $message 531 538 .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...' ) ); 534 542 535 wp.a11y.speak( wp. updates.l10n.installingMsg, 'polite' );543 wp.a11y.speak( wp.i18n.__( 'Installing... please wait.' ), 'polite' ); 536 544 537 545 // Remove previous error messages, if any. 538 546 $card.removeClass( 'plugin-card-install-failed' ).find( '.notice.notice-error' ).remove(); … … 554 562 * @param {string} response.activateUrl URL to activate the just installed plugin. 555 563 */ 556 564 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' ); 558 569 559 570 $message 560 571 .removeClass( 'updating-message' ) 561 572 .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!' ) ); 564 576 565 wp.a11y.speak( wp. updates.l10n.installedMsg, 'polite' );577 wp.a11y.speak( wp.i18n.__( 'Installation completed successfully.' ), 'polite' ); 566 578 567 579 $document.trigger( 'wp-plugin-install-success', response ); 568 580 569 581 if ( response.activateUrl ) { 570 582 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 } 571 588 572 589 // Transform the 'Install' button into an 'Activate' button. 573 590 $message.removeClass( 'install-now installed button-disabled updated-message' ).addClass( 'activate-now button-primary' ) 574 591 .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 ); 577 594 }, 1000 ); 578 595 } 579 596 }; … … 603 620 return; 604 621 } 605 622 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 ); 607 625 608 626 $card 609 627 .addClass( 'plugin-card-update-failed' ) … … 621 639 622 640 $button 623 641 .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!' ) ); 626 645 627 646 wp.a11y.speak( errorMessage, 'assertive' ); 628 647 … … 644 663 wp.updates.addAdminNotice( { 645 664 id: 'install-success', 646 665 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' ) 648 668 } ); 649 669 650 670 $( '[data-slug="' + response.slug + '"]' ) … … 652 672 .addClass( 'activate-now' ) 653 673 .attr({ 654 674 '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 ) 656 677 }) 657 .text( wp. updates.l10n.activateImporter);678 .text( wp.i18n.__( 'Run Importer' ) ); 658 679 659 wp.a11y.speak( wp. updates.l10n.installedMsg, 'polite' );680 wp.a11y.speak( wp.i18n.__( 'Installation completed successfully.' ), 'polite' ); 660 681 661 682 $document.trigger( 'wp-importer-install-success', response ); 662 683 }; … … 674 695 * @param {string} response.errorMessage The error that occurred. 675 696 */ 676 697 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 ), 678 700 $installLink = $( '[data-slug="' + response.slug + '"]' ), 679 701 pluginName = $installLink.data( 'name' ); 680 702 … … 694 716 695 717 $installLink 696 718 .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 ) ); 699 722 700 723 wp.a11y.speak( errorMessage, 'assertive' ); 701 724 … … 723 746 error: wp.updates.deletePluginError 724 747 }, args ); 725 748 726 if ( $link.html() !== wp. updates.l10n.deleting) {749 if ( $link.html() !== wp.i18n.__( 'Deleting...' ) ) { 727 750 $link 728 751 .data( 'originaltext', $link.html() ) 729 .text( wp. updates.l10n.deleting);752 .text( wp.i18n.__( 'Deleting...' ) ); 730 753 } 731 754 732 wp.a11y.speak( wp. updates.l10n.deleting, 'polite' );755 wp.a11y.speak( wp.i18n.__( 'Deleting...' ), 'polite' ); 733 756 734 757 $document.trigger( 'wp-plugin-deleting', args ); 735 758 … … 816 839 $views.find( '.all' ).remove(); 817 840 818 841 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>' ); 820 843 } 821 844 } 822 845 } ); 823 846 824 wp.a11y.speak( wp. updates.l10n.deleted, 'polite' );847 wp.a11y.speak( wp.i18n.__( 'Deleted!' ), 'polite' ); 825 848 826 849 $document.trigger( 'wp-plugin-delete-success', response ); 827 850 }; … … 916 939 $notice = $notice.addClass( 'updating-message' ).find( 'p' ); 917 940 } 918 941 919 if ( $notice.html() !== wp. updates.l10n.updating) {942 if ( $notice.html() !== wp.i18n.__( 'Updating...' ) ) { 920 943 $notice.data( 'originaltext', $notice.html() ); 921 944 } 922 945 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. 925 949 926 950 $document.trigger( 'wp-theme-updating', args ); 927 951 … … 945 969 $theme = $( '[data-slug="' + response.slug + '"]' ), 946 970 updatedMessage = { 947 971 className: 'updated-message notice-success notice-alt', 948 message: wp. updates.l10n.updated972 message: wp.i18n.__( 'Updated!' ) 949 973 }, 950 974 $notice, newText; 951 975 … … 967 991 } 968 992 969 993 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' ); 971 996 972 997 wp.updates.decrementCount( 'theme' ); 973 998 … … 992 1017 */ 993 1018 wp.updates.updateThemeError = function( response ) { 994 1019 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 ), 996 1022 $notice; 997 1023 998 1024 if ( ! wp.updates.isValidResponse( response, 'update' ) ) { … … 1044 1070 1045 1071 $message.addClass( 'updating-message' ); 1046 1072 $message.parents( '.theme' ).addClass( 'focus' ); 1047 if ( $message.html() !== wp. updates.l10n.installing) {1073 if ( $message.html() !== wp.i18n.__( 'Installing...' ) ) { 1048 1074 $message.data( 'originaltext', $message.html() ); 1049 1075 } 1050 1076 1051 1077 $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' ); 1055 1082 1056 1083 // Remove previous error messages, if any. 1057 1084 $( '.install-theme-info, [data-slug="' + args.slug + '"]' ).removeClass( 'theme-install-failed' ).find( '.notice.notice-error' ).remove(); … … 1073 1100 * @param {string} response.activateUrl URL to activate the just installed theme. 1074 1101 */ 1075 1102 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; 1078 1107 1079 1108 $document.trigger( 'wp-theme-install-success', response ); 1080 1109 1081 1110 $message = $card.find( '.button-primary' ) 1082 1111 .removeClass( 'updating-message' ) 1083 1112 .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!' ) ); 1086 1116 1087 wp.a11y.speak( wp. updates.l10n.installedMsg, 'polite' );1117 wp.a11y.speak( wp.i18n.__( 'Installation completed successfully.' ), 'polite' ); 1088 1118 1089 1119 setTimeout( function() { 1090 1120 1091 1121 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 } 1092 1127 1093 1128 // Transform the 'Install' button into an 'Activate' button. 1094 1129 $message 1095 1130 .attr( 'href', response.activateUrl ) 1096 1131 .removeClass( 'theme-install updated-message disabled' ) 1097 1132 .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 ); 1100 1135 } 1101 1136 1102 1137 if ( response.customizeUrl ) { … … 1106 1141 return $( '<a>' ) 1107 1142 .attr( 'href', response.customizeUrl ) 1108 1143 .addClass( 'button load-customize' ) 1109 .text( wp. updates.l10n.livePreview);1144 .text( wp.i18n.__( 'Live Preview' ) ); 1110 1145 } ); 1111 1146 } 1112 1147 }, 1000 ); … … 1125 1160 */ 1126 1161 wp.updates.installThemeError = function( response ) { 1127 1162 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 ), 1129 1165 $message = wp.updates.adminNotice( { 1130 1166 className: 'update-message notice-error notice-alt', 1131 1167 message: errorMessage … … 1149 1185 1150 1186 $button 1151 1187 .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!' ) ); 1154 1191 1155 1192 wp.a11y.speak( errorMessage, 'assertive' ); 1156 1193 … … 1183 1220 error: wp.updates.deleteThemeError 1184 1221 }, args ); 1185 1222 1186 if ( $button && $button.html() !== wp. updates.l10n.deleting) {1223 if ( $button && $button.html() !== wp.i18n.__( 'Deleting...' ) ) { 1187 1224 $button 1188 1225 .data( 'originaltext', $button.html() ) 1189 .text( wp. updates.l10n.deleting);1226 .text( wp.i18n.__( 'Deleting...' ) ); 1190 1227 } 1191 1228 1192 wp.a11y.speak( wp. updates.l10n.deleting, 'polite' );1229 wp.a11y.speak( wp.i18n.__( 'Deleting...' ), 'polite' ); 1193 1230 1194 1231 // Remove previous error messages, if any. 1195 1232 $( '.theme-info .update-message' ).remove(); … … 1253 1290 } ); 1254 1291 } 1255 1292 1256 wp.a11y.speak( wp. updates.l10n.deleted, 'polite' );1293 wp.a11y.speak( wp.i18n.__( 'Deleted!' ), 'polite' ); 1257 1294 1258 1295 $document.trigger( 'wp-theme-delete-success', response ); 1259 1296 }; … … 1274 1311 $button = $( '.theme-actions .delete-theme' ), 1275 1312 updateRow = wp.template( 'item-update-row' ), 1276 1313 $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 ), 1278 1316 $message = wp.updates.adminNotice( { 1279 1317 className: 'update-message notice-error notice-alt', 1280 1318 message: errorMessage … … 1566 1604 * 'update' or 'install'. 1567 1605 */ 1568 1606 wp.updates.isValidResponse = function( response, action ) { 1569 var error = wp. updates.l10n.unknownError,1607 var error = wp.i18n.__( 'An unknown error occurred' ), 1570 1608 errorMessage; 1571 1609 1572 1610 // Make sure the response is a valid data object and not a Promise object. … … 1575 1613 } 1576 1614 1577 1615 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.' ); 1579 1617 } else if ( _.isString( response ) ) { 1580 1618 error = response; 1581 1619 } 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.' ); 1583 1621 } else if ( _.isString( response.responseText ) && '' !== response.responseText ) { 1584 1622 error = response.responseText; 1585 1623 } else if ( _.isString( response.statusText ) ) { … … 1588 1626 1589 1627 switch ( action ) { 1590 1628 case 'update': 1591 errorMessage = wp.updates.l10n.updateFailed; 1629 /* translators: %s: Error string for a failed update */ 1630 errorMessage = wp.i18n.__( 'Update Failed: %s' ); 1592 1631 break; 1593 1632 1594 1633 case 'install': 1595 errorMessage = wp.updates.l10n.installFailed; 1634 /* translators: %s: Error string for a failed installation */ 1635 errorMessage = wp.i18n.__( 'Installation failed: %s' ); 1596 1636 break; 1597 1637 1598 1638 case 'delete': 1599 errorMessage = wp.updates.l10n.deleteFailed; 1639 /* translators: %s: Error string for a failed deletion */ 1640 errorMessage = wp.i18n.__( 'Deletion failed: %s' ); 1600 1641 break; 1601 1642 } 1602 1643 … … 1620 1661 .removeClass( 'updating-message' ) 1621 1662 .removeAttr( 'aria-label' ) 1622 1663 .prop( 'disabled', true ) 1623 .text( wp. updates.l10n.updateFailedShort);1664 .text( wp.i18n.__( 'Update Failed!' ) ); 1624 1665 1625 1666 $( '.updating-message:not(.button):not(.thickbox)' ) 1626 1667 .removeClass( 'updating-message notice-warning' ) … … 1644 1685 */ 1645 1686 wp.updates.beforeunload = function() { 1646 1687 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.' ); 1648 1689 } 1649 1690 }; 1650 1691 … … 1749 1790 1750 1791 if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { 1751 1792 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' ) ) ); 1753 1795 } 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' ) ) ); 1755 1798 } 1756 1799 } 1757 1800 } 1758 1801 1759 wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' ); 1802 /* translators: JavaScript accessible string */ 1803 wp.a11y.speak( wp.i18n.__( 'Update canceled.' ), 'polite' ); 1760 1804 } ); 1761 1805 1762 1806 /** … … 1832 1876 1833 1877 $message 1834 1878 .removeClass( 'updating-message' ) 1835 .text( wp. updates.l10n.installNow);1879 .text( wp.i18n.__( 'Install Now' ) ); 1836 1880 1837 wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' ); 1881 /* translators: JavaScript accessible string */ 1882 wp.a11y.speak( wp.i18n.__( 'Update canceled.' ), 'polite' ); 1838 1883 } ); 1839 1884 } 1840 1885 … … 1867 1912 1868 1913 $button 1869 1914 .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 ) ); 1872 1918 1873 wp.a11y.speak( wp.updates.l10n.updateCancel, 'polite' ); 1919 /* translators: JavaScript accessible string */ 1920 wp.a11y.speak( wp.i18n.__( 'Update canceled.' ), 'polite' ); 1874 1921 } ); 1875 1922 } 1876 1923 … … 1894 1941 1895 1942 event.preventDefault(); 1896 1943 1897 if ( ! window.confirm( wp.updates.l10n.aysDeleteUninstall.replace( '%s', $pluginRow.find( '.plugin-title strong' ).text() ) ) ) { 1944 /* translators: %s: Plugin name */ 1945 if ( ! window.confirm( wp.i18n.__( 'Are you sure you want to delete %s and its data?' ).replace( '%s', $pluginRow.find( '.plugin-title strong' ).text() ) ) ) { 1898 1946 return; 1899 1947 } 1900 1948 … … 1945 1993 1946 1994 event.preventDefault(); 1947 1995 1948 if ( ! window.confirm( wp.updates.l10n.aysDelete.replace( '%s', $themeRow.find( '.theme-title strong' ).text() ) ) ) { 1996 /* translators: %s: Theme name */ 1997 if ( ! window.confirm( wp.i18n.__( 'Are you sure you want to delete %s?' ).replace( '%s', $themeRow.find( '.theme-title strong' ).text() ) ) ) { 1949 1998 return; 1950 1999 } 1951 2000 … … 1971 2020 success = 0, 1972 2021 error = 0, 1973 2022 errorMessages = [], 1974 type, action ;2023 type, action, bulkDeleteMsg; 1975 2024 1976 2025 // Determine which type of item we're dealing with. 1977 2026 switch ( pagenow ) { … … 1996 2045 return wp.updates.addAdminNotice( { 1997 2046 id: 'no-items-selected', 1998 2047 className: 'notice-error is-dismissible', 1999 message: wp. updates.l10n.noItemsSelected2048 message: wp.i18n.__( 'Please select at least one item to perform this action on.' ) 2000 2049 } ); 2001 2050 } 2002 2051 … … 2007 2056 break; 2008 2057 2009 2058 case 'delete-selected': 2010 if ( ! window.confirm( 'plugin' === type ? wp.updates.l10n.aysBulkDelete : wp.updates.l10n.aysBulkDeleteThemes ) ) { 2059 bulkDeleteMsg = wp.i18n.__( 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?' ); 2060 2061 if ( 'plugin' === type ) { 2062 bulkDeleteMsg = wp.i18n.__( 'Are you sure you want to delete the selected plugins and their data?' ); 2063 } 2064 2065 if ( ! window.confirm( bulkDeleteMsg ) ) { 2011 2066 event.preventDefault(); 2012 2067 return; 2013 2068 } … … 2144 2199 .append( $( '<a />', { 2145 2200 'class': 'current', 2146 2201 'href': searchLocation, 2147 'text': wp. updates.l10n.searchResultsLabel2202 'text': wp.i18n.__( 'Search Results' ) 2148 2203 } ) ); 2149 2204 2150 2205 $( '.wp-filter .filter-links .current' ) … … 2167 2222 delete wp.updates.searchRequest; 2168 2223 2169 2224 if ( 0 === response.count ) { 2170 wp.a11y.speak( wp. updates.l10n.noPluginsFound);2225 wp.a11y.speak( wp.i18n.__( 'No plugins found. Try a different search.' ) ); 2171 2226 } else { 2172 wp.a11y.speak( wp. updates.l10n.pluginsFound.replace( '%d', response.count ) );2227 wp.a11y.speak( wp.i18n._n( '%d plugin found', '%d plugins found', response.count ) ); 2173 2228 } 2174 2229 } ); 2175 2230 }, 500 ) ); … … 2216 2271 wp.updates.searchRequest = wp.ajax.post( 'search-plugins', data ).done( function( response ) { 2217 2272 2218 2273 // Can we just ditch this whole subtitle business? 2219 var $subTitle = $( '<span />' ).addClass( 'subtitle' ).html( wp.updates.l10n.searchResults.replace( '%s', _.escape( data.s ) ) ), 2274 /* translators: %s: Search string */ 2275 var $subTitle = $( '<span />' ).addClass( 'subtitle' ).html( wp.i18n.__( 'Search results for “%s”' ).replace( '%s', _.escape( data.s ) ) ), 2220 2276 $oldSubTitle = $( '.wrap .subtitle' ); 2221 2277 2222 2278 if ( ! data.s.length ) { … … 2232 2288 delete wp.updates.searchRequest; 2233 2289 2234 2290 if ( 0 === response.count ) { 2235 wp.a11y.speak( wp. updates.l10n.noPluginsFound);2291 wp.a11y.speak( wp.i18n.__( 'No plugins found. Try a different search.' ) ); 2236 2292 } else { 2237 wp.a11y.speak( wp. updates.l10n.pluginsFound.replace( '%d', response.count ) );2293 wp.a11y.speak( wp.i18n._n( '%d plugin found', '%d plugins found', response.count ) ); 2238 2294 } 2239 2295 } ); 2240 2296 }, 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 */ 2 2 (function($) { 3 3 var updateLock = false, 4 4 … … 50 50 } 51 51 52 52 // 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' ) ); 54 54 } 55 55 56 56 function bindPass1() { … … 100 100 $toggleButton 101 101 .data( 'toggle', 0 ) 102 102 .attr({ 103 'aria-label': userProfileL10n.ariaHide103 'aria-label': wp.i18n.esc_attr__( 'Hide password' ) 104 104 }) 105 105 .find( '.text' ) 106 .text( userProfileL10n.hide)106 .text( wp.i18n.__( 'Hide' ) ) 107 107 .end() 108 108 .find( '.dashicons' ) 109 109 .removeClass( 'dashicons-visibility' ) … … 130 130 $toggleButton 131 131 .data( 'toggle', 1 ) 132 132 .attr({ 133 'aria-label': userProfileL10n.ariaShow133 'aria-label': wp.i18n.esc_attr__( 'Show password' ) 134 134 }) 135 135 .find( '.text' ) 136 .text( userProfileL10n.show)136 .text( wp.i18n.__( 'Show' ) ) 137 137 .end() 138 138 .find( '.dashicons' ) 139 139 .removeClass('dashicons-hidden') … … 290 290 291 291 switch ( strength ) { 292 292 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' ) ); 294 294 break; 295 295 case 2: 296 $('#pass-strength-result').addClass('bad').html( pwsL10n.bad);296 $('#pass-strength-result').addClass('bad').html( wp.i18n._x( 'Weak', 'password strength' ) ); 297 297 break; 298 298 case 3: 299 $('#pass-strength-result').addClass('good').html( pwsL10n.good);299 $('#pass-strength-result').addClass('good').html( wp.i18n._x( 'Medium', 'password strength' ) ); 300 300 break; 301 301 case 4: 302 $('#pass-strength-result').addClass('strong').html( pwsL10n.strong);302 $('#pass-strength-result').addClass('strong').html( wp.i18n._x( 'Strong', 'password strength' ) ); 303 303 break; 304 304 case 5: 305 $('#pass-strength-result').addClass('short').html( pwsL10n.mismatch);305 $('#pass-strength-result').addClass('short').html( wp.i18n._x( 'Mismatch', 'password mismatch' ) ); 306 306 break; 307 307 default: 308 $('#pass-strength-result').addClass('short').html( pwsL10n['short']);308 $('#pass-strength-result').addClass('short').html( wp.i18n._x( 'Very weak', 'password strength' ) ); 309 309 } 310 310 } 311 311 … … 448 448 /* Warn the user if password was generated but not saved */ 449 449 $( window ).on( 'beforeunload', function () { 450 450 if ( true === updateLock ) { 451 return userProfileL10n.warn;451 return wp.i18n.__( 'Your new password has not been saved.' ); 452 452 } 453 453 } ); 454 454 -
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
37 37 * @param {RegExp} settings.shortcodesRegExp Optional. Regular expression to find shortcodes. 38 38 * @param {Object} settings.l10n Optional. Localization object containing specific 39 39 * configuration for the current localization. 40 * @param {String} settings.l10n.type Optional. Method of finding words to count.41 40 * @param {Array} settings.l10n.shortcodes Optional. Array of shortcodes that should be removed 42 41 * from the text. 43 42 * … … 136 135 * \u2028 = line separator 137 136 * \u2029 = paragraph separator 138 137 */ 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 141 139 }; 142 140 143 141 /** … … 157 155 var count = 0; 158 156 159 157 // 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!' ); 161 165 162 166 // Sanitize type to one of three possibilities: 'words', 'characters_excluding_spaces' or 'characters_including_spaces'. 163 167 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 2347248..aa7f069 100644
wp_localize_script( 'theme', '_wpThemeSettings', array( 42 42 'installURI' => current_user_can( 'install_themes' ) ? self_admin_url( 'theme-install.php' ) : null, 43 43 'adminUrl' => parse_url( self_admin_url(), PHP_URL_PATH ) 44 44 ), 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’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 /* translators: hidden accessibility text */57 'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ),58 ),59 45 'installedThemes' => array_keys( $installed_themes ), 60 46 ) ); 61 47 -
src/wp-includes/class-wp-customize-manager.php
diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php index bb892b5..fe4ae6f 100644
final class WP_Customize_Manager { 835 835 'activeControls' => array(), 836 836 'settingValidities' => $exported_setting_validities, 837 837 'nonce' => $this->get_nonces(), 838 'l10n' => array(839 'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),840 ),841 838 '_dirty' => array_keys( $this->unsanitized_post_values() ), 842 839 ); 843 840 -
src/wp-includes/class-wp-customize-nav-menus.php
diff --git src/wp-includes/class-wp-customize-nav-menus.php src/wp-includes/class-wp-customize-nav-menus.php index f102cd8..84e4fbf 100644
final class WP_Customize_Nav_Menus { 366 366 'itemTypes' => $this->available_item_types(), 367 367 'l10n' => array( 368 368 'untitled' => _x( '(no label)', 'missing menu item navigation label' ), 369 'unnamed' => _x( '(unnamed)', 'Missing menu name.' ),370 'custom_label' => __( 'Custom Link' ),371 /* translators: %s: menu location */372 'menuLocation' => _x( '(Currently set to: %s)', 'menu' ),373 'menuNameLabel' => __( 'Menu Name' ),374 'itemAdded' => __( 'Menu item added' ),375 'itemDeleted' => __( 'Menu item deleted' ),376 'menuAdded' => __( 'Menu created' ),377 'menuDeleted' => __( 'Menu deleted' ),378 'movedUp' => __( 'Menu item moved up' ),379 'movedDown' => __( 'Menu item moved down' ),380 'movedLeft' => __( 'Menu item moved out of submenu' ),381 'movedRight' => __( 'Menu item is now a sub-item' ),382 369 /* translators: ▸ is the unicode right-pointing triangle, and %s is the section title in the Customizer */ 383 370 'customizingMenus' => sprintf( __( 'Customizing ▸ %s' ), esc_html( $this->manager->get_panel( 'nav_menus' )->title ) ), 384 /* translators: %s: title of menu item which is invalid */385 'invalidTitleTpl' => __( '%s (Invalid)' ),386 /* translators: %s: title of menu item in draft status */387 'pendingTitleTpl' => __( '%s (Pending)' ),388 'itemsFound' => __( 'Number of items found: %d' ),389 'itemsFoundMore' => __( 'Additional items found: %d' ),390 'itemsLoadingMore' => __( 'Loading more results... please wait.' ),391 'reorderModeOn' => __( 'Reorder mode enabled' ),392 'reorderModeOff' => __( 'Reorder mode closed' ),393 'reorderLabelOn' => esc_attr__( 'Reorder menu items' ),394 'reorderLabelOff' => esc_attr__( 'Close reorder mode' ),395 371 ), 396 372 'settingTransport' => 'postMessage', 397 373 'phpIntMax' => PHP_INT_MAX, -
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 2189067..8b00fa8 100644
final class WP_Customize_Widgets { 721 721 'registeredSidebars' => array_values( $wp_registered_sidebars ), 722 722 'registeredWidgets' => $wp_registered_widgets, 723 723 'availableWidgets' => $available_widgets, // @todo Merge this with registered_widgets 724 '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' ),735 'reorderLabelOn' => esc_attr__( 'Reorder widgets' ),736 'widgetsFound' => __( 'Number of widgets found: %d' ),737 'noWidgetsFound' => __( 'No widgets found.' ),738 ),739 724 'tpl' => array( 740 725 'widgetReorderNav' => $widget_reorder_nav_tpl, 741 726 'moveWidgetArea' => $move_widget_area_tpl, … … final class WP_Customize_Widgets { 1126 1111 'renderedWidgets' => array_fill_keys( array_keys( $this->rendered_widgets ), true ), 1127 1112 'registeredSidebars' => array_values( $wp_registered_sidebars ), 1128 1113 'registeredWidgets' => $wp_registered_widgets, 1129 'l10n' => array(1130 'widgetTooltip' => __( 'Shift-click to edit this widget.' ),1131 ),1132 1114 'selectiveRefreshableWidgets' => $this->get_selective_refreshable_widgets(), 1133 1115 ); 1134 1116 foreach ( $settings['registeredWidgets'] as &$registered_widget ) { -
src/wp-includes/customize/class-wp-customize-selective-refresh.php
diff --git src/wp-includes/customize/class-wp-customize-selective-refresh.php src/wp-includes/customize/class-wp-customize-selective-refresh.php index 95c1934..3bfb924 100644
final class WP_Customize_Selective_Refresh { 182 182 $exports = array( 183 183 'partials' => $partials, 184 184 'renderQueryVar' => self::RENDER_QUERY_VAR, 185 'l10n' => array(186 'shiftClickToEdit' => __( 'Shift-click to edit this element.' ),187 /* translators: %s: document.write() */188 'badDocumentWrite' => sprintf( __( '%s is forbidden' ), 'document.write()' ),189 ),190 185 ); 191 186 192 187 // Export data to JS. -
src/wp-includes/js/customize-loader.js
diff --git src/wp-includes/js/customize-loader.js src/wp-includes/js/customize-loader.js index 85ad745..764c603 100644
window.wp = window.wp || {}; 89 89 90 90 beforeunload: function () { 91 91 if ( ! Loader.saved() ) { 92 return Loader.settings.l10n.saveAlert;92 return wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' ); 93 93 } 94 94 }, 95 95 … … window.wp = window.wp || {}; 122 122 */ 123 123 this.saved = new api.Value( true ); 124 124 125 this.iframe = $( '<iframe />', { 'src': src, 'title': Loader.settings.l10n.mainIframeTitle} ).appendTo( this.element );125 this.iframe = $( '<iframe />', { 'src': src, 'title': wp.i18n.__( 'Customizer' ) } ).appendTo( this.element ); 126 126 this.iframe.one( 'load', this.loaded ); 127 127 128 128 // Create a postMessage connection with the iframe. … … window.wp = window.wp || {}; 195 195 } 196 196 197 197 // Display AYS dialog if Customizer is dirty 198 if ( ! this.saved() && ! confirm( Loader.settings.l10n.saveAlert) ) {198 if ( ! this.saved() && ! confirm( wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' ) ) ) { 199 199 // Go forward since Customizer is exited by history.back() 200 200 history.forward(); 201 201 return; -
src/wp-includes/js/customize-preview-widgets.js
diff --git src/wp-includes/js/customize-preview-widgets.js src/wp-includes/js/customize-preview-widgets.js index 5adaf05..ebdbc5a 100644
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( 10 10 registeredWidgets: {}, 11 11 widgetSelectors: [], 12 12 preview: null, 13 l10n: { 14 widgetTooltip: '' 15 }, 13 16 14 selectiveRefreshableWidgets: {} 17 15 }; 18 16 … … wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( 572 570 var self = this, 573 571 selector = this.widgetSelectors.join( ',' ); 574 572 575 $( selector ).attr( 'title', this.l10n.widgetTooltip);573 $( selector ).attr( 'title', wp.i18n.__( 'Shift-click to edit this widget.' ) ); 576 574 577 575 $( document ).on( 'mouseenter', selector, function() { 578 576 self.preview.send( 'highlight-widget-control', $( this ).prop( 'id' ) ); -
src/wp-includes/js/customize-selective-refresh.js
diff --git src/wp-includes/js/customize-selective-refresh.js src/wp-includes/js/customize-selective-refresh.js index 6bab103..ab20764 100644
wp.customize.selectiveRefresh = ( function( $, api ) { 84 84 ready: function() { 85 85 var partial = this; 86 86 _.each( _.pluck( partial.placements(), 'container' ), function( container ) { 87 $( container ).attr( 'title', self.data.l10n.shiftClickToEdit);87 $( container ).attr( 'title', wp.i18n.__( 'Shift-click to edit this element.' ) ); 88 88 } ); 89 89 $( document ).on( 'click', partial.params.selector, function( e ) { 90 90 if ( ! e.shiftKey ) { … … wp.customize.selectiveRefresh = ( function( $, api ) { 275 275 /* jshint ignore:start */ 276 276 self.orginalDocumentWrite = document.write; 277 277 document.write = function() { 278 throw new Error( self.data.l10n.badDocumentWrite ); 278 /* translators: %s: document.write() */ 279 throw new Error( wp.i18n.__( '%s is forbidden' ).relace( '%s', 'document.write()' ) ); 279 280 }; 280 281 /* jshint ignore:end */ 281 282 try { … … wp.customize.selectiveRefresh = ( function( $, api ) { 299 300 placement.removedNodes = placement.container; 300 301 placement.container = newContainerElement; 301 302 placement.removedNodes.replaceWith( placement.container ); 302 placement.container.attr( 'title', self.data.l10n.shiftClickToEdit);303 placement.container.attr( 'title', wp.i18n.__( 'Shift-click to edit this element.' ) ); 303 304 } else { 304 305 placement.removedNodes = document.createDocumentFragment(); 305 306 while ( placement.container[0].firstChild ) { -
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..f9e2ce1 100644
1 1 (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){ 2 2 var media = wp.media, 3 baseSettings = window._wpmejsSettings || {}, 4 l10n = window._wpMediaViewsL10n || {}; 3 baseSettings = window._wpmejsSettings || {}; 5 4 6 5 /** 7 6 * @mixin … … wp.media.mixin = { 79 78 */ 80 79 wp.media.playlist = new wp.media.collection({ 81 80 tag: 'playlist', 82 editTitle : l10n.editPlaylistTitle,81 editTitle : wp.i18n.__( 'Edit Audio Playlist' ), 83 82 defaults : { 84 83 id: wp.media.view.settings.post.id, 85 84 style: 'light', … … media.view.VideoDetails = require( './views/video-details.js' ); 226 225 * @augments Backbone.Model 227 226 */ 228 227 var State = wp.media.controller.State, 229 l10n = wp.media.view.l10n,230 228 AudioDetails; 231 229 232 230 AudioDetails = State.extend({ 233 231 defaults: { 234 232 id: 'audio-details', 235 233 toolbar: 'audio-details', 236 title: l10n.audioDetailsTitle,234 title: wp.i18n.__( 'Audio Details' ), 237 235 content: 'audio-details', 238 236 menu: 'audio-details', 239 237 router: false, … … module.exports = AudioDetails; 259 257 * @augments Backbone.Model 260 258 */ 261 259 var State = wp.media.controller.State, 262 l10n = wp.media.view.l10n,263 260 VideoDetails; 264 261 265 262 VideoDetails = State.extend({ 266 263 defaults: { 267 264 id: 'video-details', 268 265 toolbar: 'video-details', 269 title: l10n.videoDetailsTitle,266 title: wp.i18n.__( 'Video Details' ), 270 267 content: 'video-details', 271 268 menu: 'video-details', 272 269 router: false, … … AudioDetails = MediaDetails.extend({ 389 386 content: 'audio-details', 390 387 toolbar: 'audio-details', 391 388 type: 'link', 392 title: l10n.audioDetailsTitle,389 title: wp.i18n.__( 'Audio Details' ), 393 390 priority: 120 394 391 }, 395 392 396 393 initialize: function( options ) { 397 394 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' ); 400 397 401 398 MediaDetails.prototype.initialize.call( this, options ); 402 399 }, … … AudioDetails = MediaDetails.extend({ 417 414 new MediaLibrary( { 418 415 type: 'audio', 419 416 id: 'replace-audio', 420 title: l10n.audioReplaceTitle,417 title: wp.i18n.__( 'Replace Audio' ), 421 418 toolbar: 'replace-audio', 422 419 media: this.media, 423 420 menu: 'audio-details' … … AudioDetails = MediaDetails.extend({ 426 423 new MediaLibrary( { 427 424 type: 'audio', 428 425 id: 'add-audio-source', 429 title: l10n.audioAddSourceTitle,426 title: wp.i18n.__( 'Add Audio Source' ), 430 427 toolbar: 'add-audio-source', 431 428 media: this.media, 432 429 menu: false … … MediaDetails = Select.extend({ 542 539 }, 543 540 544 541 renderDetailsToolbar: function() { 545 this.setPrimaryButton( l10n.update, function( controller, state ) {542 this.setPrimaryButton( wp.i18n.__( 'Update' ), function( controller, state ) { 546 543 controller.close(); 547 544 state.trigger( 'update', controller.media.toJSON() ); 548 545 } ); 549 546 }, 550 547 551 548 renderReplaceToolbar: function() { 552 this.setPrimaryButton( l10n.replace, function( controller, state ) {549 this.setPrimaryButton( wp.i18n.__( 'Replace' ), function( controller, state ) { 553 550 var attachment = state.get( 'selection' ).single(); 554 551 controller.media.changeAttachment( attachment ); 555 552 state.trigger( 'replace', controller.media.toJSON() ); … … VideoDetails = MediaDetails.extend({ 594 591 content: 'video-details', 595 592 toolbar: 'video-details', 596 593 type: 'link', 597 title: l10n.videoDetailsTitle,594 title: wp.i18n.__( 'Video Details' ), 598 595 priority: 120 599 596 }, 600 597 601 598 initialize: function( options ) { 602 599 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' ); 605 602 606 603 MediaDetails.prototype.initialize.call( this, options ); 607 604 }, … … VideoDetails = MediaDetails.extend({ 624 621 new MediaLibrary( { 625 622 type: 'video', 626 623 id: 'replace-video', 627 title: l10n.videoReplaceTitle,624 title: wp.i18n.__( 'Replace Video' ), 628 625 toolbar: 'replace-video', 629 626 media: this.media, 630 627 menu: 'video-details' … … VideoDetails = MediaDetails.extend({ 633 630 new MediaLibrary( { 634 631 type: 'video', 635 632 id: 'add-video-source', 636 title: l10n.videoAddSourceTitle,633 title: wp.i18n.__( 'Add Video Source' ), 637 634 toolbar: 'add-video-source', 638 635 media: this.media, 639 636 menu: false … … VideoDetails = MediaDetails.extend({ 642 639 new MediaLibrary( { 643 640 type: 'image', 644 641 id: 'select-poster-image', 645 title: l10n.videoSelectPosterImageTitle,642 title: wp.i18n.__( 'Select Poster Image' ), 646 643 toolbar: 'select-poster-image', 647 644 media: this.media, 648 645 menu: 'video-details' … … VideoDetails = MediaDetails.extend({ 651 648 new MediaLibrary( { 652 649 type: 'text', 653 650 id: 'add-track', 654 title: l10n.videoAddTrackTitle,651 title: wp.i18n.__( 'Add Subtitles' ), 655 652 toolbar: 'add-track', 656 653 media: this.media, 657 654 menu: 'video-details' … … VideoDetails = MediaDetails.extend({ 660 657 }, 661 658 662 659 renderSelectPosterImageToolbar: function() { 663 this.setPrimaryButton( l10n.videoSelectPosterImageTitle, function( controller, state ) {660 this.setPrimaryButton( wp.i18n.__( 'Select Poster Image' ), function( controller, state ) { 664 661 var urls = [], attachment = state.get( 'selection' ).single(); 665 662 666 663 controller.media.set( 'poster', attachment.get( 'url' ) ); … … VideoDetails = MediaDetails.extend({ 682 679 }, 683 680 684 681 renderAddTrackToolbar: function() { 685 this.setPrimaryButton( l10n.videoAddTrackTitle, function( controller, state ) {682 this.setPrimaryButton( wp.i18n.__( 'Add Subtitles' ), function( controller, state ) { 686 683 var attachment = state.get( 'selection' ).single(), 687 684 content = controller.media.get( 'content' ); 688 685 -
src/wp-includes/js/media-editor.js
diff --git src/wp-includes/js/media-editor.js src/wp-includes/js/media-editor.js index e972f6b..e505c96 100644
509 509 * 510 510 * @global wp.shortcode 511 511 * @global wp.media.model.Selection 512 * @global wp.media.view.l10n513 512 * 514 513 * @param {string} content Content that is searched for possible 515 514 * shortcode markup matching the passed tag name, … … 613 612 wp.media.gallery = new wp.media.collection({ 614 613 tag: 'gallery', 615 614 type : 'image', 616 editTitle : wp. media.view.l10n.editGalleryTitle,615 editTitle : wp.i18n.__( 'Edit Gallery' ), 617 616 defaults : wp.media.galleryDefaults, 618 617 619 618 setDefaults: function( attrs ) { … … 663 662 _wpnonce: settings.post.nonce 664 663 }).done( function( html ) { 665 664 if ( html == '0' ) { 666 window.alert( w indow.setPostThumbnailL10n.error);665 window.alert( wp.i18n.__( 'Could not set that as the thumbnail image. Try a different attachment.' ) ); 667 666 return; 668 667 } 669 668 $( '.inside', '#postimagediv' ).html( html ); … … 824 823 * Setup 'workflow' and add to the 'workflows' cache. 'open' can 825 824 * subsequently be called upon it. 826 825 * 827 * @global wp.media.view.l10n828 *829 826 * @param {string} id A slug used to identify the workflow. 830 827 * @param {Object} [options={}] 831 828 * … … 844 841 workflow = workflows[ id ] = wp.media( _.defaults( options || {}, { 845 842 frame: 'post', 846 843 state: 'insert', 847 title: wp. media.view.l10n.addMedia,844 title: wp.i18n.__( 'Add Media' ), 848 845 multiple: true 849 846 } ) ); 850 847 … … 1093 1090 }, 1094 1091 1095 1092 /** 1096 * Bind click event for .insert-media using event delegation 1097 * 1098 * @global wp.media.view.l10n 1093 * Bind click event for .insert-media using event delegation. 1099 1094 */ 1100 1095 init: function() { 1101 1096 $(document.body) … … 1105 1100 options = { 1106 1101 frame: 'post', 1107 1102 state: 'insert', 1108 title: wp. media.view.l10n.addMedia,1103 title: wp.i18n.__( 'Add Media' ), 1109 1104 multiple: true 1110 1105 }; 1111 1106 … … 1113 1108 1114 1109 if ( elem.hasClass( 'gallery' ) ) { 1115 1110 options.state = 'gallery'; 1116 options.title = wp. media.view.l10n.createGalleryTitle;1111 options.title = wp.i18n.__( 'Create Gallery' ); 1117 1112 } 1118 1113 1119 1114 wp.media.editor.open( editor, options ); -
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
8 8 * @augments wp.media.controller.State 9 9 * @augments Backbone.Model 10 10 */ 11 var l10n = wp.media.view.l10n, 12 EditAttachmentMetadata; 13 14 EditAttachmentMetadata = wp.media.controller.State.extend({ 11 var EditAttachmentMetadata = wp.media.controller.State.extend({ 15 12 defaults: { 16 13 id: 'edit-attachment', 17 14 // Title string passed to the frame's title region view. 18 title: l10n.attachmentDetails,15 title: wp.i18n.__( 'Attachment Details' ), 19 16 // Region mode defaults. 20 17 content: 'edit-metadata', 21 18 menu: false, … … module.exports = DeleteSelectedPermanently; 190 187 * @augments Backbone.View 191 188 */ 192 189 var Button = wp.media.view.Button, 193 l10n = wp.media.view.l10n,194 190 DeleteSelected; 195 191 196 192 DeleteSelected = Button.extend({ … … DeleteSelected = Button.extend({ 204 200 205 201 filterChange: function( model ) { 206 202 if ( 'trash' === model.get( 'status' ) ) { 207 this.model.set( 'text', l10n.untrashSelected);203 this.model.set( 'text', wp.i18n.__( 'Untrash Selected' ) ); 208 204 } else if ( wp.media.view.settings.mediaTrash ) { 209 this.model.set( 'text', l10n.trashSelected);205 this.model.set( 'text', wp.i18n.__( 'Trash Selected' ) ); 210 206 } else { 211 this.model.set( 'text', l10n.deleteSelected);207 this.model.set( 'text', wp.i18n.__( 'Delete Selected' ) ); 212 208 } 213 209 }, 214 210 … … module.exports = DeleteSelected; 241 237 * @augments Backbone.View 242 238 */ 243 239 var Button = wp.media.view.Button, 244 l10n = wp.media.view.l10n,245 240 SelectModeToggle; 246 241 247 242 SelectModeToggle = Button.extend({ … … SelectModeToggle = Button.extend({ 283 278 if ( this.controller.isModeActive( 'select' ) ) { 284 279 this.model.set( { 285 280 size: 'large', 286 text: l10n.cancelSelection281 text: wp.i18n.__( 'Cancel Selection' ) 287 282 } ); 288 283 children.not( '.spinner, .media-button' ).hide(); 289 284 this.$el.show(); … … SelectModeToggle = Button.extend({ 291 286 } else { 292 287 this.model.set( { 293 288 size: '', 294 text: l10n.bulkSelect289 text: wp.i18n.__( 'Bulk Select' ) 295 290 } ); 296 291 this.controller.content.get().$el.removeClass( 'fixed' ); 297 292 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 91a8e48..ee5d8a7 100644
module.exports = CollectionAdd; 136 136 * @param {string} attributes.collectionType The collection type. (e.g. 'playlist'). 137 137 */ 138 138 var Library = wp.media.controller.Library, 139 l10n = wp.media.view.l10n,140 139 $ = jQuery, 141 140 CollectionEdit; 142 141 … … CollectionEdit = Library.extend({ 249 248 250 249 // Add the 'Reverse order' button to the toolbar. 251 250 attachmentsBrowserView.toolbar.set( 'reverse', { 252 text: l10n.reverseOrder,251 text: wp.i18n.__( 'Reverse order' ), 253 252 priority: 80, 254 253 255 254 click: function() { … … module.exports = CollectionEdit; 271 270 * @augments wp.media.controller.State 272 271 * @augments Backbone.Model 273 272 */ 274 var l10n = wp.media.view.l10n, 275 Cropper; 276 277 Cropper = wp.media.controller.State.extend({ 273 var Cropper = wp.media.controller.State.extend({ 278 274 defaults: { 279 275 id: 'cropper', 280 title: l10n.cropImage,276 title: wp.i18n.__( 'Crop Image' ), 281 277 // Region mode defaults. 282 278 toolbar: 'crop', 283 279 content: 'crop', … … Cropper = wp.media.controller.State.extend({ 323 319 items: { 324 320 insert: { 325 321 style: 'primary', 326 text: l10n.cropImage,322 text: wp.i18n.__( 'Crop Image' ), 327 323 priority: 80, 328 324 requires: { library: false, selection: false }, 329 325 … … Cropper = wp.media.controller.State.extend({ 334 330 selection = controller.state().get('selection').first(); 335 331 selection.set({cropDetails: controller.state().imgSelect.getSelection()}); 336 332 337 this.$el.text( l10n.cropping);333 this.$el.text( wp.i18n.__( 'Cropping…' ) ); 338 334 this.$el.attr('disabled', true); 339 335 340 336 controller.state().doCrop( selection ).done( function( croppedImage ) { … … Cropper = wp.media.controller.State.extend({ 352 348 _.extend( toolbarOptions.items, { 353 349 skip: { 354 350 style: 'secondary', 355 text: l10n.skipCropping,351 text: wp.i18n.__( 'Skip Cropping' ), 356 352 priority: 70, 357 353 requires: { library: false, selection: false }, 358 354 click: function() { … … module.exports = CustomizeImageCropper; 445 441 * @param {string} [attributes.menu=false] Initial mode for the menu region. 446 442 * @param {string} [attributes.url] Unused. @todo Consider removal. 447 443 */ 448 var l10n = wp.media.view.l10n, 449 EditImage; 450 451 EditImage = wp.media.controller.State.extend({ 444 var EditImage = wp.media.controller.State.extend({ 452 445 defaults: { 453 446 id: 'edit-image', 454 title: l10n.editImage,447 title: wp.i18n.__( 'Edit Image' ), 455 448 menu: false, 456 449 toolbar: 'edit-image', 457 450 content: 'edit-image', … … EditImage = wp.media.controller.State.extend({ 485 478 items: { 486 479 back: { 487 480 style: 'primary', 488 text: l10n.back,481 text: wp.i18n.__( 'Back' ), 489 482 priority: 20, 490 483 click: function() { 491 484 if ( previous ) { … … module.exports = EditImage; 524 517 * @param {string} [attributes.url] The embed URL. 525 518 * @param {object} [attributes.metadata={}] Properties of the embed, which will override attributes.url if set. 526 519 */ 527 var l10n = wp.media.view.l10n, 528 $ = Backbone.$, 520 var $ = Backbone.$, 529 521 Embed; 530 522 531 523 Embed = wp.media.controller.State.extend({ 532 524 defaults: { 533 525 id: 'embed', 534 title: l10n.insertFromUrlTitle,526 title: wp.i18n.__( 'Insert from URL' ), 535 527 content: 'embed', 536 528 menu: 'default', 537 529 toolbar: 'main-embed', … … module.exports = FeaturedImage; 794 786 */ 795 787 var Selection = wp.media.model.Selection, 796 788 Library = wp.media.controller.Library, 797 l10n = wp.media.view.l10n,798 789 GalleryAdd; 799 790 800 791 GalleryAdd = Library.extend({ 801 792 defaults: _.defaults({ 802 793 id: 'gallery-library', 803 title: l10n.addToGalleryTitle,794 title: wp.i18n.__( 'Add to Gallery' ), 804 795 multiple: 'add', 805 796 filterable: 'uploaded', 806 797 menu: 'gallery', … … module.exports = GalleryAdd; 885 876 * If none supplied, defaults to wp.media.view.Attachment.EditLibrary. 886 877 */ 887 878 var Library = wp.media.controller.Library, 888 l10n = wp.media.view.l10n,889 879 GalleryEdit; 890 880 891 881 GalleryEdit = Library.extend({ 892 882 defaults: { 893 883 id: 'gallery-edit', 894 title: l10n.editGalleryTitle,884 title: wp.i18n.__( 'Edit Gallery' ), 895 885 multiple: false, 896 886 searchable: false, 897 887 sortable: true, … … GalleryEdit = Library.extend({ 981 971 }); 982 972 983 973 browser.toolbar.set( 'reverse', { 984 text: l10n.reverseOrder,974 text: wp.i18n.__( 'Reverse order' ), 985 975 priority: 80, 986 976 987 977 click: function() { … … module.exports = GalleryEdit; 1020 1010 */ 1021 1011 var State = wp.media.controller.State, 1022 1012 Library = wp.media.controller.Library, 1023 l10n = wp.media.view.l10n,1024 1013 ImageDetails; 1025 1014 1026 1015 ImageDetails = State.extend({ 1027 1016 defaults: _.defaults({ 1028 1017 id: 'image-details', 1029 title: l10n.imageDetailsTitle,1018 title: wp.i18n.__( 'Image Details' ), 1030 1019 content: 'image-details', 1031 1020 menu: false, 1032 1021 router: false, … … module.exports = ImageDetails; 1090 1079 * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user. 1091 1080 * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. 1092 1081 */ 1093 var l10n = wp.media.view.l10n, 1094 getUserSetting = window.getUserSetting, 1082 var getUserSetting = window.getUserSetting, 1095 1083 setUserSetting = window.setUserSetting, 1096 1084 Library; 1097 1085 1098 1086 Library = wp.media.controller.State.extend({ 1099 1087 defaults: { 1100 1088 id: 'library', 1101 title: l10n.mediaLibraryTitle,1089 title: wp.i18n.__( 'Media Library' ), 1102 1090 multiple: false, 1103 1091 content: 'upload', 1104 1092 menu: 'default', … … module.exports = Region; 1610 1598 * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. 1611 1599 */ 1612 1600 var Library = wp.media.controller.Library, 1613 l10n = wp.media.view.l10n,1614 1601 ReplaceImage; 1615 1602 1616 1603 ReplaceImage = Library.extend({ 1617 1604 defaults: _.defaults({ 1618 1605 id: 'replace-image', 1619 title: l10n.replaceImageTitle,1606 title: wp.i18n.__( 'Replace Image' ), 1620 1607 multiple: false, 1621 1608 filterable: 'uploaded', 1622 1609 toolbar: 'replace', … … All = wp.media.view.AttachmentFilters.extend({ 2509 2496 }); 2510 2497 2511 2498 filters.all = { 2512 text: l10n.allMediaItems,2499 text: wp.i18n.__( 'All media items' ), 2513 2500 props: { 2514 2501 status: null, 2515 2502 type: null, … … All = wp.media.view.AttachmentFilters.extend({ 2535 2522 } 2536 2523 2537 2524 filters.unattached = { 2538 text: l10n.unattached,2525 text: wp.i18n.__( 'Unattached' ), 2539 2526 props: { 2540 2527 status: null, 2541 2528 uploadedTo: 0, … … All = wp.media.view.AttachmentFilters.extend({ 2550 2537 this.controller.isModeActive( 'grid' ) ) { 2551 2538 2552 2539 filters.trash = { 2553 text: l10n.trash,2540 text: wp.i18n._x( 'Trash', 'noun' ), 2554 2541 props: { 2555 2542 uploadedTo: null, 2556 2543 status: 'trash', … … module.exports = All; 2578 2565 * @augments wp.Backbone.View 2579 2566 * @augments Backbone.View 2580 2567 */ 2581 var l10n = wp.media.view.l10n, 2582 DateFilter; 2583 2584 DateFilter = wp.media.view.AttachmentFilters.extend({ 2568 var DateFilter = wp.media.view.AttachmentFilters.extend({ 2585 2569 id: 'media-attachment-date-filters', 2586 2570 2587 2571 createFilters: function() { … … DateFilter = wp.media.view.AttachmentFilters.extend({ 2596 2580 }; 2597 2581 }); 2598 2582 filters.all = { 2599 text: l10n.allDates,2583 text: wp.i18n.__( 'All dates' ), 2600 2584 props: { 2601 2585 monthnum: false, 2602 2586 year: false … … Uploaded = wp.media.view.AttachmentFilters.extend({ 2634 2618 2635 2619 this.filters = { 2636 2620 all: { 2637 text: text || l10n.allMediaItems,2621 text: text || wp.i18n.__( 'All media items' ), 2638 2622 props: { 2639 2623 uploadedTo: null, 2640 2624 orderby: 'date', … … Uploaded = wp.media.view.AttachmentFilters.extend({ 2654 2638 }, 2655 2639 2656 2640 unattached: { 2657 text: l10n.unattached,2641 text: wp.i18n.__( 'Unattached' ), 2658 2642 props: { 2659 2643 uploadedTo: 0, 2660 2644 orderby: 'menuOrder', … … module.exports = Attachment; 3225 3209 * @augments Backbone.View 3226 3210 */ 3227 3211 var Attachment = wp.media.view.Attachment, 3228 l10n = wp.media.view.l10n,3229 3212 Details; 3230 3213 3231 3214 Details = Attachment.extend({ … … Details = Attachment.extend({ 3280 3263 deleteAttachment: function( event ) { 3281 3264 event.preventDefault(); 3282 3265 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." ) ) ) { 3284 3267 this.model.destroy(); 3285 3268 // Keep focus inside media modal 3286 3269 // after image is deleted … … module.exports = Attachments; 3751 3734 */ 3752 3735 var View = wp.media.View, 3753 3736 mediaTrash = wp.media.view.settings.mediaTrash, 3754 l10n = wp.media.view.l10n,3755 3737 $ = jQuery, 3756 3738 AttachmentsBrowser; 3757 3739 … … AttachmentsBrowser = View.extend({ 3829 3811 // "Filters" will return a <select>, need to render 3830 3812 // screen reader text before 3831 3813 this.toolbar.set( 'filtersLabel', new wp.media.view.Label({ 3832 value: l10n.filterByType,3814 value: wp.i18n.__( 'Filter by type' ), 3833 3815 attributes: { 3834 3816 'for': 'media-attachment-filters' 3835 3817 }, … … AttachmentsBrowser = View.extend({ 3869 3851 3870 3852 // DateFilter is a <select>, screen reader text needs to be rendered before 3871 3853 this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({ 3872 value: l10n.filterByDate,3854 value: wp.i18n.__( 'Filter by date' ), 3873 3855 attributes: { 3874 3856 'for': 'media-attachment-date-filters' 3875 3857 }, … … AttachmentsBrowser = View.extend({ 3883 3865 3884 3866 // BulkSelection is a <div> with subviews, including screen reader text 3885 3867 this.toolbar.set( 'selectModeToggleButton', new wp.media.view.SelectModeToggleButton({ 3886 text: l10n.bulkSelect,3868 text: wp.i18n.__( 'Bulk Select' ), 3887 3869 controller: this.controller, 3888 3870 priority: -70 3889 3871 }).render() ); … … AttachmentsBrowser = View.extend({ 3892 3874 filters: Filters, 3893 3875 style: 'primary', 3894 3876 disabled: true, 3895 text: mediaTrash ? l10n.trashSelected : l10n.deleteSelected,3877 text: mediaTrash ? wp.i18n.__( 'Trash Selected' ) : wp.i18n.__( 'Delete Selected' ), 3896 3878 controller: this.controller, 3897 3879 priority: -60, 3898 3880 click: function() { … … AttachmentsBrowser = View.extend({ 3904 3886 return; 3905 3887 } 3906 3888 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." ) ) ) { 3908 3890 return; 3909 3891 } 3910 3892 3911 3893 if ( mediaTrash && 3912 3894 '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." ) ) ) { 3914 3896 3915 3897 return; 3916 3898 } … … AttachmentsBrowser = View.extend({ 3952 3934 filters: Filters, 3953 3935 style: 'primary', 3954 3936 disabled: true, 3955 text: l10n.deleteSelected,3937 text: wp.i18n.__( 'Delete Selected' ), 3956 3938 controller: this.controller, 3957 3939 priority: -55, 3958 3940 click: function() { 3959 3941 var removed = [], selection = this.controller.state().get( 'selection' ); 3960 3942 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." ) ) ) { 3962 3944 return; 3963 3945 } 3964 3946 … … AttachmentsBrowser = View.extend({ 3980 3962 } else if ( this.options.date ) { 3981 3963 // DateFilter is a <select>, screen reader text needs to be rendered before 3982 3964 this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({ 3983 value: l10n.filterByDate,3965 value: wp.i18n.__( 'Filter by date' ), 3984 3966 attributes: { 3985 3967 'for': 'media-attachment-date-filters' 3986 3968 }, … … AttachmentsBrowser = View.extend({ 3996 3978 if ( this.options.search ) { 3997 3979 // Search is an input, screen reader text needs to be rendered before 3998 3980 this.toolbar.set( 'searchLabel', new wp.media.view.Label({ 3999 value: l10n.searchMediaLabel,3981 value: wp.i18n.__( 'Search Media' ), 4000 3982 attributes: { 4001 3983 'for': 'media-search-input' 4002 3984 }, … … AttachmentsBrowser = View.extend({ 4011 3993 4012 3994 if ( this.options.dragInfo ) { 4013 3995 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], 4015 3997 priority: -40 4016 3998 }) ); 4017 3999 } 4018 4000 4019 4001 if ( this.options.suggestedWidth && this.options.suggestedHeight ) { 4020 4002 this.toolbar.set( 'suggestedDimensions', new View({ 4021 el: $( '<div class="instructions">' + l10n.suggestedDimensions+ ' ' + this.options.suggestedWidth + ' × ' + this.options.suggestedHeight + '</div>' )[0],4003 el: $( '<div class="instructions">' + wp.i18n.__( 'Suggested image dimensions:' ) + ' ' + this.options.suggestedWidth + ' × ' + this.options.suggestedHeight + '</div>' )[0], 4022 4004 priority: -40 4023 4005 }) ); 4024 4006 } … … AttachmentsBrowser = View.extend({ 4054 4036 this.uploader = new wp.media.view.UploaderInline({ 4055 4037 controller: this.controller, 4056 4038 status: false, 4057 message: this.controller.isModeActive( 'grid' ) ? '' : l10n.noItemsFound,4039 message: this.controller.isModeActive( 'grid' ) ? '' : wp.i18n.__( 'No items found.' ), 4058 4040 canClose: this.controller.isModeActive( 'grid' ) 4059 4041 }); 4060 4042 … … AttachmentsBrowser = View.extend({ 4098 4080 }); 4099 4081 4100 4082 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.' ) ); 4102 4084 4103 4085 this.views.add( this.attachmentsNoResults ); 4104 4086 } … … module.exports = Button; 4351 4333 */ 4352 4334 var View = wp.media.View, 4353 4335 UploaderStatus = wp.media.view.UploaderStatus, 4354 l10n = wp.media.view.l10n,4355 4336 $ = jQuery, 4356 4337 Cropper; 4357 4338 … … Cropper = View.extend({ 4375 4356 }, 4376 4357 prepare: function() { 4377 4358 return { 4378 title: l10n.cropYourImage,4359 title: wp.i18n.__( 'Crop your image' ), 4379 4360 url: this.options.attachment.get('url') 4380 4361 }; 4381 4362 }, … … Cropper = View.extend({ 4394 4375 4395 4376 this.views.add( '.upload-errors', new wp.media.view.UploaderStatusError({ 4396 4377 filename: UploaderStatus.prototype.filename(filename), 4397 message: w indow._wpMediaViewsL10n.cropError4378 message: wp.i18n.__( 'There has been an error cropping your image.' ) 4398 4379 }), { at: 0 }); 4399 4380 } 4400 4381 }); … … module.exports = Frame; 4951 4932 * @mixes wp.media.controller.StateMachine 4952 4933 */ 4953 4934 var Select = wp.media.view.MediaFrame.Select, 4954 l10n = wp.media.view.l10n,4955 4935 ImageDetails; 4956 4936 4957 4937 ImageDetails = Select.extend({ … … ImageDetails = Select.extend({ 4962 4942 content: 'image-details', 4963 4943 toolbar: 'image-details', 4964 4944 type: 'link', 4965 title: l10n.imageDetailsTitle,4945 title: wp.i18n.__( 'Image Details' ), 4966 4946 priority: 120 4967 4947 }, 4968 4948 … … ImageDetails = Select.extend({ 4993 4973 library: wp.media.query( { type: 'image' } ), 4994 4974 image: this.image, 4995 4975 multiple: false, 4996 title: l10n.imageReplaceTitle,4976 title: wp.i18n.__( 'Replace Image' ), 4997 4977 toolbar: 'replace', 4998 4978 priority: 80, 4999 4979 displaySettings: true … … ImageDetails = Select.extend({ 5037 5017 items: { 5038 5018 select: { 5039 5019 style: 'primary', 5040 text: l10n.update,5020 text: wp.i18n.__( 'Update' ), 5041 5021 priority: 80, 5042 5022 5043 5023 click: function() { … … ImageDetails = Select.extend({ 5068 5048 controller: this, 5069 5049 items: { 5070 5050 back: { 5071 text: l10n.back,5051 text: wp.i18n.__( 'Back' ), 5072 5052 priority: 20, 5073 5053 click: function() { 5074 5054 if ( previous ) { … … ImageDetails = Select.extend({ 5081 5061 5082 5062 replace: { 5083 5063 style: 'primary', 5084 text: l10n.replace,5064 text: wp.i18n.__( 'Replace' ), 5085 5065 priority: 80, 5086 5066 5087 5067 click: function() { … … Post = Select.extend({ 5167 5147 // Main states. 5168 5148 new Library({ 5169 5149 id: 'insert', 5170 title: l10n.insertMediaTitle,5150 title: wp.i18n.__( 'Insert Media' ), 5171 5151 priority: 20, 5172 5152 toolbar: 'main-insert', 5173 5153 filterable: 'all', … … Post = Select.extend({ 5188 5168 5189 5169 new Library({ 5190 5170 id: 'gallery', 5191 title: l10n.createGalleryTitle,5171 title: wp.i18n.__( 'Create Gallery' ), 5192 5172 priority: 40, 5193 5173 toolbar: 'main-gallery', 5194 5174 filterable: 'uploaded', … … Post = Select.extend({ 5216 5196 5217 5197 new Library({ 5218 5198 id: 'playlist', 5219 title: l10n.createPlaylistTitle,5199 title: wp.i18n.__( 'Create Audio Playlist' ), 5220 5200 priority: 60, 5221 5201 toolbar: 'main-playlist', 5222 5202 filterable: 'uploaded', … … Post = Select.extend({ 5232 5212 new wp.media.controller.CollectionEdit({ 5233 5213 type: 'audio', 5234 5214 collectionType: 'playlist', 5235 title: l10n.editPlaylistTitle,5215 title: wp.i18n.__( 'Edit Audio Playlist' ), 5236 5216 SettingsView: wp.media.view.Settings.Playlist, 5237 5217 library: options.selection, 5238 5218 editing: options.editing, 5239 5219 menu: 'playlist', 5240 dragInfoText: l10n.playlistDragInfo,5220 dragInfoText: wp.i18n.__( 'Drag and drop to reorder tracks.' ), 5241 5221 dragInfo: false 5242 5222 }), 5243 5223 5244 5224 new wp.media.controller.CollectionAdd({ 5245 5225 type: 'audio', 5246 5226 collectionType: 'playlist', 5247 title: l10n.addToPlaylistTitle5227 title: wp.i18n.__( 'Add to Audio Playlist' ) 5248 5228 }), 5249 5229 5250 5230 new Library({ 5251 5231 id: 'video-playlist', 5252 title: l10n.createVideoPlaylistTitle,5232 title: wp.i18n.__( 'Create Video Playlist' ), 5253 5233 priority: 60, 5254 5234 toolbar: 'main-video-playlist', 5255 5235 filterable: 'uploaded', … … Post = Select.extend({ 5264 5244 new wp.media.controller.CollectionEdit({ 5265 5245 type: 'video', 5266 5246 collectionType: 'playlist', 5267 title: l10n.editVideoPlaylistTitle,5247 title: wp.i18n.__( 'Create Video Playlist' ), 5268 5248 SettingsView: wp.media.view.Settings.Playlist, 5269 5249 library: options.selection, 5270 5250 editing: options.editing, 5271 5251 menu: 'video-playlist', 5272 dragInfoText: l10n.videoPlaylistDragInfo,5252 dragInfoText: wp.i18n.__( 'Drag and drop to reorder videos.' ), 5273 5253 dragInfo: false 5274 5254 }), 5275 5255 5276 5256 new wp.media.controller.CollectionAdd({ 5277 5257 type: 'video', 5278 5258 collectionType: 'playlist', 5279 title: l10n.addToVideoPlaylistTitle5259 title: wp.i18n.__( 'Add to Video Playlist' ) 5280 5260 }) 5281 5261 ]); 5282 5262 … … Post = Select.extend({ 5393 5373 5394 5374 view.set({ 5395 5375 cancel: { 5396 text: l10n.cancelGalleryTitle,5376 text: wp.i18n.__( '← Cancel Gallery' ), 5397 5377 priority: 20, 5398 5378 click: function() { 5399 5379 if ( previous ) { … … Post = Select.extend({ 5421 5401 5422 5402 view.set({ 5423 5403 cancel: { 5424 text: l10n.cancelPlaylistTitle,5404 text: wp.i18n.__( '← Cancel Audio Playlist' ), 5425 5405 priority: 20, 5426 5406 click: function() { 5427 5407 if ( previous ) { … … Post = Select.extend({ 5445 5425 5446 5426 view.set({ 5447 5427 cancel: { 5448 text: l10n.cancelVideoPlaylistTitle,5428 text: wp.i18n.__( '← Cancel Video Playlist' ), 5449 5429 priority: 20, 5450 5430 click: function() { 5451 5431 if ( previous ) { … … Post = Select.extend({ 5495 5475 }).render(); 5496 5476 5497 5477 view.toolbar.set( 'backToLibrary', { 5498 text: l10n.returnToLibrary,5478 text: wp.i18n.__( '← Return to library' ), 5499 5479 priority: -100, 5500 5480 5501 5481 click: function() { … … Post = Select.extend({ 5579 5559 5580 5560 view.set( 'gallery', { 5581 5561 style: 'primary', 5582 text: l10n.createNewGallery,5562 text: wp.i18n.__( 'Create a new gallery' ), 5583 5563 priority: 60, 5584 5564 requires: { selection: true }, 5585 5565 … … Post = Select.extend({ 5609 5589 5610 5590 view.set( 'playlist', { 5611 5591 style: 'primary', 5612 text: l10n.createNewPlaylist,5592 text: wp.i18n.__( 'Create a new playlist' ), 5613 5593 priority: 100, 5614 5594 requires: { selection: true }, 5615 5595 … … Post = Select.extend({ 5639 5619 5640 5620 view.set( 'video-playlist', { 5641 5621 style: 'primary', 5642 text: l10n.createNewVideoPlaylist,5622 text: wp.i18n.__( 'Create a new video playlist' ), 5643 5623 priority: 100, 5644 5624 requires: { selection: true }, 5645 5625 … … Post = Select.extend({ 5682 5662 items: { 5683 5663 insert: { 5684 5664 style: 'primary', 5685 text: editing ? l10n.updateGallery : l10n.insertGallery,5665 text: editing ? wp.i18n.__( 'Update gallery' ) : wp.i18n.__( 'Insert gallery' ), 5686 5666 priority: 80, 5687 5667 requires: { library: true }, 5688 5668 … … Post = Select.extend({ 5711 5691 items: { 5712 5692 insert: { 5713 5693 style: 'primary', 5714 text: l10n.addToGallery,5694 text: wp.i18n.__( 'Add to gallery' ), 5715 5695 priority: 80, 5716 5696 requires: { selection: true }, 5717 5697 … … Post = Select.extend({ 5739 5719 items: { 5740 5720 insert: { 5741 5721 style: 'primary', 5742 text: editing ? l10n.updatePlaylist : l10n.insertPlaylist,5722 text: editing ? wp.i18n.__( 'Update audio playlist' ) : wp.i18n.__( 'Insert audio playlist' ), 5743 5723 priority: 80, 5744 5724 requires: { library: true }, 5745 5725 … … Post = Select.extend({ 5768 5748 items: { 5769 5749 insert: { 5770 5750 style: 'primary', 5771 text: l10n.addToPlaylist,5751 text: wp.i18n.__( 'Add to audio playlist' ), 5772 5752 priority: 80, 5773 5753 requires: { selection: true }, 5774 5754 … … Post = Select.extend({ 5796 5776 items: { 5797 5777 insert: { 5798 5778 style: 'primary', 5799 text: editing ? l10n.updateVideoPlaylist : l10n.insertVideoPlaylist,5779 text: editing ? wp.i18n.__( 'Update video playlist' ) : wp.i18n.__( 'Insert video playlist' ), 5800 5780 priority: 140, 5801 5781 requires: { library: true }, 5802 5782 … … Post = Select.extend({ 5825 5805 items: { 5826 5806 insert: { 5827 5807 style: 'primary', 5828 text: l10n.addToVideoPlaylist,5808 text: wp.i18n.__( 'Add to video playlist' ), 5829 5809 priority: 140, 5830 5810 requires: { selection: true }, 5831 5811 … … module.exports = Post; 5862 5842 */ 5863 5843 5864 5844 var MediaFrame = wp.media.view.MediaFrame, 5865 l10n = wp.media.view.l10n,5866 5845 Select; 5867 5846 5868 5847 Select = MediaFrame.extend({ … … Select = MediaFrame.extend({ 5949 5928 browseRouter: function( routerView ) { 5950 5929 routerView.set({ 5951 5930 upload: { 5952 text: l10n.uploadFilesTitle,5931 text: wp.i18n.__( 'Upload Files' ), 5953 5932 priority: 20 5954 5933 }, 5955 5934 browse: { 5956 text: l10n.mediaLibraryTitle,5935 text: wp.i18n.__( 'Media Library' ), 5957 5936 priority: 40 5958 5937 } 5959 5938 }); … … Search = wp.media.View.extend({ 7069 7048 7070 7049 attributes: { 7071 7050 type: 'search', 7072 placeholder: l10n.search7051 placeholder: wp.i18n.__( 'Search' ) 7073 7052 }, 7074 7053 7075 7054 events: { … … module.exports = Search; 7107 7086 * @augments wp.Backbone.View 7108 7087 * @augments Backbone.View 7109 7088 */ 7110 var l10n = wp.media.view.l10n, 7111 Selection; 7089 var Selection; 7112 7090 7113 7091 Selection = wp.media.View.extend({ 7114 7092 tagName: 'div', … … Selection = wp.media.View.extend({ 7159 7137 this.$el.toggleClass( 'one', 1 === collection.length ); 7160 7138 this.$el.toggleClass( 'editing', editing ); 7161 7139 7162 this.$('.count').text( l10n.selected.replace('%d', collection.length) );7140 this.$('.count').text( wp.i18n._n( '%d selected', '%d selected', collection.length ) ); 7163 7141 }, 7164 7142 7165 7143 edit: function( event ) { … … module.exports = Embed; 7788 7766 * @augments Backbone.View 7789 7767 */ 7790 7768 var Toolbar = wp.media.view.Toolbar, 7791 l10n = wp.media.view.l10n,7792 7769 Select; 7793 7770 7794 7771 Select = Toolbar.extend({ … … Select = Toolbar.extend({ 7802 7779 state: false, 7803 7780 reset: true, 7804 7781 close: true, 7805 text: l10n.select,7782 text: wp.i18n.__( 'Select' ), 7806 7783 7807 7784 // Does the button rely on the selection? 7808 7785 requires: { … … module.exports = Select; 7860 7837 * @augments Backbone.View 7861 7838 */ 7862 7839 var View = wp.media.View, 7863 l10n = wp.media.view.l10n,7864 7840 $ = jQuery, 7865 7841 EditorUploader; 7866 7842 … … EditorUploader = View.extend({ 8000 7976 this.workflow = wp.media.editor.open( window.wpActiveEditor, { 8001 7977 frame: 'post', 8002 7978 state: 'insert', 8003 title: l10n.addMedia,7979 title: wp.i18n.__( 'Add Media' ), 8004 7980 multiple: true 8005 7981 }); 8006 7982 -
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
1 1 var media = wp.media, 2 baseSettings = window._wpmejsSettings || {}, 3 l10n = window._wpMediaViewsL10n || {}; 2 baseSettings = window._wpmejsSettings || {}; 4 3 5 4 /** 6 5 * @mixin … … wp.media.mixin = { 78 77 */ 79 78 wp.media.playlist = new wp.media.collection({ 80 79 tag: 'playlist', 81 editTitle : l10n.editPlaylistTitle,80 editTitle : wp.i18n.__( 'Edit Audio Playlist' ), 82 81 defaults : { 83 82 id: wp.media.view.settings.post.id, 84 83 style: 'light', -
src/wp-includes/js/media/controllers/audio-details.js
diff --git src/wp-includes/js/media/controllers/audio-details.js src/wp-includes/js/media/controllers/audio-details.js index 41c8a4f..e7543a2 100644
8 8 * @augments Backbone.Model 9 9 */ 10 10 var State = wp.media.controller.State, 11 l10n = wp.media.view.l10n,12 11 AudioDetails; 13 12 14 13 AudioDetails = State.extend({ 15 14 defaults: { 16 15 id: 'audio-details', 17 16 toolbar: 'audio-details', 18 title: l10n.audioDetailsTitle,17 title: wp.i18n.__( 'Audio Details' ), 19 18 content: 'audio-details', 20 19 menu: 'audio-details', 21 20 router: false, -
src/wp-includes/js/media/controllers/collection-edit.js
diff --git src/wp-includes/js/media/controllers/collection-edit.js src/wp-includes/js/media/controllers/collection-edit.js index 8478976..835a84a 100644
34 34 * @param {string} attributes.collectionType The collection type. (e.g. 'playlist'). 35 35 */ 36 36 var Library = wp.media.controller.Library, 37 l10n = wp.media.view.l10n,38 37 $ = jQuery, 39 38 CollectionEdit; 40 39 … … CollectionEdit = Library.extend({ 147 146 148 147 // Add the 'Reverse order' button to the toolbar. 149 148 attachmentsBrowserView.toolbar.set( 'reverse', { 150 text: l10n.reverseOrder,149 text: wp.i18n.__( 'Reverse order' ), 151 150 priority: 80, 152 151 153 152 click: function() { -
src/wp-includes/js/media/controllers/cropper.js
diff --git src/wp-includes/js/media/controllers/cropper.js src/wp-includes/js/media/controllers/cropper.js index a23b226..e8655c6 100644
7 7 * @augments wp.media.controller.State 8 8 * @augments Backbone.Model 9 9 */ 10 var l10n = wp.media.view.l10n, 11 Cropper; 12 13 Cropper = wp.media.controller.State.extend({ 10 var Cropper = wp.media.controller.State.extend({ 14 11 defaults: { 15 12 id: 'cropper', 16 title: l10n.cropImage,13 title: wp.i18n.__( 'Crop Image' ), 17 14 // Region mode defaults. 18 15 toolbar: 'crop', 19 16 content: 'crop', … … Cropper = wp.media.controller.State.extend({ 59 56 items: { 60 57 insert: { 61 58 style: 'primary', 62 text: l10n.cropImage,59 text: wp.i18n.__( 'Crop Image' ), 63 60 priority: 80, 64 61 requires: { library: false, selection: false }, 65 62 … … Cropper = wp.media.controller.State.extend({ 70 67 selection = controller.state().get('selection').first(); 71 68 selection.set({cropDetails: controller.state().imgSelect.getSelection()}); 72 69 73 this.$el.text( l10n.cropping);70 this.$el.text( wp.i18n.__( 'Cropping…' ) ); 74 71 this.$el.attr('disabled', true); 75 72 76 73 controller.state().doCrop( selection ).done( function( croppedImage ) { … … Cropper = wp.media.controller.State.extend({ 88 85 _.extend( toolbarOptions.items, { 89 86 skip: { 90 87 style: 'secondary', 91 text: l10n.skipCropping,88 text: wp.i18n.__( 'Skip Cropping' ), 92 89 priority: 70, 93 90 requires: { library: false, selection: false }, 94 91 click: function() { -
src/wp-includes/js/media/controllers/edit-attachment-metadata.js
diff --git src/wp-includes/js/media/controllers/edit-attachment-metadata.js src/wp-includes/js/media/controllers/edit-attachment-metadata.js index 60a57c3..8fd656a 100644
7 7 * @augments wp.media.controller.State 8 8 * @augments Backbone.Model 9 9 */ 10 var l10n = wp.media.view.l10n, 11 EditAttachmentMetadata; 12 13 EditAttachmentMetadata = wp.media.controller.State.extend({ 10 var EditAttachmentMetadata = wp.media.controller.State.extend({ 14 11 defaults: { 15 12 id: 'edit-attachment', 16 13 // Title string passed to the frame's title region view. 17 title: l10n.attachmentDetails,14 title: wp.i18n.__( 'Attachment Details' ), 18 15 // Region mode defaults. 19 16 content: 'edit-metadata', 20 17 menu: false, -
src/wp-includes/js/media/controllers/edit-image.js
diff --git src/wp-includes/js/media/controllers/edit-image.js src/wp-includes/js/media/controllers/edit-image.js index 448541f..900541a 100644
16 16 * @param {string} [attributes.menu=false] Initial mode for the menu region. 17 17 * @param {string} [attributes.url] Unused. @todo Consider removal. 18 18 */ 19 var l10n = wp.media.view.l10n, 20 EditImage; 21 22 EditImage = wp.media.controller.State.extend({ 19 var EditImage = wp.media.controller.State.extend({ 23 20 defaults: { 24 21 id: 'edit-image', 25 title: l10n.editImage,22 title: wp.i18n.__( 'Edit Image' ), 26 23 menu: false, 27 24 toolbar: 'edit-image', 28 25 content: 'edit-image', … … EditImage = wp.media.controller.State.extend({ 56 53 items: { 57 54 back: { 58 55 style: 'primary', 59 text: l10n.back,56 text: wp.i18n.__( 'Back' ), 60 57 priority: 20, 61 58 click: function() { 62 59 if ( previous ) { -
src/wp-includes/js/media/controllers/embed.js
diff --git src/wp-includes/js/media/controllers/embed.js src/wp-includes/js/media/controllers/embed.js index d347db0..94cf50e 100644
19 19 * @param {string} [attributes.url] The embed URL. 20 20 * @param {object} [attributes.metadata={}] Properties of the embed, which will override attributes.url if set. 21 21 */ 22 var l10n = wp.media.view.l10n, 23 $ = Backbone.$, 22 var $ = Backbone.$, 24 23 Embed; 25 24 26 25 Embed = wp.media.controller.State.extend({ 27 26 defaults: { 28 27 id: 'embed', 29 title: l10n.insertFromUrlTitle,28 title: wp.i18n.__( 'Insert from URL' ), 30 29 content: 'embed', 31 30 menu: 'default', 32 31 toolbar: 'main-embed', -
src/wp-includes/js/media/controllers/gallery-add.js
diff --git src/wp-includes/js/media/controllers/gallery-add.js src/wp-includes/js/media/controllers/gallery-add.js index 42d7dfa..f3de41b 100644
31 31 */ 32 32 var Selection = wp.media.model.Selection, 33 33 Library = wp.media.controller.Library, 34 l10n = wp.media.view.l10n,35 34 GalleryAdd; 36 35 37 36 GalleryAdd = Library.extend({ 38 37 defaults: _.defaults({ 39 38 id: 'gallery-library', 40 title: l10n.addToGalleryTitle,39 title: wp.i18n.__( 'Add to Gallery' ), 41 40 multiple: 'add', 42 41 filterable: 'uploaded', 43 42 menu: 'gallery', -
src/wp-includes/js/media/controllers/gallery-edit.js
diff --git src/wp-includes/js/media/controllers/gallery-edit.js src/wp-includes/js/media/controllers/gallery-edit.js index cfdd7aa..dd3d4ce 100644
31 31 * If none supplied, defaults to wp.media.view.Attachment.EditLibrary. 32 32 */ 33 33 var Library = wp.media.controller.Library, 34 l10n = wp.media.view.l10n,35 34 GalleryEdit; 36 35 37 36 GalleryEdit = Library.extend({ 38 37 defaults: { 39 38 id: 'gallery-edit', 40 title: l10n.editGalleryTitle,39 title: wp.i18n.__( 'Edit Gallery' ), 41 40 multiple: false, 42 41 searchable: false, 43 42 sortable: true, … … GalleryEdit = Library.extend({ 127 126 }); 128 127 129 128 browser.toolbar.set( 'reverse', { 130 text: l10n.reverseOrder,129 text: wp.i18n.__( 'Reverse order' ), 131 130 priority: 80, 132 131 133 132 click: function() { -
src/wp-includes/js/media/controllers/image-details.js
diff --git src/wp-includes/js/media/controllers/image-details.js src/wp-includes/js/media/controllers/image-details.js index 61462bb..b20735b 100644
24 24 */ 25 25 var State = wp.media.controller.State, 26 26 Library = wp.media.controller.Library, 27 l10n = wp.media.view.l10n,28 27 ImageDetails; 29 28 30 29 ImageDetails = State.extend({ 31 30 defaults: _.defaults({ 32 31 id: 'image-details', 33 title: l10n.imageDetailsTitle,32 title: wp.i18n.__( 'Image Details' ), 34 33 content: 'image-details', 35 34 menu: false, 36 35 router: false, -
src/wp-includes/js/media/controllers/library.js
diff --git src/wp-includes/js/media/controllers/library.js src/wp-includes/js/media/controllers/library.js index c16fab6..858c042 100644
32 32 * @param {boolean} [attributes.contentUserSetting=true] Whether the content region's mode should be set and persisted per user. 33 33 * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. 34 34 */ 35 var l10n = wp.media.view.l10n, 36 getUserSetting = window.getUserSetting, 35 var getUserSetting = window.getUserSetting, 37 36 setUserSetting = window.setUserSetting, 38 37 Library; 39 38 40 39 Library = wp.media.controller.State.extend({ 41 40 defaults: { 42 41 id: 'library', 43 title: l10n.mediaLibraryTitle,42 title: wp.i18n.__( 'Media Library' ), 44 43 multiple: false, 45 44 content: 'upload', 46 45 menu: 'default', -
src/wp-includes/js/media/controllers/replace-image.js
diff --git src/wp-includes/js/media/controllers/replace-image.js src/wp-includes/js/media/controllers/replace-image.js index ed37a50..3fbd0f4 100644
30 30 * @param {boolean} [attributes.syncSelection=true] Whether the Attachments selection should be persisted from the last state. 31 31 */ 32 32 var Library = wp.media.controller.Library, 33 l10n = wp.media.view.l10n,34 33 ReplaceImage; 35 34 36 35 ReplaceImage = Library.extend({ 37 36 defaults: _.defaults({ 38 37 id: 'replace-image', 39 title: l10n.replaceImageTitle,38 title: wp.i18n.__( 'Replace Image' ), 40 39 multiple: false, 41 40 filterable: 'uploaded', 42 41 toolbar: 'replace', -
src/wp-includes/js/media/controllers/video-details.js
diff --git src/wp-includes/js/media/controllers/video-details.js src/wp-includes/js/media/controllers/video-details.js index 00b301a..423d1bb 100644
8 8 * @augments Backbone.Model 9 9 */ 10 10 var State = wp.media.controller.State, 11 l10n = wp.media.view.l10n,12 11 VideoDetails; 13 12 14 13 VideoDetails = State.extend({ 15 14 defaults: { 16 15 id: 'video-details', 17 16 toolbar: 'video-details', 18 title: l10n.videoDetailsTitle,17 title: wp.i18n.__( 'Video Details' ), 19 18 content: 'video-details', 20 19 menu: 'video-details', 21 20 router: false, -
src/wp-includes/js/media/views/attachment-filters/all.js
diff --git src/wp-includes/js/media/views/attachment-filters/all.js src/wp-includes/js/media/views/attachment-filters/all.js index cc79d12..c53ca90 100644
All = wp.media.view.AttachmentFilters.extend({ 28 28 }); 29 29 30 30 filters.all = { 31 text: l10n.allMediaItems,31 text: wp.i18n.__( 'All media items' ), 32 32 props: { 33 33 status: null, 34 34 type: null, … … All = wp.media.view.AttachmentFilters.extend({ 54 54 } 55 55 56 56 filters.unattached = { 57 text: l10n.unattached,57 text: wp.i18n.__( 'Unattached' ), 58 58 props: { 59 59 status: null, 60 60 uploadedTo: 0, … … All = wp.media.view.AttachmentFilters.extend({ 69 69 this.controller.isModeActive( 'grid' ) ) { 70 70 71 71 filters.trash = { 72 text: l10n.trash,72 text: wp.i18n._x( 'Trash', 'noun' ), 73 73 props: { 74 74 uploadedTo: null, 75 75 status: 'trash', -
src/wp-includes/js/media/views/attachment-filters/date.js
diff --git src/wp-includes/js/media/views/attachment-filters/date.js src/wp-includes/js/media/views/attachment-filters/date.js index 5508e1b..fdd48da 100644
7 7 * @augments wp.Backbone.View 8 8 * @augments Backbone.View 9 9 */ 10 var l10n = wp.media.view.l10n, 11 DateFilter; 12 13 DateFilter = wp.media.view.AttachmentFilters.extend({ 10 var DateFilter = wp.media.view.AttachmentFilters.extend({ 14 11 id: 'media-attachment-date-filters', 15 12 16 13 createFilters: function() { … … DateFilter = wp.media.view.AttachmentFilters.extend({ 25 22 }; 26 23 }); 27 24 filters.all = { 28 text: l10n.allDates,25 text: wp.i18n.__( 'All dates' ), 29 26 props: { 30 27 monthnum: false, 31 28 year: false -
src/wp-includes/js/media/views/attachment-filters/uploaded.js
diff --git src/wp-includes/js/media/views/attachment-filters/uploaded.js src/wp-includes/js/media/views/attachment-filters/uploaded.js index 7ae0a53..329c247 100644
Uploaded = wp.media.view.AttachmentFilters.extend({ 22 22 23 23 this.filters = { 24 24 all: { 25 text: text || l10n.allMediaItems,25 text: text || wp.i18n.__( 'All media items' ), 26 26 props: { 27 27 uploadedTo: null, 28 28 orderby: 'date', … … Uploaded = wp.media.view.AttachmentFilters.extend({ 42 42 }, 43 43 44 44 unattached: { 45 text: l10n.unattached,45 text: wp.i18n.__( 'Unattached' ), 46 46 props: { 47 47 uploadedTo: 0, 48 48 orderby: 'menuOrder', -
src/wp-includes/js/media/views/attachment/details.js
diff --git src/wp-includes/js/media/views/attachment/details.js src/wp-includes/js/media/views/attachment/details.js index f356aaa..167ccb0 100644
8 8 * @augments Backbone.View 9 9 */ 10 10 var Attachment = wp.media.view.Attachment, 11 l10n = wp.media.view.l10n,12 11 Details; 13 12 14 13 Details = Attachment.extend({ … … Details = Attachment.extend({ 63 62 deleteAttachment: function( event ) { 64 63 event.preventDefault(); 65 64 66 if ( window.confirm( l10n.warnDelete) ) {65 if ( window.confirm( wp.i18n.__( "You are about to permanently delete this item.\n 'Cancel' to stop, 'OK' to delete." ) ) ) { 67 66 this.model.destroy(); 68 67 // Keep focus inside media modal 69 68 // after image is deleted -
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
20 20 */ 21 21 var View = wp.media.View, 22 22 mediaTrash = wp.media.view.settings.mediaTrash, 23 l10n = wp.media.view.l10n,24 23 $ = jQuery, 25 24 AttachmentsBrowser; 26 25 … … AttachmentsBrowser = View.extend({ 98 97 // "Filters" will return a <select>, need to render 99 98 // screen reader text before 100 99 this.toolbar.set( 'filtersLabel', new wp.media.view.Label({ 101 value: l10n.filterByType,100 value: wp.i18n.__( 'Filter by type' ), 102 101 attributes: { 103 102 'for': 'media-attachment-filters' 104 103 }, … … AttachmentsBrowser = View.extend({ 138 137 139 138 // DateFilter is a <select>, screen reader text needs to be rendered before 140 139 this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({ 141 value: l10n.filterByDate,140 value: wp.i18n.__( 'Filter by date' ), 142 141 attributes: { 143 142 'for': 'media-attachment-date-filters' 144 143 }, … … AttachmentsBrowser = View.extend({ 152 151 153 152 // BulkSelection is a <div> with subviews, including screen reader text 154 153 this.toolbar.set( 'selectModeToggleButton', new wp.media.view.SelectModeToggleButton({ 155 text: l10n.bulkSelect,154 text: wp.i18n.__( 'Bulk Select' ), 156 155 controller: this.controller, 157 156 priority: -70 158 157 }).render() ); … … AttachmentsBrowser = View.extend({ 161 160 filters: Filters, 162 161 style: 'primary', 163 162 disabled: true, 164 text: mediaTrash ? l10n.trashSelected : l10n.deleteSelected,163 text: mediaTrash ? wp.i18n.__( 'Trash Selected' ) : wp.i18n.__( 'Delete Selected' ), 165 164 controller: this.controller, 166 165 priority: -60, 167 166 click: function() { … … AttachmentsBrowser = View.extend({ 173 172 return; 174 173 } 175 174 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." ) ) ) { 177 176 return; 178 177 } 179 178 180 179 if ( mediaTrash && 181 180 '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." ) ) ) { 183 182 184 183 return; 185 184 } … … AttachmentsBrowser = View.extend({ 221 220 filters: Filters, 222 221 style: 'primary', 223 222 disabled: true, 224 text: l10n.deleteSelected,223 text: wp.i18n.__( 'Delete Selected' ), 225 224 controller: this.controller, 226 225 priority: -55, 227 226 click: function() { 228 227 var removed = [], selection = this.controller.state().get( 'selection' ); 229 228 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." ) ) ) { 231 230 return; 232 231 } 233 232 … … AttachmentsBrowser = View.extend({ 249 248 } else if ( this.options.date ) { 250 249 // DateFilter is a <select>, screen reader text needs to be rendered before 251 250 this.toolbar.set( 'dateFilterLabel', new wp.media.view.Label({ 252 value: l10n.filterByDate,251 value: wp.i18n.__( 'Filter by date' ), 253 252 attributes: { 254 253 'for': 'media-attachment-date-filters' 255 254 }, … … AttachmentsBrowser = View.extend({ 265 264 if ( this.options.search ) { 266 265 // Search is an input, screen reader text needs to be rendered before 267 266 this.toolbar.set( 'searchLabel', new wp.media.view.Label({ 268 value: l10n.searchMediaLabel,267 value: wp.i18n.__( 'Search Media' ), 269 268 attributes: { 270 269 'for': 'media-search-input' 271 270 }, … … AttachmentsBrowser = View.extend({ 280 279 281 280 if ( this.options.dragInfo ) { 282 281 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], 284 283 priority: -40 285 284 }) ); 286 285 } 287 286 288 287 if ( this.options.suggestedWidth && this.options.suggestedHeight ) { 289 288 this.toolbar.set( 'suggestedDimensions', new View({ 290 el: $( '<div class="instructions">' + l10n.suggestedDimensions+ ' ' + this.options.suggestedWidth + ' × ' + this.options.suggestedHeight + '</div>' )[0],289 el: $( '<div class="instructions">' + wp.i18n.__( 'Suggested image dimensions:' ) + ' ' + this.options.suggestedWidth + ' × ' + this.options.suggestedHeight + '</div>' )[0], 291 290 priority: -40 292 291 }) ); 293 292 } … … AttachmentsBrowser = View.extend({ 323 322 this.uploader = new wp.media.view.UploaderInline({ 324 323 controller: this.controller, 325 324 status: false, 326 message: this.controller.isModeActive( 'grid' ) ? '' : l10n.noItemsFound,325 message: this.controller.isModeActive( 'grid' ) ? '' : wp.i18n.__( 'No items found.' ), 327 326 canClose: this.controller.isModeActive( 'grid' ) 328 327 }); 329 328 … … AttachmentsBrowser = View.extend({ 367 366 }); 368 367 369 368 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.' ) ); 371 370 372 371 this.views.add( this.attachmentsNoResults ); 373 372 } -
src/wp-includes/js/media/views/button/delete-selected.js
diff --git src/wp-includes/js/media/views/button/delete-selected.js src/wp-includes/js/media/views/button/delete-selected.js index c9ee1b0..72a4ebc 100644
10 10 * @augments Backbone.View 11 11 */ 12 12 var Button = wp.media.view.Button, 13 l10n = wp.media.view.l10n,14 13 DeleteSelected; 15 14 16 15 DeleteSelected = Button.extend({ … … DeleteSelected = Button.extend({ 24 23 25 24 filterChange: function( model ) { 26 25 if ( 'trash' === model.get( 'status' ) ) { 27 this.model.set( 'text', l10n.untrashSelected);26 this.model.set( 'text', wp.i18n.__( 'Untrash Selected' ) ); 28 27 } else if ( wp.media.view.settings.mediaTrash ) { 29 this.model.set( 'text', l10n.trashSelected);28 this.model.set( 'text', wp.i18n.__( 'Trash Selected' ) ); 30 29 } else { 31 this.model.set( 'text', l10n.deleteSelected);30 this.model.set( 'text', wp.i18n.__( 'Delete Selected' ) ); 32 31 } 33 32 }, 34 33 -
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
8 8 * @augments Backbone.View 9 9 */ 10 10 var Button = wp.media.view.Button, 11 l10n = wp.media.view.l10n,12 11 SelectModeToggle; 13 12 14 13 SelectModeToggle = Button.extend({ … … SelectModeToggle = Button.extend({ 50 49 if ( this.controller.isModeActive( 'select' ) ) { 51 50 this.model.set( { 52 51 size: 'large', 53 text: l10n.cancelSelection52 text: wp.i18n.__( 'Cancel Selection' ) 54 53 } ); 55 54 children.not( '.spinner, .media-button' ).hide(); 56 55 this.$el.show(); … … SelectModeToggle = Button.extend({ 58 57 } else { 59 58 this.model.set( { 60 59 size: '', 61 text: l10n.bulkSelect60 text: wp.i18n.__( 'Bulk Select' ) 62 61 } ); 63 62 this.controller.content.get().$el.removeClass( 'fixed' ); 64 63 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
14 14 */ 15 15 var View = wp.media.View, 16 16 UploaderStatus = wp.media.view.UploaderStatus, 17 l10n = wp.media.view.l10n,18 17 $ = jQuery, 19 18 Cropper; 20 19 … … Cropper = View.extend({ 38 37 }, 39 38 prepare: function() { 40 39 return { 41 title: l10n.cropYourImage,40 title: wp.i18n.__( 'Crop your image' ), 42 41 url: this.options.attachment.get('url') 43 42 }; 44 43 }, … … Cropper = View.extend({ 57 56 58 57 this.views.add( '.upload-errors', new wp.media.view.UploaderStatusError({ 59 58 filename: UploaderStatus.prototype.filename(filename), 60 message: w indow._wpMediaViewsL10n.cropError59 message: wp.i18n.__( 'There has been an error cropping your image.' ) 61 60 }), { at: 0 }); 62 61 } 63 62 }); -
src/wp-includes/js/media/views/frame/audio-details.js
diff --git src/wp-includes/js/media/views/frame/audio-details.js src/wp-includes/js/media/views/frame/audio-details.js index 1e9aff6..83f8198 100644
13 13 */ 14 14 var MediaDetails = wp.media.view.MediaFrame.MediaDetails, 15 15 MediaLibrary = wp.media.controller.MediaLibrary, 16 17 l10n = wp.media.view.l10n,18 16 AudioDetails; 19 17 20 18 AudioDetails = MediaDetails.extend({ … … AudioDetails = MediaDetails.extend({ 25 23 content: 'audio-details', 26 24 toolbar: 'audio-details', 27 25 type: 'link', 28 title: l10n.audioDetailsTitle,26 title: wp.i18n.__( 'Audio Details' ), 29 27 priority: 120 30 28 }, 31 29 32 30 initialize: function( options ) { 33 31 options.DetailsView = wp.media.view.AudioDetails; 34 options.cancelText = l10n.audioDetailsCancel;35 options.addText = l10n.audioAddSourceTitle;32 options.cancelText = wp.i18n.__( 'Cancel Edit' ); 33 options.addText = wp.i18n.__( 'Add Audio Source' ); 36 34 37 35 MediaDetails.prototype.initialize.call( this, options ); 38 36 }, … … AudioDetails = MediaDetails.extend({ 53 51 new MediaLibrary( { 54 52 type: 'audio', 55 53 id: 'replace-audio', 56 title: l10n.audioReplaceTitle,54 title: wp.i18n.__( 'Replace Audio' ), 57 55 toolbar: 'replace-audio', 58 56 media: this.media, 59 57 menu: 'audio-details' … … AudioDetails = MediaDetails.extend({ 62 60 new MediaLibrary( { 63 61 type: 'audio', 64 62 id: 'add-audio-source', 65 title: l10n.audioAddSourceTitle,63 title: wp.i18n.__( 'Add Audio Source' ), 66 64 toolbar: 'add-audio-source', 67 65 media: this.media, 68 66 menu: false -
src/wp-includes/js/media/views/frame/image-details.js
diff --git src/wp-includes/js/media/views/frame/image-details.js src/wp-includes/js/media/views/frame/image-details.js index a75c8ae..0776110 100644
14 14 * @mixes wp.media.controller.StateMachine 15 15 */ 16 16 var Select = wp.media.view.MediaFrame.Select, 17 l10n = wp.media.view.l10n,18 17 ImageDetails; 19 18 20 19 ImageDetails = Select.extend({ … … ImageDetails = Select.extend({ 25 24 content: 'image-details', 26 25 toolbar: 'image-details', 27 26 type: 'link', 28 title: l10n.imageDetailsTitle,27 title: wp.i18n.__( 'Image Details' ), 29 28 priority: 120 30 29 }, 31 30 … … ImageDetails = Select.extend({ 56 55 library: wp.media.query( { type: 'image' } ), 57 56 image: this.image, 58 57 multiple: false, 59 title: l10n.imageReplaceTitle,58 title: wp.i18n.__( 'Replace Image' ), 60 59 toolbar: 'replace', 61 60 priority: 80, 62 61 displaySettings: true … … ImageDetails = Select.extend({ 100 99 items: { 101 100 select: { 102 101 style: 'primary', 103 text: l10n.update,102 text: wp.i18n.__( 'Update' ), 104 103 priority: 80, 105 104 106 105 click: function() { … … ImageDetails = Select.extend({ 131 130 controller: this, 132 131 items: { 133 132 back: { 134 text: l10n.back,133 text: wp.i18n.__( 'Back' ), 135 134 priority: 20, 136 135 click: function() { 137 136 if ( previous ) { … … ImageDetails = Select.extend({ 144 143 145 144 replace: { 146 145 style: 'primary', 147 text: l10n.replace,146 text: wp.i18n.__( 'Replace' ), 148 147 priority: 80, 149 148 150 149 click: function() { -
src/wp-includes/js/media/views/frame/media-details.js
diff --git src/wp-includes/js/media/views/frame/media-details.js src/wp-includes/js/media/views/frame/media-details.js index 407c136..f064ccb 100644
11 11 * @mixes wp.media.controller.StateMachine 12 12 */ 13 13 var Select = wp.media.view.MediaFrame.Select, 14 l10n = wp.media.view.l10n,15 14 MediaDetails; 16 15 17 16 MediaDetails = Select.extend({ … … MediaDetails = Select.extend({ 102 101 }, 103 102 104 103 renderDetailsToolbar: function() { 105 this.setPrimaryButton( l10n.update, function( controller, state ) {104 this.setPrimaryButton( wp.i18n.__( 'Update' ), function( controller, state ) { 106 105 controller.close(); 107 106 state.trigger( 'update', controller.media.toJSON() ); 108 107 } ); 109 108 }, 110 109 111 110 renderReplaceToolbar: function() { 112 this.setPrimaryButton( l10n.replace, function( controller, state ) {111 this.setPrimaryButton( wp.i18n.__( 'Replace' ), function( controller, state ) { 113 112 var attachment = state.get( 'selection' ).single(); 114 113 controller.media.changeAttachment( attachment ); 115 114 state.trigger( 'replace', controller.media.toJSON() ); -
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({ 53 53 // Main states. 54 54 new Library({ 55 55 id: 'insert', 56 title: l10n.insertMediaTitle,56 title: wp.i18n.__( 'Insert Media' ), 57 57 priority: 20, 58 58 toolbar: 'main-insert', 59 59 filterable: 'all', … … Post = Select.extend({ 74 74 75 75 new Library({ 76 76 id: 'gallery', 77 title: l10n.createGalleryTitle,77 title: wp.i18n.__( 'Create Gallery' ), 78 78 priority: 40, 79 79 toolbar: 'main-gallery', 80 80 filterable: 'uploaded', … … Post = Select.extend({ 102 102 103 103 new Library({ 104 104 id: 'playlist', 105 title: l10n.createPlaylistTitle,105 title: wp.i18n.__( 'Create Audio Playlist' ), 106 106 priority: 60, 107 107 toolbar: 'main-playlist', 108 108 filterable: 'uploaded', … … Post = Select.extend({ 118 118 new wp.media.controller.CollectionEdit({ 119 119 type: 'audio', 120 120 collectionType: 'playlist', 121 title: l10n.editPlaylistTitle,121 title: wp.i18n.__( 'Edit Audio Playlist' ), 122 122 SettingsView: wp.media.view.Settings.Playlist, 123 123 library: options.selection, 124 124 editing: options.editing, 125 125 menu: 'playlist', 126 dragInfoText: l10n.playlistDragInfo,126 dragInfoText: wp.i18n.__( 'Drag and drop to reorder tracks.' ), 127 127 dragInfo: false 128 128 }), 129 129 130 130 new wp.media.controller.CollectionAdd({ 131 131 type: 'audio', 132 132 collectionType: 'playlist', 133 title: l10n.addToPlaylistTitle133 title: wp.i18n.__( 'Add to Audio Playlist' ) 134 134 }), 135 135 136 136 new Library({ 137 137 id: 'video-playlist', 138 title: l10n.createVideoPlaylistTitle,138 title: wp.i18n.__( 'Create Video Playlist' ), 139 139 priority: 60, 140 140 toolbar: 'main-video-playlist', 141 141 filterable: 'uploaded', … … Post = Select.extend({ 150 150 new wp.media.controller.CollectionEdit({ 151 151 type: 'video', 152 152 collectionType: 'playlist', 153 title: l10n.editVideoPlaylistTitle,153 title: wp.i18n.__( 'Edit Video Playlist' ), 154 154 SettingsView: wp.media.view.Settings.Playlist, 155 155 library: options.selection, 156 156 editing: options.editing, 157 157 menu: 'video-playlist', 158 dragInfoText: l10n.videoPlaylistDragInfo,158 dragInfoText: wp.i18n.__( 'Drag and drop to reorder videos.' ), 159 159 dragInfo: false 160 160 }), 161 161 162 162 new wp.media.controller.CollectionAdd({ 163 163 type: 'video', 164 164 collectionType: 'playlist', 165 title: l10n.addToVideoPlaylistTitle165 title: wp.i18n.__( 'Add to Video Playlist' ) 166 166 }) 167 167 ]); 168 168 … … Post = Select.extend({ 279 279 280 280 view.set({ 281 281 cancel: { 282 text: l10n.cancelGalleryTitle,282 text: wp.i18n.__( '← Cancel Gallery' ), 283 283 priority: 20, 284 284 click: function() { 285 285 if ( previous ) { … … Post = Select.extend({ 307 307 308 308 view.set({ 309 309 cancel: { 310 text: l10n.cancelPlaylistTitle,310 text: wp.i18n.__( '← Cancel Audio Playlist' ), 311 311 priority: 20, 312 312 click: function() { 313 313 if ( previous ) { … … Post = Select.extend({ 331 331 332 332 view.set({ 333 333 cancel: { 334 text: l10n.cancelVideoPlaylistTitle,334 text: wp.i18n.__( '← Cancel Video Playlist' ), 335 335 priority: 20, 336 336 click: function() { 337 337 if ( previous ) { … … Post = Select.extend({ 381 381 }).render(); 382 382 383 383 view.toolbar.set( 'backToLibrary', { 384 text: l10n.returnToLibrary,384 text: wp.i18n.__( '← Return to library' ), 385 385 priority: -100, 386 386 387 387 click: function() { … … Post = Select.extend({ 465 465 466 466 view.set( 'gallery', { 467 467 style: 'primary', 468 text: l10n.createNewGallery,468 text: wp.i18n.__( 'Create a new gallery' ), 469 469 priority: 60, 470 470 requires: { selection: true }, 471 471 … … Post = Select.extend({ 495 495 496 496 view.set( 'playlist', { 497 497 style: 'primary', 498 text: l10n.createNewPlaylist,498 text: wp.i18n.__( 'Create a new playlist' ), 499 499 priority: 100, 500 500 requires: { selection: true }, 501 501 … … Post = Select.extend({ 525 525 526 526 view.set( 'video-playlist', { 527 527 style: 'primary', 528 text: l10n.createNewVideoPlaylist,528 text: wp.i18n.__( 'Create a new video playlist' ), 529 529 priority: 100, 530 530 requires: { selection: true }, 531 531 … … Post = Select.extend({ 568 568 items: { 569 569 insert: { 570 570 style: 'primary', 571 text: editing ? l10n.updateGallery : l10n.insertGallery,571 text: editing ? wp.i18n.__( 'Update gallery' ) : wp.i18n.__( 'Insert gallery' ), 572 572 priority: 80, 573 573 requires: { library: true }, 574 574 … … Post = Select.extend({ 597 597 items: { 598 598 insert: { 599 599 style: 'primary', 600 text: l10n.addToGallery,600 text: wp.i18n.__( 'Add to gallery' ), 601 601 priority: 80, 602 602 requires: { selection: true }, 603 603 … … Post = Select.extend({ 625 625 items: { 626 626 insert: { 627 627 style: 'primary', 628 text: editing ? l10n.updatePlaylist : l10n.insertPlaylist,628 text: editing ? wp.i18n.__( 'Update audio playlist' ) : wp.i18n.__( 'Insert audio playlist' ), 629 629 priority: 80, 630 630 requires: { library: true }, 631 631 … … Post = Select.extend({ 654 654 items: { 655 655 insert: { 656 656 style: 'primary', 657 text: l10n.addToPlaylist,657 text: wp.i18n.__( 'Add to audio playlist' ), 658 658 priority: 80, 659 659 requires: { selection: true }, 660 660 … … Post = Select.extend({ 682 682 items: { 683 683 insert: { 684 684 style: 'primary', 685 text: editing ? l10n.updateVideoPlaylist : l10n.insertVideoPlaylist,685 text: editing ? wp.i18n.__( 'Update video playlist' ) : wp.i18n.__( 'Insert video playlist' ), 686 686 priority: 140, 687 687 requires: { library: true }, 688 688 … … Post = Select.extend({ 711 711 items: { 712 712 insert: { 713 713 style: 'primary', 714 text: l10n.addToVideoPlaylist,714 text: wp.i18n.__( 'Add to video playlist' ), 715 715 priority: 140, 716 716 requires: { selection: true }, 717 717 -
src/wp-includes/js/media/views/frame/select.js
diff --git src/wp-includes/js/media/views/frame/select.js src/wp-includes/js/media/views/frame/select.js index 0569bc6..f86bd5a 100644
13 13 */ 14 14 15 15 var MediaFrame = wp.media.view.MediaFrame, 16 l10n = wp.media.view.l10n,17 16 Select; 18 17 19 18 Select = MediaFrame.extend({ … … Select = MediaFrame.extend({ 100 99 browseRouter: function( routerView ) { 101 100 routerView.set({ 102 101 upload: { 103 text: l10n.uploadFilesTitle,102 text: wp.i18n.__( 'Media Library' ), 104 103 priority: 20 105 104 }, 106 105 browse: { 107 text: l10n.mediaLibraryTitle,106 text: wp.i18n.__( 'Media Library' ), 108 107 priority: 40 109 108 } 110 109 }); -
src/wp-includes/js/media/views/frame/video-details.js
diff --git src/wp-includes/js/media/views/frame/video-details.js src/wp-includes/js/media/views/frame/video-details.js index 8f7e414..b8a771d 100644
13 13 */ 14 14 var MediaDetails = wp.media.view.MediaFrame.MediaDetails, 15 15 MediaLibrary = wp.media.controller.MediaLibrary, 16 l10n = wp.media.view.l10n,17 16 VideoDetails; 18 17 19 18 VideoDetails = MediaDetails.extend({ … … VideoDetails = MediaDetails.extend({ 24 23 content: 'video-details', 25 24 toolbar: 'video-details', 26 25 type: 'link', 27 title: l10n.videoDetailsTitle,26 title: wp.i18n.__( 'Video Details' ), 28 27 priority: 120 29 28 }, 30 29 31 30 initialize: function( options ) { 32 31 options.DetailsView = wp.media.view.VideoDetails; 33 options.cancelText = l10n.videoDetailsCancel;34 options.addText = l10n.videoAddSourceTitle;32 options.cancelText = wp.i18n.__( 'Cancel Edit' ); 33 options.addText = wp.i18n.__( 'Add Video Source' ); 35 34 36 35 MediaDetails.prototype.initialize.call( this, options ); 37 36 }, … … VideoDetails = MediaDetails.extend({ 54 53 new MediaLibrary( { 55 54 type: 'video', 56 55 id: 'replace-video', 57 title: l10n.videoReplaceTitle,56 title: wp.i18n.__( 'Replace Video' ), 58 57 toolbar: 'replace-video', 59 58 media: this.media, 60 59 menu: 'video-details' … … VideoDetails = MediaDetails.extend({ 63 62 new MediaLibrary( { 64 63 type: 'video', 65 64 id: 'add-video-source', 66 title: l10n.videoAddSourceTitle,65 title: wp.i18n.__( 'Add Video Source' ), 67 66 toolbar: 'add-video-source', 68 67 media: this.media, 69 68 menu: false … … VideoDetails = MediaDetails.extend({ 72 71 new MediaLibrary( { 73 72 type: 'image', 74 73 id: 'select-poster-image', 75 title: l10n.videoSelectPosterImageTitle,74 title: wp.i18n.__( 'Select Poster Image' ), 76 75 toolbar: 'select-poster-image', 77 76 media: this.media, 78 77 menu: 'video-details' … … VideoDetails = MediaDetails.extend({ 81 80 new MediaLibrary( { 82 81 type: 'text', 83 82 id: 'add-track', 84 title: l10n.videoAddTrackTitle,83 title: wp.i18n.__( 'Add Subtitles' ), 85 84 toolbar: 'add-track', 86 85 media: this.media, 87 86 menu: 'video-details' … … VideoDetails = MediaDetails.extend({ 90 89 }, 91 90 92 91 renderSelectPosterImageToolbar: function() { 93 this.setPrimaryButton( l10n.videoSelectPosterImageTitle, function( controller, state ) {92 this.setPrimaryButton( wp.i18n.__( 'Select Poster Image' ), function( controller, state ) { 94 93 var urls = [], attachment = state.get( 'selection' ).single(); 95 94 96 95 controller.media.set( 'poster', attachment.get( 'url' ) ); … … VideoDetails = MediaDetails.extend({ 112 111 }, 113 112 114 113 renderAddTrackToolbar: function() { 115 this.setPrimaryButton( l10n.videoAddTrackTitle, function( controller, state ) {114 this.setPrimaryButton( wp.i18n.__( 'Add Subtitles' ), function( controller, state ) { 116 115 var attachment = state.get( 'selection' ).single(), 117 116 content = controller.media.get( 'content' ); 118 117 -
src/wp-includes/js/media/views/search.js
diff --git src/wp-includes/js/media/views/search.js src/wp-includes/js/media/views/search.js index f178821..2cb2950 100644
6 6 * @augments wp.Backbone.View 7 7 * @augments Backbone.View 8 8 */ 9 var l10n = wp.media.view.l10n, 10 Search; 11 12 Search = wp.media.View.extend({ 9 var Search = wp.media.View.extend({ 13 10 tagName: 'input', 14 11 className: 'search', 15 12 id: 'media-search-input', 16 13 17 14 attributes: { 18 15 type: 'search', 19 placeholder: l10n.search16 placeholder: wp.i18n.__( 'Search' ) 20 17 }, 21 18 22 19 events: { -
src/wp-includes/js/media/views/selection.js
diff --git src/wp-includes/js/media/views/selection.js src/wp-includes/js/media/views/selection.js index 6bb6d9c..01ebfe9 100644
6 6 * @augments wp.Backbone.View 7 7 * @augments Backbone.View 8 8 */ 9 var l10n = wp.media.view.l10n, 10 Selection; 11 12 Selection = wp.media.View.extend({ 9 var Selection = wp.media.View.extend({ 13 10 tagName: 'div', 14 11 className: 'media-selection', 15 12 template: wp.template('media-selection'), … … Selection = wp.media.View.extend({ 58 55 this.$el.toggleClass( 'one', 1 === collection.length ); 59 56 this.$el.toggleClass( 'editing', editing ); 60 57 61 this.$('.count').text( l10n.selected.replace('%d', collection.length) );58 this.$('.count').text( wp.i18n._n( '%d selected', '%d selected', collection.length ) ); 62 59 }, 63 60 64 61 edit: function( event ) { -
src/wp-includes/js/media/views/toolbar/select.js
diff --git src/wp-includes/js/media/views/toolbar/select.js src/wp-includes/js/media/views/toolbar/select.js index 5cbe3f7..34d89f3 100644
8 8 * @augments Backbone.View 9 9 */ 10 10 var Toolbar = wp.media.view.Toolbar, 11 l10n = wp.media.view.l10n,12 11 Select; 13 12 14 13 Select = Toolbar.extend({ … … Select = Toolbar.extend({ 22 21 state: false, 23 22 reset: true, 24 23 close: true, 25 text: l10n.select,24 text: wp.i18n.__( 'Select' ), 26 25 27 26 // Does the button rely on the selection? 28 27 requires: { -
src/wp-includes/js/media/views/uploader/editor.js
diff --git src/wp-includes/js/media/views/uploader/editor.js src/wp-includes/js/media/views/uploader/editor.js index a8cfeb9..ce89a1c 100644
10 10 * @augments Backbone.View 11 11 */ 12 12 var View = wp.media.View, 13 l10n = wp.media.view.l10n,14 13 $ = jQuery, 15 14 EditorUploader; 16 15 … … EditorUploader = View.extend({ 150 149 this.workflow = wp.media.editor.open( window.wpActiveEditor, { 151 150 frame: 'post', 152 151 state: 'insert', 153 title: l10n.addMedia,152 title: wp.i18n.__( 'Add Media' ), 154 153 multiple: true 155 154 }); 156 155 -
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 */ 2 2 var topWin = window.dialogArguments || opener || parent || top, uploader, uploader_init; 3 3 4 4 // progress and success handlers for media multi uploads … … function fileUploading( up, file ) { 48 48 if ( max > hundredmb && file.size > hundredmb ) { 49 49 setTimeout( function() { 50 50 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>' ) ); 52 52 up.stop(); // stops the whole queue 53 53 up.removeFile( file ); 54 54 up.start(); // restart the queue … … function uploadSuccess(fileObj, serverData) { 88 88 item.html(serverData); 89 89 return; 90 90 } else { 91 jQuery('.percent', item).html( pluploadL10n.crunching);91 jQuery('.percent', item).html( wp.i18n.__( 'Crunching…' ) ); 92 92 } 93 93 94 94 prepareMediaItem(fileObj, serverData); … … function itemAjaxError(id, message) { 213 213 return; 214 214 215 215 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.__( '“%s” has failed to upload.' ).replace('%s', jQuery.trim(filename)) + '</strong> ' + 218 219 message + 219 220 '</div>').data('last-err', id); 220 221 } … … function deleteSuccess(data) { 249 250 250 251 jQuery('.filename:empty', item).remove(); 251 252 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(); 253 254 jQuery('.filename', item).append( jQuery('a.undo', item).removeClass('hidden') ); 254 255 jQuery('.menu_order_input', item).hide(); 255 256 … … function uploadError(fileObj, errorCode, message, uploader) { 282 283 283 284 switch (errorCode) { 284 285 case plupload.FAILED: 285 wpFileError( fileObj, pluploadL10n.upload_failed);286 wpFileError( fileObj, wp.i18n.__( 'Upload failed.' ) ); 286 287 break; 287 288 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.' ) ); 289 290 break; 290 291 case plupload.FILE_SIZE_ERROR: 291 uploadSizeError( uploader, fileObj);292 uploadSizeError( uploader, fileObj ); 292 293 break; 293 294 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.' ) ); 295 296 break; 296 297 case plupload.IMAGE_MEMORY_ERROR: 297 wpFileError( fileObj, pluploadL10n.image_memory_exceeded);298 wpFileError( fileObj, wp.i18n.__( 'Memory exceeded. Please try another smaller file.' ) ); 298 299 break; 299 300 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.' ) ); 301 302 break; 302 303 case plupload.GENERIC_ERROR: 303 wpQueueError( pluploadL10n.upload_failed);304 wpQueueError( wp.i18n.__( 'Upload failed.' ) ); 304 305 break; 305 306 case plupload.IO_ERROR: 306 307 max = parseInt( uploader.settings.filters.max_file_size, 10 ); 307 308 308 309 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>' ) ); 310 311 else 311 wpQueueError( pluploadL10n.io_error);312 wpQueueError( wp.i18n.__( 'IO error.' ) ); 312 313 break; 313 314 case plupload.HTTP_ERROR: 314 wpQueueError( pluploadL10n.http_error);315 wpQueueError( wp.i18n.__( 'HTTP error.' ) ); 315 316 break; 316 317 case plupload.INIT_ERROR: 317 318 jQuery('.media-upload-form').addClass('html-uploader'); 318 319 break; 319 320 case plupload.SECURITY_ERROR: 320 wpQueueError( pluploadL10n.security_error);321 wpQueueError( wp.i18n.__( 'Security error.' ) ); 321 322 break; 322 323 /* case plupload.UPLOAD_ERROR.UPLOAD_STOPPED: 323 324 case plupload.UPLOAD_ERROR.FILE_CANCELLED: 324 325 jQuery('#media-item-' + fileObj.id).remove(); 325 326 break;*/ 326 327 default: 327 wpFileError( fileObj, pluploadL10n.default_error);328 wpFileError( fileObj, wp.i18n.__( 'An error occurred in the upload. Please try again later.' ) ); 328 329 } 329 330 } 330 331 331 332 function uploadSizeError( up, file, over100mb ) { 332 333 var message; 333 334 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 } 338 342 339 343 jQuery('#media-items').append('<div id="media-item-' + file.id + '" class="media-item error"><p>' + message + '</p></div>'); 340 344 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 plupload L10n, plupload, _wpPluploadSettings */1 /* global plupload, _wpPluploadSettings */ 2 2 3 3 window.wp = window.wp || {}; 4 4 … … window.wp = window.wp || {}; 120 120 } 121 121 122 122 Uploader.errors.unshift({ 123 message: message || pluploadL10n.default_error,123 message: message || wp.i18n.__( 'An error occurred in the upload. Please try again later.' ), 124 124 data: data, 125 125 file: file 126 126 }); … … window.wp = window.wp || {}; 264 264 try { 265 265 response = JSON.parse( response.response ); 266 266 } 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 ); 268 268 } 269 269 270 270 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 ); 272 272 else if ( ! response.success ) 273 273 return error( response.data && response.data.message, response.data, file ); 274 274 … … window.wp = window.wp || {}; 296 296 * @param {Object} error Contains code, message and sometimes file and other details. 297 297 */ 298 298 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.' ), 300 300 key; 301 301 302 302 // Check for plupload errors. … … window.wp = window.wp || {}; 325 325 326 326 // Map Plupload error codes to user friendly error messages. 327 327 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.' ), 337 337 338 338 '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); 340 341 } 341 342 }; 342 343 -
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 */ 2 2 /* 3 3 * Quicktags 4 4 * … … function edButton(id, display, tagStart, tagEnd, access) { 223 223 224 224 if ( tb.addEventListener ) { 225 225 tb.addEventListener( 'click', onclick, false ); 226 226 227 227 if ( wrap ) { 228 228 wrap.addEventListener( 'click', setActiveEditor, false ); 229 229 } … … function edButton(id, display, tagStart, tagEnd, access) { 582 582 583 583 // the close tags button 584 584 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' ) ); 586 586 }; 587 587 588 588 qt.CloseButton.prototype = new qt.Button(); … … function edButton(id, display, tagStart, tagEnd, access) { 614 614 // the link button 615 615 qt.LinkButton = function() { 616 616 var attr = { 617 ariaLabel: quicktagsL10n.link617 ariaLabel: wp.i18n.__( 'Insert link' ) 618 618 }; 619 619 620 620 qt.TagButton.call( this, 'link', 'link', '', '</a>', '', '', '', attr ); … … function edButton(id, display, tagStart, tagEnd, access) { 633 633 } 634 634 635 635 if ( t.isOpen(ed) === false ) { 636 URL = prompt( quicktagsL10n.enterURL, defaultValue );636 URL = prompt( wp.i18n.__( 'Enter the URL' ), defaultValue ); 637 637 if ( URL ) { 638 638 t.tagStart = '<a href="' + URL + '">'; 639 639 qt.TagButton.prototype.callback.call(t, e, c, ed); … … function edButton(id, display, tagStart, tagEnd, access) { 646 646 // the img button 647 647 qt.ImgButton = function() { 648 648 var attr = { 649 ariaLabel: quicktagsL10n.image649 ariaLabel: wp.i18n.__( 'Insert image' ) 650 650 }; 651 651 652 652 qt.TagButton.call( this, 'img', 'img', '', '', '', '', '', attr ); … … function edButton(id, display, tagStart, tagEnd, access) { 656 656 if ( ! defaultValue ) { 657 657 defaultValue = 'http://'; 658 658 } 659 var src = prompt( quicktagsL10n.enterImageURL, defaultValue), alt;659 var src = prompt( wp.i18n.__( 'Enter the URL of the image' ), defaultValue ), alt; 660 660 if ( src ) { 661 alt = prompt( quicktagsL10n.enterImageDescription, '');661 alt = prompt( wp.i18n.__( 'Enter a description of the image' ), '' ); 662 662 this.tagStart = '<img src="' + src + '" alt="' + alt + '" />'; 663 663 qt.TagButton.prototype.callback.call(this, e, c, ed); 664 664 } 665 665 }; 666 666 667 667 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' ) ); 669 669 }; 670 670 qt.DFWButton.prototype = new qt.Button(); 671 671 qt.DFWButton.prototype.callback = function() { … … function edButton(id, display, tagStart, tagEnd, access) { 679 679 }; 680 680 681 681 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' ) ); 683 683 }; 684 684 qt.TextDirectionButton.prototype = new qt.Button(); 685 685 qt.TextDirectionButton.prototype.callback = function(e, c) { … … function edButton(id, display, tagStart, tagEnd, access) { 695 695 }; 696 696 697 697 // 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' ) } ); 700 700 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' ) } ); 704 704 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' ) } ); 710 710 edButtons[140] = new qt.CloseButton(); 711 711 712 712 })(); -
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) { 45 45 jQuery('.percent', item).html( Math.ceil(bytesDone / bytesTotal * 100) + '%' ); 46 46 47 47 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…' ) + '</strong>'); 49 49 } 50 50 51 51 function prepareMediaItem(fileObj, serverData) { … … function itemAjaxError(id, html) { 154 154 var filename = jQuery('.filename', item).text(); 155 155 156 156 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.__( '“%s” has failed to upload.' ).replace( '%s', filename ) + '</strong><br />' 159 160 + html 160 161 + '</div>'); 161 162 item.find('a.dismiss').click(function(){jQuery(this).parents('.media-item').slideUp(200, function(){jQuery(this).remove();})}); … … function deleteSuccess(data, textStatus) { 187 188 188 189 jQuery('.filename:empty', item).remove(); 189 190 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(); 191 192 jQuery('.filename', item).append( jQuery('a.undo', item).removeClass('hidden') ); 192 193 jQuery('.menu_order_input', item).hide(); 193 194 … … function wpFileError(fileObj, message) { 257 258 var filename = jQuery('.filename', item).text(); 258 259 259 260 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.__( '“%s” has failed to upload.' ).replace( '%s', filename ) + '</strong><br />' 262 264 + message 263 265 + '</div>'); 264 266 item.find('a.dismiss').click(function(){jQuery(this).parents('.media-item').slideUp(200, function(){jQuery(this).remove();})}); … … function wpFileError(fileObj, message) { 267 269 function fileQueueError(fileObj, error_code, message) { 268 270 // Handle this error separately because we don't want to create a FileProgress element for it. 269 271 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.' ) ); 271 273 } 272 274 else if ( error_code == SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT ) { 273 275 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.' ) ); 275 278 } 276 279 else if ( error_code == SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE ) { 277 280 fileQueued(fileObj); 278 wpFileError( fileObj, swfuploadL10n.zero_byte_file);281 wpFileError( fileObj, wp.i18n.__( 'This file is empty. Please try another.' ) ); 279 282 } 280 283 else if ( error_code == SWFUpload.QUEUE_ERROR.INVALID_FILETYPE ) { 281 284 fileQueued(fileObj); 282 wpFileError( fileObj, swfuploadL10n.invalid_filetype);285 wpFileError( fileObj, wp.i18n.__( 'This file type is not allowed. Please try another.' ) ); 283 286 } 284 287 else { 285 wpQueueError( swfuploadL10n.default_error);288 wpQueueError( wp.i18n.__( 'An error occurred in the upload. Please try again later.' ) ); 286 289 } 287 290 } 288 291 … … function uploadError(fileObj, errorCode, message) { 324 327 325 328 switch (errorCode) { 326 329 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.' ) ); 328 331 break; 329 332 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.' ) ); 331 334 break; 332 335 case SWFUpload.UPLOAD_ERROR.HTTP_ERROR: 333 wpQueueError( swfuploadL10n.http_error);336 wpQueueError( wp.i18n.__( 'HTTP error.' ) ); 334 337 break; 335 338 case SWFUpload.UPLOAD_ERROR.UPLOAD_FAILED: 336 wpQueueError( swfuploadL10n.upload_failed);339 wpQueueError( wp.i18n.__( 'Upload failed.' ) ); 337 340 break; 338 341 case SWFUpload.UPLOAD_ERROR.IO_ERROR: 339 wpQueueError( swfuploadL10n.io_error);342 wpQueueError( wp.i18n.__( 'IO error.' ) ); 340 343 break; 341 344 case SWFUpload.UPLOAD_ERROR.SECURITY_ERROR: 342 wpQueueError( swfuploadL10n.security_error);345 wpQueueError( wp.i18n.__( 'Security error.' ) ); 343 346 break; 344 347 case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED: 345 348 case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED: 346 349 jQuery('#media-item-' + fileObj.id).remove(); 347 350 break; 348 351 default: 349 wpFileError( fileObj, swfuploadL10n.default_error);352 wpFileError( fileObj, wp.i18n.__( 'An error occurred in the upload. Please try again later.' ) ); 350 353 } 351 354 } 352 355 -
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 48 48 jQuery("body","html").css({height: "100%", width: "100%"}); 49 49 jQuery("html").css("overflow","hidden"); 50 50 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>"); 52 52 jQuery("#TB_overlay").click(tb_remove); 53 53 } 54 54 }else{//all others … … function tb_show(caption, url, imageGroup) {//function called when the user clic 97 97 if (TB_FoundURL) { 98 98 TB_NextCaption = TB_TempArray[TB_Counter].title; 99 99 TB_NextURL = TB_TempArray[TB_Counter].href; 100 TB_NextHTML = "<span id='TB_next'> <a href='#'>"+ thickboxL10n.next+"</a></span>";100 TB_NextHTML = "<span id='TB_next'> <a href='#'>"+wp.i18n.__( 'Next >' )+"</a></span>"; 101 101 } else { 102 102 TB_PrevCaption = TB_TempArray[TB_Counter].title; 103 103 TB_PrevURL = TB_TempArray[TB_Counter].href; 104 TB_PrevHTML = "<span id='TB_prev'> <a href='#'>" +thickboxL10n.prev+"</a></span>";104 TB_PrevHTML = "<span id='TB_prev'> <a href='#'>" + wp.i18n.__( '< Prev' ) + "</a></span>"; 105 105 } 106 106 } else { 107 107 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 ); 109 110 } 110 111 } 111 112 } … … function tb_show(caption, url, imageGroup) {//function called when the user clic 139 140 140 141 TB_WIDTH = imageWidth + 30; 141 142 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>"); 143 144 144 145 jQuery("#TB_closeWindowButton").click(tb_remove); 145 146 … … function tb_show(caption, url, imageGroup) {//function called when the user clic 204 205 urlNoQuery = url.split('TB_'); 205 206 jQuery("#TB_iframeContent").remove(); 206 207 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>"); 208 209 }else{//iframe modal 209 210 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>"); 211 212 } 212 213 }else{// not an iframe, ajax 213 214 if(jQuery("#TB_window").css("visibility") != "visible"){ 214 215 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>"); 216 217 }else{//ajax modal 217 218 jQuery("#TB_overlay").unbind(); 218 219 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
271 271 editor.nodeChanged(); 272 272 273 273 // Audible confirmation message when a link has been inserted in the Editor. 274 if ( typeof window.wpLinkL10n !== 'undefined' &&! hasLinkError ) {275 speak( w indow.wpLinkL10n.linkInserted);274 if ( ! hasLinkError ) { 275 speak( wp.i18n.__( 'Link inserted.' ) ); 276 276 } 277 277 } ); 278 278 … … 429 429 $input.val( ui.item.permalink ); 430 430 $( element.firstChild.nextSibling ).val( ui.item.title ); 431 431 432 if ( 9 === event.keyCode && typeof window.wpLinkL10n !== 'undefined') {432 if ( 9 === event.keyCode ) { 433 433 // Audible confirmation message when a link has been selected. 434 speak( w indow.wpLinkL10n.linkSelected);434 speak( wp.i18n.__( 'Link selected.' ) ); 435 435 } 436 436 437 437 return false; … … 449 449 my: 'left top+2' 450 450 }, 451 451 messages: { 452 noResults: ( typeof window.uiAutocompleteL10n !== 'undefined' ) ? window.uiAutocompleteL10n.noResults : '',452 noResults: wp.i18n.__( 'No search results.' ), 453 453 results: function( number ) { 454 if ( typeof window.uiAutocompleteL10n !== 'undefined' ) { 455 if ( number > 1 ) { 456 return window.uiAutocompleteL10n.manyResults.replace( '%d', number ); 457 } 458 459 return window.uiAutocompleteL10n.oneResult; 460 } 454 return wp.i18n._n( '%d result found. Use up and down arrow keys to navigate.', '%d results found. Use up and down arrow keys to navigate.', number ).replace( '%d', number ); 461 455 } 462 456 } 463 457 } ).autocomplete( 'instance' )._renderItem = function( ul, item ) { -
src/wp-includes/js/wp-auth-check.js
diff --git src/wp-includes/js/wp-auth-check.js src/wp-includes/js/wp-auth-check.js index 9448a47..0dbc01c 100644
12 12 if ( form.length ) { 13 13 // Add unload confirmation to counter (frame-busting) JS redirects 14 14 $(window).on( 'beforeunload.wp-auth-check', function(e) { 15 e.originalEvent.returnValue = w indow.authcheckL10n.beforeunload;15 e.originalEvent.returnValue = wp.i18n.__( 'Your session has expired. You can log in again from this page or go to the login page.' ); 16 16 }); 17 17 18 18 frame = $('<iframe id="wp-auth-check-frame" frameborder="0">').attr( 'title', noframe.text() ); -
src/wp-includes/js/wp-pointer.js
diff --git src/wp-includes/js/wp-pointer.js src/wp-includes/js/wp-pointer.js index 4cea390..a5b024a 100644
14 14 return $(this).text(); 15 15 }, 16 16 buttons: function( event, t ) { 17 var close = ( wpPointerL10n ) ? wpPointerL10n.dismiss : 'Dismiss',17 var close = wp.i18n.__('Dismiss'), 18 18 button = $('<a class="close" href="#">' + close + '</a>'); 19 19 20 20 return button.bind( 'click.pointer', function(e) { -
src/wp-includes/js/wplink.js
diff --git src/wp-includes/js/wplink.js src/wp-includes/js/wplink.js index db03036..6691e9d 100644
1 1 var wpLink; 2 2 3 ( function( $, wp LinkL10n, wp) {3 ( function( $, wp ) { 4 4 var editor, searchTimer, River, Query, correctedURL, linkNode, 5 5 emailRegexp = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i, 6 6 urlRegexp = /^(https?|ftp):\/\/[A-Z0-9.-]+\.[A-Z]{2,63}[^ "]*$/i, … … var wpLink; 244 244 if ( href !== '_wp_link_placeholder' ) { 245 245 inputs.url.val( href ); 246 246 inputs.openInNewTab.prop( 'checked', '_blank' === editor.dom.getAttrib( linkNode, 'target' ) ); 247 inputs.submit.val( wp LinkL10n.update);247 inputs.submit.val( wp.i18n.__('Update') ); 248 248 } else { 249 249 this.setDefaultValues( linkText ); 250 250 } … … var wpLink; 386 386 textarea.focus(); 387 387 388 388 // Audible confirmation message when a link has been inserted in the Editor. 389 wp.a11y.speak( wp LinkL10n.linkInserted);389 wp.a11y.speak( wp.i18n.__( 'Link inserted.' ) ); 390 390 }, 391 391 392 392 mceUpdate: function() { … … var wpLink; 439 439 } 440 440 441 441 // Audible confirmation message when a link has been inserted in the Editor. 442 wp.a11y.speak( wp LinkL10n.linkInserted);442 wp.a11y.speak( wp.i18n.__( 'Link inserted.' ) ); 443 443 }, 444 444 445 445 updateFields: function( e, li ) { … … var wpLink; 478 478 wpLink.searchInternalLinks(); 479 479 480 480 // Update save prompt. 481 inputs.submit.val( wp LinkL10n.save);481 inputs.submit.val( wp.i18n.__('Add Link') ); 482 482 }, 483 483 484 484 searchInternalLinks: function() { … … var wpLink; 695 695 if ( ! results ) { 696 696 if ( firstPage ) { 697 697 list += '<li class="unselectable no-matches-found"><span class="item-title"><em>' + 698 wp LinkL10n.noMatchesFound+ '</em></span></li>';698 wp.i18n.__('No results found.') + '</em></span></li>'; 699 699 } 700 700 } else { 701 701 $.each( results, function() { … … var wpLink; 704 704 list += classes ? '<li class="' + classes + '">' : '<li>'; 705 705 list += '<input type="hidden" class="item-permalink" value="' + this.permalink + '" />'; 706 706 list += '<span class="item-title">'; 707 list += this.title ? this.title : wp LinkL10n.noTitle;707 list += this.title ? this.title : wp.i18n.__('(no title)'); 708 708 list += '</span><span class="item-info">' + this.info + '</span></li>'; 709 709 alt = ! alt; 710 710 }); … … var wpLink; 771 771 }); 772 772 773 773 $( document ).ready( wpLink.init ); 774 })( jQuery, window.wp LinkL10n, window.wp);774 })( jQuery, window.wp ); -
src/wp-includes/media.php
diff --git src/wp-includes/media.php src/wp-includes/media.php index 99adf74..df483c0 100644
function wp_enqueue_media( $args = array() ) { 3372 3372 } 3373 3373 3374 3374 $strings = array( 3375 // Generic3376 'url' => __( 'URL' ),3377 'addMedia' => __( 'Add Media' ),3378 'search' => __( 'Search' ),3379 'select' => __( 'Select' ),3380 'cancel' => __( 'Cancel' ),3381 'update' => __( 'Update' ),3382 'replace' => __( 'Replace' ),3383 'remove' => __( 'Remove' ),3384 'back' => __( 'Back' ),3385 /* translators: This is a would-be plural string used in the media manager.3386 If there is not a word you can use in your language to avoid issues with the3387 lack of plural support here, turn it into "selected: %d" then translate it.3388 */3389 'selected' => __( '%d selected' ),3390 'dragInfo' => __( 'Drag and drop to reorder media files.' ),3391 3392 // Upload3393 'uploadFilesTitle' => __( 'Upload Files' ),3394 'uploadImagesTitle' => __( 'Upload Images' ),3395 3396 3375 // Library 3397 'mediaLibraryTitle' => __( 'Media Library' ),3398 'insertMediaTitle' => __( 'Insert Media' ),3399 'createNewGallery' => __( 'Create a new gallery' ),3400 'createNewPlaylist' => __( 'Create a new playlist' ),3401 'createNewVideoPlaylist' => __( 'Create a new video playlist' ),3402 'returnToLibrary' => __( '← Return to library' ),3403 'allMediaItems' => __( 'All media items' ),3404 'allDates' => __( 'All dates' ),3405 'noItemsFound' => __( 'No items found.' ),3406 3376 'insertIntoPost' => $post_type_object->labels->insert_into_item, 3407 'unattached' => __( 'Unattached' ),3408 'trash' => _x( 'Trash', 'noun' ),3409 3377 'uploadedToThisPost' => $post_type_object->labels->uploaded_to_this_item, 3410 'warnDelete' => __( "You are about to permanently delete this item.\n 'Cancel' to stop, 'OK' to delete." ),3411 'warnBulkDelete' => __( "You are about to permanently delete these items.\n 'Cancel' to stop, 'OK' to delete." ),3412 'warnBulkTrash' => __( "You are about to trash these items.\n 'Cancel' to stop, 'OK' to delete." ),3413 'bulkSelect' => __( 'Bulk Select' ),3414 'cancelSelection' => __( 'Cancel Selection' ),3415 'trashSelected' => __( 'Trash Selected' ),3416 'untrashSelected' => __( 'Untrash Selected' ),3417 'deleteSelected' => __( 'Delete Selected' ),3418 'deletePermanently' => __( 'Delete Permanently' ),3419 'apply' => __( 'Apply' ),3420 'filterByDate' => __( 'Filter by date' ),3421 'filterByType' => __( 'Filter by type' ),3422 'searchMediaLabel' => __( 'Search Media' ),3423 'noMedia' => __( 'No media files found.' ),3424 3425 // Library Details3426 'attachmentDetails' => __( 'Attachment Details' ),3427 3428 // From URL3429 'insertFromUrlTitle' => __( 'Insert from URL' ),3430 3378 3431 3379 // Featured Images 3432 3380 'setFeaturedImageTitle' => $post_type_object->labels->featured_image, 3433 3381 'setFeaturedImage' => $post_type_object->labels->set_featured_image, 3434 3435 // Gallery3436 'createGalleryTitle' => __( 'Create Gallery' ),3437 'editGalleryTitle' => __( 'Edit Gallery' ),3438 'cancelGalleryTitle' => __( '← Cancel Gallery' ),3439 'insertGallery' => __( 'Insert gallery' ),3440 'updateGallery' => __( 'Update gallery' ),3441 'addToGallery' => __( 'Add to gallery' ),3442 'addToGalleryTitle' => __( 'Add to Gallery' ),3443 'reverseOrder' => __( 'Reverse order' ),3444 3445 // Edit Image3446 'imageDetailsTitle' => __( 'Image Details' ),3447 'imageReplaceTitle' => __( 'Replace Image' ),3448 'imageDetailsCancel' => __( 'Cancel Edit' ),3449 'editImage' => __( 'Edit Image' ),3450 3451 // Crop Image3452 'chooseImage' => __( 'Choose Image' ),3453 'selectAndCrop' => __( 'Select and Crop' ),3454 'skipCropping' => __( 'Skip Cropping' ),3455 'cropImage' => __( 'Crop Image' ),3456 'cropYourImage' => __( 'Crop your image' ),3457 'cropping' => __( 'Cropping…' ),3458 'suggestedDimensions' => __( 'Suggested image dimensions:' ),3459 'cropError' => __( 'There has been an error cropping your image.' ),3460 3461 // Edit Audio3462 'audioDetailsTitle' => __( 'Audio Details' ),3463 'audioReplaceTitle' => __( 'Replace Audio' ),3464 'audioAddSourceTitle' => __( 'Add Audio Source' ),3465 'audioDetailsCancel' => __( 'Cancel Edit' ),3466 3467 // Edit Video3468 'videoDetailsTitle' => __( 'Video Details' ),3469 'videoReplaceTitle' => __( 'Replace Video' ),3470 'videoAddSourceTitle' => __( 'Add Video Source' ),3471 'videoDetailsCancel' => __( 'Cancel Edit' ),3472 'videoSelectPosterImageTitle' => __( 'Select Poster Image' ),3473 'videoAddTrackTitle' => __( 'Add Subtitles' ),3474 3475 // Playlist3476 'playlistDragInfo' => __( 'Drag and drop to reorder tracks.' ),3477 'createPlaylistTitle' => __( 'Create Audio Playlist' ),3478 'editPlaylistTitle' => __( 'Edit Audio Playlist' ),3479 'cancelPlaylistTitle' => __( '← Cancel Audio Playlist' ),3480 'insertPlaylist' => __( 'Insert audio playlist' ),3481 'updatePlaylist' => __( 'Update audio playlist' ),3482 'addToPlaylist' => __( 'Add to audio playlist' ),3483 'addToPlaylistTitle' => __( 'Add to Audio Playlist' ),3484 3485 // Video Playlist3486 'videoPlaylistDragInfo' => __( 'Drag and drop to reorder videos.' ),3487 'createVideoPlaylistTitle' => __( 'Create Video Playlist' ),3488 'editVideoPlaylistTitle' => __( 'Edit Video Playlist' ),3489 'cancelVideoPlaylistTitle' => __( '← Cancel Video Playlist' ),3490 'insertVideoPlaylist' => __( 'Insert video playlist' ),3491 'updateVideoPlaylist' => __( 'Update video playlist' ),3492 'addToVideoPlaylist' => __( 'Add to video playlist' ),3493 'addToVideoPlaylistTitle' => __( 'Add to Video Playlist' ),3494 3382 ); 3495 3383 3496 3384 /** -
src/wp-includes/script-loader.php
diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php index a7019b0..1593a3e 100644
function wp_default_scripts( &$scripts ) { 75 75 'secure' => (string) ( 'https' === parse_url( site_url(), PHP_URL_SCHEME ) ), 76 76 ) ); 77 77 78 $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils'), false, 1 ); 79 did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array( 80 'warnDelete' => __( "You are about to permanently delete these items.\n 'Cancel' to stop, 'OK' to delete." ), 81 'dismiss' => __( 'Dismiss this notice.' ), 82 ) ); 78 $scripts->add( 'common', "/wp-admin/js/common$suffix.js", array('jquery', 'hoverIntent', 'utils', 'wp-i18n' ), false, 1 ); 83 79 84 80 $scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 ); 85 81 86 82 $scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1 ); 87 83 88 $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", array(), false, 1 ); 89 did_action( 'init' ) && $scripts->localize( 'quicktags', 'quicktagsL10n', array( 90 'closeAllOpenTags' => __( 'Close all open tags' ), 91 'closeTags' => __( 'close tags' ), 92 'enterURL' => __( 'Enter the URL' ), 93 'enterImageURL' => __( 'Enter the URL of the image' ), 94 'enterImageDescription' => __( 'Enter a description of the image' ), 95 'textdirection' => __( 'text direction' ), 96 'toggleTextdirection' => __( 'Toggle Editor Text Direction' ), 97 'dfw' => __( 'Distraction-free writing mode' ), 98 'strong' => __( 'Bold' ), 99 'strongClose' => __( 'Close bold tag' ), 100 'em' => __( 'Italic' ), 101 'emClose' => __( 'Close italic tag' ), 102 'link' => __( 'Insert link' ), 103 'blockquote' => __( 'Blockquote' ), 104 'blockquoteClose' => __( 'Close blockquote tag' ), 105 'del' => __( 'Deleted text (strikethrough)' ), 106 'delClose' => __( 'Close deleted text tag' ), 107 'ins' => __( 'Inserted text' ), 108 'insClose' => __( 'Close inserted text tag' ), 109 'image' => __( 'Insert image' ), 110 'ul' => __( 'Bulleted list' ), 111 'ulClose' => __( 'Close bulleted list tag' ), 112 'ol' => __( 'Numbered list' ), 113 'olClose' => __( 'Close numbered list tag' ), 114 'li' => __( 'List item' ), 115 'liClose' => __( 'Close list item tag' ), 116 'code' => __( 'Code' ), 117 'codeClose' => __( 'Close code tag' ), 118 'more' => __( 'Insert Read More tag' ), 119 ) ); 84 $scripts->add( 'quicktags', "/wp-includes/js/quicktags$suffix.js", array( 'wp-i18n' ), false, 1 ); 120 85 121 86 $scripts->add( 'colorpicker', "/wp-includes/js/colorpicker$suffix.js", array('prototype'), '3517m' ); 122 87 … … function wp_default_scripts( &$scripts ) { 131 96 'broken' => __('An unidentified error has occurred.') 132 97 ) ); 133 98 134 $scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position' ), '20111129a', 1 ); 135 did_action( 'init' ) && $scripts->localize( 'wp-pointer', 'wpPointerL10n', array( 136 'dismiss' => __('Dismiss'), 137 ) ); 99 $scripts->add( 'wp-pointer', "/wp-includes/js/wp-pointer$suffix.js", array( 'jquery-ui-widget', 'jquery-ui-position', 'wp-i18n' ), '20111129a', 1 ); 138 100 139 101 $scripts->add( 'autosave', "/wp-includes/js/autosave$suffix.js", array('heartbeat'), false, 1 ); 140 102 … … function wp_default_scripts( &$scripts ) { 152 114 153 115 $scripts->add( 'wp-auth-check', "/wp-includes/js/wp-auth-check$suffix.js", array('heartbeat'), false, 1 ); 154 116 did_action( 'init' ) && $scripts->localize( 'wp-auth-check', 'authcheckL10n', array( 155 'beforeunload' => __('Your session has expired. You can log in again from this page or go to the login page.'),156 157 117 /** 158 118 * Filters the authentication check interval. 159 119 * … … function wp_default_scripts( &$scripts ) { 179 139 $scripts->add( 'scriptaculous', false, array('scriptaculous-dragdrop', 'scriptaculous-slider', 'scriptaculous-controls') ); 180 140 181 141 // not used in core, replaced by Jcrop.js 182 $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array( 'scriptaculous-dragdrop') );142 $scripts->add( 'cropper', '/wp-includes/js/crop/cropper.js', array( 'scriptaculous-dragdrop', 'wp-i18n' ) ); 183 143 184 144 // jQuery 185 145 $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.12.4' ); … … function wp_default_scripts( &$scripts ) { 207 167 $scripts->add( 'jquery-effects-transfer', "/wp-includes/js/jquery/ui/effect-transfer$dev_suffix.js", array('jquery-effects-core'), '1.11.4', 1 ); 208 168 209 169 $scripts->add( 'jquery-ui-accordion', "/wp-includes/js/jquery/ui/accordion$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 ); 210 $scripts->add( 'jquery-ui-autocomplete', "/wp-includes/js/jquery/ui/autocomplete$dev_suffix.js", array( 'jquery-ui-menu', 'wp-a11y' ), '1.11.4', 1 );170 $scripts->add( 'jquery-ui-autocomplete', "/wp-includes/js/jquery/ui/autocomplete$dev_suffix.js", array( 'jquery-ui-menu', 'wp-a11y', 'wp-i18n' ), '1.11.4', 1 ); 211 171 $scripts->add( 'jquery-ui-button', "/wp-includes/js/jquery/ui/button$dev_suffix.js", array('jquery-ui-core', 'jquery-ui-widget'), '1.11.4', 1 ); 212 172 $scripts->add( 'jquery-ui-datepicker', "/wp-includes/js/jquery/ui/datepicker$dev_suffix.js", array('jquery-ui-core'), '1.11.4', 1 ); 213 173 $scripts->add( 'jquery-ui-dialog', "/wp-includes/js/jquery/ui/dialog$dev_suffix.js", array('jquery-ui-resizable', 'jquery-ui-draggable', 'jquery-ui-button', 'jquery-ui-position'), '1.11.4', 1 ); … … function wp_default_scripts( &$scripts ) { 227 187 $scripts->add( 'jquery-ui-tooltip', "/wp-includes/js/jquery/ui/tooltip$dev_suffix.js", array( 'jquery-ui-core', 'jquery-ui-widget', 'jquery-ui-position' ), '1.11.4', 1 ); 228 188 $scripts->add( 'jquery-ui-widget', "/wp-includes/js/jquery/ui/widget$dev_suffix.js", array('jquery'), '1.11.4', 1 ); 229 189 230 // Strings for 'jquery-ui-autocomplete' live region messages231 did_action( 'init' ) && $scripts->localize( 'jquery-ui-autocomplete', 'uiAutocompleteL10n', array(232 'noResults' => __( 'No search results.' ),233 /* translators: Number of results found when using jQuery UI Autocomplete */234 'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ),235 /* translators: %d: Number of results found when using jQuery UI Autocomplete */236 'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ),237 ) );238 239 190 // deprecated, not used in core, most functionality is included in jQuery 1.3 240 191 $scripts->add( 'jquery-form', "/wp-includes/js/jquery/jquery.form$suffix.js", array('jquery'), '3.37.0', 1 ); 241 192 … … function wp_default_scripts( &$scripts ) { 255 206 $scripts->add( 'masonry', "/wp-includes/js/masonry.min.js", array( 'imagesloaded' ), '3.3.2', 1 ); 256 207 $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry$dev_suffix.js", array( 'jquery', 'masonry' ), '3.1.2b', 1 ); 257 208 258 $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array( 'jquery'), '3.1-20121105', 1 );209 $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array( 'jquery', 'wp-i18n' ), '3.1-20121105', 1 ); 259 210 did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array( 260 'next' => __('Next >'),261 'prev' => __('< Prev'),262 'image' => __('Image'),263 'of' => __('of'),264 'close' => __('Close'),265 'noiframes' => __('This feature requires inline frames. You have iframes disabled or your browser does not support them.'),266 211 'loadingAnimation' => includes_url('js/thickbox/loadingAnimation.gif'), 267 212 ) ); 268 213 … … function wp_default_scripts( &$scripts ) { 270 215 271 216 $scripts->add( 'swfobject', "/wp-includes/js/swfobject.js", array(), '2.2-20120417'); 272 217 273 // error message for both plupload and swfupload274 $uploader_l10n = array(275 'queue_limit_exceeded' => __('You have attempted to queue too many files.'),276 'file_exceeds_size_limit' => __('%s exceeds the maximum upload size for this site.'),277 'zero_byte_file' => __('This file is empty. Please try another.'),278 'invalid_filetype' => __('This file type is not allowed. Please try another.'),279 'not_an_image' => __('This file is not an image. Please try another.'),280 'image_memory_exceeded' => __('Memory exceeded. Please try another smaller file.'),281 'image_dimensions_exceeded' => __('This is larger than the maximum size. Please try another.'),282 'default_error' => __('An error occurred in the upload. Please try again later.'),283 'missing_upload_url' => __('There was a configuration error. Please contact the server administrator.'),284 'upload_limit_exceeded' => __('You may only upload 1 file.'),285 'http_error' => __('HTTP error.'),286 'upload_failed' => __('Upload failed.'),287 'big_upload_failed' => __('Please try uploading this file with the %1$sbrowser uploader%2$s.'),288 'big_upload_queued' => __('%s exceeds the maximum upload size for the multi-file uploader when used in your browser.'),289 'io_error' => __('IO error.'),290 'security_error' => __('Security error.'),291 'file_cancelled' => __('File canceled.'),292 'upload_stopped' => __('Upload stopped.'),293 'dismiss' => __('Dismiss'),294 'crunching' => __('Crunching…'),295 'deleted' => __('moved to the trash.'),296 'error_uploading' => __('“%s” has failed to upload.')297 );298 299 218 $scripts->add( 'plupload', '/wp-includes/js/plupload/plupload.full.min.js', array(), '2.1.8' ); 300 219 // Back compat handles: 301 220 foreach ( array( 'all', 'html5', 'flash', 'silverlight', 'html4' ) as $handle ) { … … function wp_default_scripts( &$scripts ) { 303 222 } 304 223 305 224 $scripts->add( 'plupload-handlers', "/wp-includes/js/plupload/handlers$suffix.js", array( 'plupload', 'jquery' ) ); 306 did_action( 'init' ) && $scripts->localize( 'plupload-handlers', 'pluploadL10n', $uploader_l10n );307 225 308 $scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models' ), false, 1 ); 309 did_action( 'init' ) && $scripts->localize( 'wp-plupload', 'pluploadL10n', $uploader_l10n ); 226 $scripts->add( 'wp-plupload', "/wp-includes/js/plupload/wp-plupload$suffix.js", array( 'plupload', 'jquery', 'json2', 'media-models', 'wp-i18n' ), false, 1 ); 310 227 311 228 // keep 'swfupload' for back-compat. 312 229 $scripts->add( 'swfupload', '/wp-includes/js/swfupload/swfupload.js', array(), '2201-20110113'); … … function wp_default_scripts( &$scripts ) { 314 231 $scripts->add( 'swfupload-queue', '/wp-includes/js/swfupload/plugins/swfupload.queue.js', array('swfupload'), '2201'); 315 232 $scripts->add( 'swfupload-speed', '/wp-includes/js/swfupload/plugins/swfupload.speed.js', array('swfupload'), '2201'); 316 233 $scripts->add( 'swfupload-all', false, array('swfupload', 'swfupload-swfobject', 'swfupload-queue'), '2201'); 317 $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array('swfupload-all', 'jquery'), '2201-20110524'); 318 did_action( 'init' ) && $scripts->localize( 'swfupload-handlers', 'swfuploadL10n', $uploader_l10n ); 234 $scripts->add( 'swfupload-handlers', "/wp-includes/js/swfupload/handlers$suffix.js", array( 'swfupload-all', 'jquery', 'wp-i18n' ), '2201-20110524'); 319 235 320 236 $scripts->add( 'comment-reply', "/wp-includes/js/comment-reply$suffix.js", array(), false, 1 ); 321 237 … … function wp_default_scripts( &$scripts ) { 390 306 'src' => empty( $guessed_url ) ? includes_url( '/js/zxcvbn.min.js' ) : $scripts->base_url . '/wp-includes/js/zxcvbn.min.js', 391 307 ) ); 392 308 393 $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async' ), false, 1 ); 394 did_action( 'init' ) && $scripts->localize( 'password-strength-meter', 'pwsL10n', array( 395 'unknown' => _x( 'Password strength unknown', 'password strength' ), 396 'short' => _x( 'Very weak', 'password strength' ), 397 'bad' => _x( 'Weak', 'password strength' ), 398 'good' => _x( 'Medium', 'password strength' ), 399 'strong' => _x( 'Strong', 'password strength' ), 400 'mismatch' => _x( 'Mismatch', 'password mismatch' ), 401 ) ); 309 $scripts->add( 'password-strength-meter', "/wp-admin/js/password-strength-meter$suffix.js", array( 'jquery', 'zxcvbn-async', 'wp-i18n' ), false, 1 ); 402 310 403 $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 ); 404 did_action( 'init' ) && $scripts->localize( 'user-profile', 'userProfileL10n', array( 405 'warn' => __( 'Your new password has not been saved.' ), 406 'warnWeak' => __( 'Confirm use of weak password' ), 407 'show' => __( 'Show' ), 408 'hide' => __( 'Hide' ), 409 'cancel' => __( 'Cancel' ), 410 'ariaShow' => esc_attr__( 'Show password' ), 411 'ariaHide' => esc_attr__( 'Hide password' ), 412 ) ); 311 $scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util', 'wp-i18n' ), false, 1 ); 413 312 414 313 $scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 ); 415 314 … … function wp_default_scripts( &$scripts ) { 417 316 418 317 $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array(), false, 1 ); 419 318 420 $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); 421 did_action( 'init' ) && $scripts->localize( 'wplink', 'wpLinkL10n', array( 422 'title' => __('Insert/edit link'), 423 'update' => __('Update'), 424 'save' => __('Add Link'), 425 'noTitle' => __('(no title)'), 426 'noMatchesFound' => __('No results found.'), 427 'linkSelected' => __( 'Link selected.' ), 428 'linkInserted' => __( 'Link inserted.' ), 429 ) ); 319 $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y', 'wp-i18n' ), false, 1 ); 430 320 431 321 $scripts->add( 'wpdialogs', "/wp-includes/js/wpdialog$suffix.js", array( 'jquery-ui-dialog' ), false, 1 ); 432 322 433 $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( ), false, 1 );323 $scripts->add( 'word-count', "/wp-admin/js/word-count$suffix.js", array( 'wp-i18n' ), false, 1 ); 434 324 did_action( 'init' ) && $scripts->localize( 'word-count', 'wordCountL10n', array( 435 /*436 * translators: If your word count is based on single characters (e.g. East Asian characters),437 * enter 'characters_excluding_spaces' or 'characters_including_spaces'. Otherwise, enter 'words'.438 * Do not translate into your own language.439 */440 'type' => _x( 'words', 'Word count type. Do not translate!' ),441 325 'shortcodes' => ! empty( $GLOBALS['shortcode_tags'] ) ? array_keys( $GLOBALS['shortcode_tags'] ) : array() 442 326 ) ); 443 327 … … function wp_default_scripts( &$scripts ) { 450 334 $scripts->add( 'customize-preview', "/wp-includes/js/customize-preview$suffix.js", array( 'customize-base' ), false, 1 ); 451 335 $scripts->add( 'customize-models', "/wp-includes/js/customize-models.js", array( 'underscore', 'backbone' ), false, 1 ); 452 336 $scripts->add( 'customize-views', "/wp-includes/js/customize-views.js", array( 'jquery', 'underscore', 'imgareaselect', 'customize-models', 'media-editor', 'media-views' ), false, 1 ); 453 $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base', 'wp-a11y', 'wp-util' ), false, 1 ); 454 did_action( 'init' ) && $scripts->localize( 'customize-controls', '_wpCustomizeControlsL10n', array( 455 'activate' => __( 'Save & Activate' ), 456 'save' => __( 'Save & Publish' ), 457 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), 458 'saved' => __( 'Saved' ), 459 'cancel' => __( 'Cancel' ), 460 'close' => __( 'Close' ), 461 'cheatin' => __( 'Cheatin’ uh?' ), 462 'notAllowed' => __( 'Sorry, you are not allowed to customize this site.' ), 463 'previewIframeTitle' => __( 'Site Preview' ), 464 'loginIframeTitle' => __( 'Session expired' ), 465 'collapseSidebar' => __( 'Collapse Sidebar' ), 466 'expandSidebar' => __( 'Expand Sidebar' ), 467 'untitledBlogName' => __( '(Untitled)' ), 468 // Used for overriding the file types allowed in plupload. 469 'allowedFiles' => __( 'Allowed Files' ), 470 ) ); 337 $scripts->add( 'customize-controls', "/wp-admin/js/customize-controls$suffix.js", array( 'customize-base', 'wp-a11y', 'wp-util', 'wp-i18n' ), false, 1 ); 471 338 $scripts->add( 'customize-selective-refresh', "/wp-includes/js/customize-selective-refresh$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 ); 472 339 473 $scripts->add( 'customize-widgets', "/wp-admin/js/customize-widgets$suffix.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-droppable', 'wp-backbone', 'customize-controls' ), false, 1 );340 $scripts->add( 'customize-widgets', "/wp-admin/js/customize-widgets$suffix.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-droppable', 'wp-backbone', 'customize-controls', 'wp-i18n' ), false, 1 ); 474 341 $scripts->add( 'customize-preview-widgets', "/wp-includes/js/customize-preview-widgets$suffix.js", array( 'jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh' ), false, 1 ); 475 342 476 $scripts->add( 'customize-nav-menus', "/wp-admin/js/customize-nav-menus$suffix.js", array( 'jquery', 'wp-backbone', 'customize-controls', 'accordion', 'nav-menu' ), false, 1 );343 $scripts->add( 'customize-nav-menus', "/wp-admin/js/customize-nav-menus$suffix.js", array( 'jquery', 'wp-backbone', 'customize-controls', 'accordion', 'nav-menu', 'wp-i18n' ), false, 1 ); 477 344 $scripts->add( 'customize-preview-nav-menus', "/wp-includes/js/customize-preview-nav-menus$suffix.js", array( 'jquery', 'wp-util', 'customize-preview', 'customize-selective-refresh' ), false, 1 ); 478 345 479 346 $scripts->add( 'accordion', "/wp-admin/js/accordion$suffix.js", array( 'jquery' ), false, 1 ); … … function wp_default_scripts( &$scripts ) { 483 350 did_action( 'init' ) && $scripts->localize( 'media-models', '_wpMediaModelsL10n', array( 484 351 'settings' => array( 485 352 'ajaxurl' => admin_url( 'admin-ajax.php', 'relative' ), 486 'post' => array( 'id' => 0 ),353 'post' => array( 'id' => 0 ), 487 354 ), 488 355 ) ); 489 356 … … function wp_default_scripts( &$scripts ) { 497 364 $scripts->add( 'mce-view', "/wp-includes/js/mce-view$suffix.js", array( 'shortcode', 'jquery', 'media-views', 'media-audiovideo' ), false, 1 ); 498 365 499 366 if ( is_admin() ) { 500 $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response' ), false, 1 ); 501 did_action( 'init' ) && $scripts->localize( 'admin-tags', 'tagsl10n', array( 502 'noPerm' => __('Sorry, you are not allowed to do that.'), 503 'broken' => __('An unidentified error has occurred.') 504 )); 367 $scripts->add( 'admin-tags', "/wp-admin/js/tags$suffix.js", array( 'jquery', 'wp-ajax-response', 'wp-i18n' ), false, 1 ); 505 368 506 $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array( 'wp-lists', 'quicktags', 'jquery-query'), false, 1 );369 $scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array( 'wp-lists', 'quicktags', 'jquery-query', 'wp-i18n' ), false, 1 ); 507 370 did_action( 'init' ) && $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( 508 371 'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']), 509 372 'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']), 510 'replyApprove' => __( 'Approve and Reply' ),511 'reply' => __( 'Reply' ),512 'warnQuickEdit' => __( "Are you sure you want to edit this comment?\nThe changes you made will be lost." ),513 'warnCommentChanges' => __( "Are you sure you want to do this?\nThe comment changes you made will be lost." ),514 'docTitleComments' => __( 'Comments' ),515 /* translators: %s: comments count */516 'docTitleCommentsCount' => __( 'Comments (%s)' ),517 373 ) ); 518 374 519 375 $scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), false, 1 ); 520 376 521 $scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array('jquery-ui-sortable'), false, 1 ); 522 did_action( 'init' ) && $scripts->localize( 'postbox', 'postBoxL10n', array( 523 'postBoxEmptyString' => __( 'Drag boxes here' ), 524 ) ); 377 $scripts->add( 'postbox', "/wp-admin/js/postbox$suffix.js", array( 'jquery-ui-sortable', 'wp-i18n' ), false, 1 ); 525 378 526 $scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'suggest' ), false, 1 ); 527 did_action( 'init' ) && $scripts->localize( 'tags-box', 'tagsBoxL10n', array( 528 'tagDelimiter' => _x( ',', 'tag delimiter' ), 529 ) ); 379 $scripts->add( 'tags-box', "/wp-admin/js/tags-box$suffix.js", array( 'jquery', 'suggest', 'wp-i18n' ), false, 1 ); 530 380 531 $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y' ), false, 1 ); 532 did_action( 'init' ) && $scripts->localize( 'post', 'postL10n', array( 533 'ok' => __('OK'), 534 'cancel' => __('Cancel'), 535 'publishOn' => __('Publish on:'), 536 'publishOnFuture' => __('Schedule for:'), 537 'publishOnPast' => __('Published on:'), 538 /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */ 539 'dateFormat' => __('%1$s %2$s, %3$s @ %4$s:%5$s'), 540 'showcomm' => __('Show more comments'), 541 'endcomm' => __('No more comments found.'), 542 'publish' => __('Publish'), 543 'schedule' => __('Schedule'), 544 'update' => __('Update'), 545 'savePending' => __('Save as Pending'), 546 'saveDraft' => __('Save Draft'), 547 'private' => __('Private'), 548 'public' => __('Public'), 549 'publicSticky' => __('Public, Sticky'), 550 'password' => __('Password Protected'), 551 'privatelyPublished' => __('Privately Published'), 552 'published' => __('Published'), 553 'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'), 554 'savingText' => __('Saving Draft…'), 555 'permalinkSaved' => __( 'Permalink saved' ), 556 ) ); 381 $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y', 'wp-i18n' ), false, 1 ); 557 382 558 $scripts->add( 'press-this', "/wp-admin/js/press-this$suffix.js", array( 'jquery', 'tags-box' ), false, 1 ); 559 did_action( 'init' ) && $scripts->localize( 'press-this', 'pressThisL10n', array( 560 'newPost' => __( 'Title' ), 561 'serverError' => __( 'Connection lost or the server is busy. Please try again later.' ), 562 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), 563 /* translators: %d: nth embed found in a post */ 564 'suggestedEmbedAlt' => __( 'Suggested embed #%d' ), 565 /* translators: %d: nth image found in a post */ 566 'suggestedImgAlt' => __( 'Suggested image #%d' ), 567 ) ); 383 $scripts->add( 'press-this', "/wp-admin/js/press-this$suffix.js", array( 'jquery', 'tags-box', 'wp-i18n' ), false, 1 ); 568 384 569 385 $scripts->add( 'editor-expand', "/wp-admin/js/editor-expand$suffix.js", array( 'jquery', 'underscore' ), false, 1 ); 570 386 571 387 $scripts->add( 'link', "/wp-admin/js/link$suffix.js", array( 'wp-lists', 'postbox' ), false, 1 ); 572 388 573 $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox' ) );389 $scripts->add( 'comment', "/wp-admin/js/comment$suffix.js", array( 'jquery', 'postbox', 'wp-i18n' ) ); 574 390 $scripts->add_data( 'comment', 'group', 1 ); 575 did_action( 'init' ) && $scripts->localize( 'comment', 'commentL10n', array(576 'submittedOn' => __( 'Submitted on:' ),577 /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */578 'dateFormat' => __( '%1$s %2$s, %3$s @ %4$s:%5$s' )579 ) );580 391 581 392 $scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) ); 582 393 583 394 $scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 ); 584 395 585 $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y' ), false, 1 );396 $scripts->add( 'theme', "/wp-admin/js/theme$suffix.js", array( 'wp-backbone', 'wp-a11y', 'wp-i18n' ), false, 1 ); 586 397 587 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest', 'wp-a11y' ), false, 1 ); 588 did_action( 'init' ) && $scripts->localize( 'inline-edit-post', 'inlineEditL10n', array( 589 'error' => __( 'Error while saving the changes.' ), 590 'ntdeltitle' => __( 'Remove From Bulk Edit' ), 591 'notitle' => __( '(no title)' ), 592 'comma' => trim( _x( ',', 'tag delimiter' ) ), 593 'saved' => __( 'Changes saved.' ), 594 ) ); 398 $scripts->add( 'inline-edit-post', "/wp-admin/js/inline-edit-post$suffix.js", array( 'jquery', 'suggest', 'wp-a11y', 'wp-i18n' ), false, 1 ); 595 399 596 $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); 597 did_action( 'init' ) && $scripts->localize( 'inline-edit-tax', 'inlineEditL10n', array( 598 'error' => __( 'Error while saving the changes.' ), 599 'saved' => __( 'Changes saved.' ), 600 ) ); 400 $scripts->add( 'inline-edit-tax', "/wp-admin/js/inline-edit-tax$suffix.js", array( 'jquery', 'wp-a11y', 'wp-i18n' ), false, 1 ); 601 401 602 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox' ), false, 1 ); 603 did_action( 'init' ) && $scripts->localize( 'plugin-install', 'plugininstallL10n', array( 604 'plugin_information' => __( 'Plugin:' ), 605 'plugin_modal_label' => __( 'Plugin details' ), 606 'ays' => __('Are you sure you want to install this plugin?') 607 ) ); 402 $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'jquery-ui-core', 'thickbox', 'wp-i18n' ), false, 1 ); 608 403 609 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ) );404 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y', 'wp-i18n' ) ); 610 405 did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array( 611 406 'ajax_nonce' => wp_create_nonce( 'updates' ), 612 'l10n' => array( 613 /* translators: %s: Search string */ 614 'searchResults' => __( 'Search results for “%s”' ), 615 'searchResultsLabel' => __( 'Search Results' ), 616 'noPlugins' => __( 'You do not appear to have any plugins available at this time.' ), 617 'noItemsSelected' => __( 'Please select at least one item to perform this action on.' ), 618 'updating' => __( 'Updating...' ), // No ellipsis. 619 'updated' => __( 'Updated!' ), 620 'update' => __( 'Update' ), 621 'updateNow' => __( 'Update Now' ), 622 /* translators: %s: Plugin name and version */ 623 'updateNowLabel' => __( 'Update %s now' ), 624 'updateFailedShort' => __( 'Update Failed!' ), 625 /* translators: %s: Error string for a failed update */ 626 'updateFailed' => __( 'Update Failed: %s' ), 627 /* translators: %s: Plugin name and version */ 628 'updatingLabel' => __( 'Updating %s...' ), // No ellipsis. 629 /* translators: %s: Plugin name and version */ 630 'updatedLabel' => __( '%s updated!' ), 631 /* translators: %s: Plugin name and version */ 632 'updateFailedLabel' => __( '%s update failed' ), 633 /* translators: JavaScript accessible string */ 634 'updatingMsg' => __( 'Updating... please wait.' ), // No ellipsis. 635 /* translators: JavaScript accessible string */ 636 'updatedMsg' => __( 'Update completed successfully.' ), 637 /* translators: JavaScript accessible string */ 638 'updateCancel' => __( 'Update canceled.' ), 639 'beforeunload' => __( 'Updates may not complete if you navigate away from this page.' ), 640 'installNow' => __( 'Install Now' ), 641 /* translators: %s: Plugin name */ 642 'installNowLabel' => __( 'Install %s now' ), 643 'installing' => __( 'Installing...' ), 644 'installed' => __( 'Installed!' ), 645 'installFailedShort' => __( 'Install Failed!' ), 646 /* translators: %s: Error string for a failed installation */ 647 'installFailed' => __( 'Installation failed: %s' ), 648 /* translators: %s: Plugin name and version */ 649 'pluginInstallingLabel' => _x( 'Installing %s...', 'plugin' ), // no ellipsis 650 /* translators: %s: Theme name and version */ 651 'themeInstallingLabel' => _x( 'Installing %s...', 'theme' ), // no ellipsis 652 /* translators: %s: Plugin name and version */ 653 'pluginInstalledLabel' => _x( '%s installed!', 'plugin' ), 654 /* translators: %s: Theme name and version */ 655 'themeInstalledLabel' => _x( '%s installed!', 'theme' ), 656 /* translators: %s: Plugin name and version */ 657 'pluginInstallFailedLabel' => _x( '%s installation failed', 'plugin' ), 658 /* translators: %s: Theme name and version */ 659 'themeInstallFailedLabel' => _x( '%s installation failed', 'theme' ), 660 'installingMsg' => __( 'Installing... please wait.' ), 661 'installedMsg' => __( 'Installation completed successfully.' ), 662 /* translators: %s: Activation URL */ 663 'importerInstalledMsg' => __( 'Importer installed successfully. <a href="%s">Run importer</a>' ), 664 /* translators: %s: Theme name */ 665 'aysDelete' => __( 'Are you sure you want to delete %s?' ), 666 /* translators: %s: Plugin name */ 667 'aysDeleteUninstall' => __( 'Are you sure you want to delete %s and its data?' ), 668 'aysBulkDelete' => __( 'Are you sure you want to delete the selected plugins and their data?' ), 669 'aysBulkDeleteThemes' => __( 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?' ), 670 'deleting' => __( 'Deleting...' ), 671 /* translators: %s: Error string for a failed deletion */ 672 'deleteFailed' => __( 'Deletion failed: %s' ), 673 'deleted' => __( 'Deleted!' ), 674 'livePreview' => __( 'Live Preview' ), 675 'activatePlugin' => is_network_admin() ? __( 'Network Activate' ) : __( 'Activate' ), 676 'activateTheme' => is_network_admin() ? __( 'Network Enable' ) : __( 'Activate' ), 677 /* translators: %s: Plugin name */ 678 'activatePluginLabel' => is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate %s', 'plugin' ), 679 /* translators: %s: Theme name */ 680 'activateThemeLabel' => is_network_admin() ? _x( 'Network Activate %s', 'theme' ) : _x( 'Activate %s', 'theme' ), 681 'activateImporter' => __( 'Run Importer' ), 682 /* translators: %s: Importer name */ 683 'activateImporterLabel' => __( 'Run %s' ), 684 'unknownError' => __( 'An unknown error occurred' ), 685 'connectionError' => __( 'Connection lost or the server is busy. Please try again later.' ), 686 'nonceError' => __( 'An error has occurred. Please reload the page and try again.' ), 687 'pluginsFound' => __( 'Number of plugins found: %d' ), 688 'noPluginsFound' => __( 'No plugins found. Try a different search.' ), 689 ), 407 'isNetworkAdmin' => is_network_admin(), 690 408 ) ); 691 409 692 410 $scripts->add( 'farbtastic', '/wp-admin/js/farbtastic.js', array('jquery'), '1.2' ); 693 411 694 412 $scripts->add( 'iris', '/wp-admin/js/iris.min.js', array( 'jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch' ), '1.0.7', 1 ); 695 $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris' ), false, 1 ); 696 did_action( 'init' ) && $scripts->localize( 'wp-color-picker', 'wpColorPickerL10n', array( 697 'clear' => __( 'Clear' ), 698 'defaultString' => __( 'Default' ), 699 'pick' => __( 'Select Color' ), 700 'current' => __( 'Current Color' ), 701 ) ); 413 $scripts->add( 'wp-color-picker', "/wp-admin/js/color-picker$suffix.js", array( 'iris', 'wp-i18n' ), false, 1 ); 702 414 703 415 $scripts->add( 'dashboard', "/wp-admin/js/dashboard$suffix.js", array( 'jquery', 'admin-comments', 'postbox' ), false, 1 ); 704 416 705 417 $scripts->add( 'list-revisions', "/wp-includes/js/wp-list-revisions$suffix.js" ); 706 418 707 419 $scripts->add( 'media-grid', "/wp-includes/js/media-grid$suffix.js", array( 'media-editor' ), false, 1 ); 708 $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery' ), false, 1 ); 709 did_action( 'init' ) && $scripts->localize( 'media', 'attachMediaBoxL10n', array( 710 'error' => __( 'An error has occurred. Please reload the page and try again.' ), 711 )); 712 713 $scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array('jquery', 'json2', 'imgareaselect'), false, 1 ); 714 did_action( 'init' ) && $scripts->localize( 'image-edit', 'imageEditL10n', array( 715 'error' => __( 'Could not load the preview image. Please reload the page and try again.' ) 716 )); 717 718 $scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery' ), false, 1 ); 719 did_action( 'init' ) && $scripts->localize( 'set-post-thumbnail', 'setPostThumbnailL10n', array( 720 'setThumbnail' => __( 'Use as featured image' ), 721 'saving' => __( 'Saving...' ), // no ellipsis 722 'error' => __( 'Could not set that as the thumbnail image. Try a different attachment.' ), 723 'done' => __( 'Done' ) 724 ) ); 420 $scripts->add( 'media', "/wp-admin/js/media$suffix.js", array( 'jquery', 'wp-i18n' ), false, 1 ); 421 422 $scripts->add( 'image-edit', "/wp-admin/js/image-edit$suffix.js", array( 'jquery', 'json2', 'imgareaselect', 'wp-i18n' ), false, 1 ); 423 424 $scripts->add( 'set-post-thumbnail', "/wp-admin/js/set-post-thumbnail$suffix.js", array( 'jquery', 'wp-i18n' ), false, 1 ); 725 425 726 426 // Navigation Menus 727 $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox', 'json2' ) ); 728 did_action( 'init' ) && $scripts->localize( 'nav-menu', 'navMenuL10n', array( 729 'noResultsFound' => __( 'No results found.' ), 730 'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ), 731 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), 732 'untitled' => _x( '(no label)', 'missing menu item navigation label' ) 733 ) ); 427 $scripts->add( 'nav-menu', "/wp-admin/js/nav-menu$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable', 'wp-lists', 'postbox', 'json2', 'wp-i18n' ) ); 734 428 735 429 $scripts->add( 'custom-header', "/wp-admin/js/custom-header.js", array( 'jquery-masonry' ), false, 1 ); 736 430 $scripts->add( 'custom-background', "/wp-admin/js/custom-background$suffix.js", array( 'wp-color-picker', 'media-views' ), false, 1 ); -
src/wp-includes/theme.php
diff --git src/wp-includes/theme.php src/wp-includes/theme.php index c8cf03f..ab987e8 100644
function _wp_customize_include() { 2082 2082 return; 2083 2083 } 2084 2084 2085 require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; 2085 require_once ABSPATH . WPINC . '/class-wp-customize-manager.php'; 2086 2086 $GLOBALS['wp_customize'] = new WP_Customize_Manager(); 2087 2087 } 2088 2088 … … function _wp_customize_loader_settings() { 2105 2105 'url' => esc_url( admin_url( 'customize.php' ) ), 2106 2106 'isCrossDomain' => $cross_domain, 2107 2107 'browser' => $browser, 2108 'l10n' => array(2109 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),2110 'mainIframeTitle' => __( 'Customizer' ),2111 ),2112 2108 ); 2113 2109 2114 2110 $script = 'var _wpCustomizeLoaderSettings = ' . wp_json_encode( $settings ) . ';'; -
tests/qunit/fixtures/customize-menus.js
diff --git tests/qunit/fixtures/customize-menus.js tests/qunit/fixtures/customize-menus.js index 0525ac4..5a1fb26 100644
window._wpCustomizeNavMenusSettings = { 77 77 } 78 78 ], 79 79 'l10n': { 80 'custom_label': 'Custom Link',81 80 'customizingMenus': 'Customizing ▸ Menus', 82 'invalidTitleTpl': '%s (Invalid)',83 'itemAdded': 'Menu item added',84 'itemDeleted': 'Menu item deleted',85 'itemsFound': 'Number of items found: %d',86 'itemsFoundMore': 'Additional items found: %d',87 'itemsLoadingMore': 'Loading more results... please wait.',88 'menuAdded': 'Menu created',89 'menuDeleted': 'Menu deleted',90 'menuLocation': '(Currently set to: %s)',91 'menuNameLabel': 'Menu Name',92 'movedDown': 'Menu item moved down',93 'movedLeft': 'Menu item moved out of submenu',94 'movedRight': 'Menu item is now a sub-item',95 'movedUp': 'Menu item moved up',96 'pendingTitleTpl': '%s (Pending)',97 81 'postTypeLabel': 'Post Type', 98 'reorderLabelOff': 'Close reorder mode',99 'reorderLabelOn': 'Reorder menu items',100 'reorderModeOff': 'Reorder mode closed',101 'reorderModeOn': 'Reorder mode enabled',102 'taxonomyTermLabel': 'Taxonomy',103 'unnamed': '(unnamed)',104 82 'untitled': '(no label)' 105 83 }, 106 84 'locationSlugMappedToName': { -
tests/qunit/fixtures/customize-settings.js
diff --git tests/qunit/fixtures/customize-settings.js tests/qunit/fixtures/customize-settings.js index 670f783..92c6189 100644
window._wpCustomizeSettings = { 149 149 } 150 150 } 151 151 }; 152 window._wpCustomizeControlsL10n = {};153 152 154 153 jQuery.ajaxSetup( { 155 154 beforeSend: function( e, data ) { -
tests/qunit/fixtures/customize-widgets.js
diff --git tests/qunit/fixtures/customize-widgets.js tests/qunit/fixtures/customize-widgets.js index 95ecce8..009ed75 100644
window._wpCustomizeWidgetsSettings = { 45 45 'is_wide': false 46 46 } 47 47 ], 48 'l10n': {49 'saveBtnLabel': 'Apply',50 'saveBtnTooltip': 'Save and preview changes before publishing them.',51 'removeBtnLabel': 'Remove',52 'removeBtnTooltip': 'Trash widget by moving it to the inactive widgets sidebar.',53 'error': 'An error has occurred. Please reload the page and try again.',54 'widgetMovedUp': 'Widget moved up',55 'widgetMovedDown': 'Widget moved down'56 },57 48 'tpl': { 58 49 'widgetReorderNav': '<div class="widget-reorder-nav"><span class="move-widget" tabindex="0">Move to another area…</span><span class="move-widget-down" tabindex="0">Move down</span><span class="move-widget-up" tabindex="0">Move up</span></div>', 59 50 'moveWidgetArea': '<div class="move-widget-area"> <p class="description">Select an area to move this widget into:</p> <ul class="widget-area-select"> <% _.each( sidebars, function ( sidebar ){ %> <li class="" data-id="<%- sidebar.id %>" title="<%- sidebar.description %>" tabindex="0"><%- sidebar.name %></li> <% }); %> </ul> <div class="move-widget-actions"> <button class="move-widget-btn button" type="button">Move</button> </div> </div>' -
tests/qunit/fixtures/updates.js
diff --git tests/qunit/fixtures/updates.js tests/qunit/fixtures/updates.js index 1d318d8..d7c2e00 100644
1 1 window._wpUpdatesSettings = { 2 2 'ajax_nonce': '719b10f05d', 3 'l10n': { 4 'searchResults': 'Search results for “%s”', 5 'searchResultsLabel': 'Search Results', 6 'noPlugins': 'You do not appear to have any plugins available at this time.', 7 'noItemsSelected': 'Please select at least one item to perform this action on.', 8 'updating': 'Updating...', 9 'updated': 'Updated!', 10 'update': 'Update', 11 'updateNow': 'Update Now', 12 'updateNowLabel': 'Update %s now', 13 'updateFailedShort': 'Update Failed!', 14 'updateFailed': 'Update Failed: %s', 15 'updatingLabel': 'Updating %s...', 16 'updatedLabel': '%s updated!', 17 'updateFailedLabel': '%s update failed', 18 'updatingMsg': 'Updating... please wait.', 19 'updatedMsg': 'Update completed successfully.', 20 'updateCancel': 'Update canceled.', 21 'beforeunload': 'Updates may not complete if you navigate away from this page.', 22 'installNow': 'Install Now', 23 'installNowLabel': 'Install %s now', 24 'installing': 'Installing...', 25 'installed': 'Installed!', 26 'installFailedShort': 'Install Failed!', 27 'installFailed': 'Installation failed: %s', 28 'pluginInstallingLabel': 'Installing %s...', // No ellipsis 29 'themeInstallingLabel': 'Installing %s...', // No ellipsis 30 'pluginInstalledLabel': '%s installed!', 31 'themeInstalledLabel': '%s installed!', 32 'pluginInstallFailedLabel': '%s installation failed', 33 'themeInstallFailedLabel': '%s installation failed', 34 'installingMsg': 'Installing... please wait.', 35 'installedMsg': 'Installation completed successfully.', 36 'importerInstalledMsg': 'Importer installed successfully. <a href="%s">Run importer</a>', 37 'aysDelete': 'Are you sure you want to delete %s?', 38 'aysDeleteUninstall': 'Are you sure you want to delete %s and its data?', 39 'aysBulkDelete': 'Are you sure you want to delete the selected plugins and their data?', 40 'aysBulkDeleteThemes': 'Caution: These themes may be active on other sites in the network. Are you sure you want to proceed?', 41 'deleting': 'Deleting...', 42 'deleteFailed': 'Deletion failed: %s', 43 'deleted': 'Deleted!', 44 'livePreview': 'Live Preview', 45 'activatePlugin': 'Activate', 46 'activateTheme': 'Activate', 47 'activatePluginLabel': 'Activate %s', 48 'activateThemeLabel': 'Activate %s', 49 'activateImporter': 'Run Importer', 50 'unknownError': 'An unknown error occurred', 51 'connectionError': 'Connection lost or the server is busy. Please try again later.', 52 'nonceError': 'An error has occurred. Please reload the page and try again.', 53 'pluginsFound': 'Number of plugins found: %d', 54 'noPluginsFound': 'No plugins found. Try a different search.' 55 } 3 'isNetworkAdmin': false 56 4 }; 57 5 window._wpUpdatesItemCounts = { 58 6 plugins: {},