Changeset 48394
- Timestamp:
- 07/07/2020 06:28:41 PM (5 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/lib/nav-menu.js
r48168 r48394 10 10 */ 11 11 12 /* global menus, postboxes, columns, isRtl, navMenuL10n,ajaxurl, wpNavMenu */12 /* global menus, postboxes, columns, isRtl, ajaxurl, wpNavMenu */ 13 13 14 14 (function($) { … … 589 589 titleEl.text( title ).removeClass( 'no-title' ); 590 590 } else { 591 titleEl.text( navMenuL10n.untitled).addClass( 'no-title' );591 titleEl.text( wp.i18n._x( '(no label)', 'missing menu item navigation label' ) ).addClass( 'no-title' ); 592 592 } 593 593 } ); … … 1051 1051 window.onbeforeunload = function(){ 1052 1052 if ( api.menusChanged ) 1053 return navMenuL10n.saveAlert;1053 return wp.i18n.__( 'The changes you made will be lost if you navigate away from this page.' ); 1054 1054 }; 1055 1055 } else { … … 1221 1221 eventOnClickMenuDelete : function() { 1222 1222 // Delete warning AYS. 1223 if ( window.confirm( navMenuL10n.warnDeleteMenu) ) {1223 if ( window.confirm( wp.i18n.__( 'You are about to permanently delete this menu.\n\'Cancel\' to stop, \'OK\' to delete.' ) ) ) { 1224 1224 window.onbeforeunload = null; 1225 1225 return true; … … 1254 1254 1255 1255 if( ! $items.length ) { 1256 $('.categorychecklist', panel).html( '<li><p>' + navMenuL10n.noResultsFound+ '</p></li>' );1256 $('.categorychecklist', panel).html( '<li><p>' + wp.i18n.__( 'No results found.' ) + '</p></li>' ); 1257 1257 $( '.spinner', panel ).removeClass( 'is-active' ); 1258 1258 wrapper.addClass( 'has-no-menu-item' ); -
trunk/src/wp-includes/script-loader.php
r48392 r48394 1313 1313 */ 1314 1314 $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', 'underscore' ) ); 1315 did_action( 'init' ) && $scripts->localize( 1316 'nav-menu', 1317 'navMenuL10n', 1318 array( 1319 'noResultsFound' => __( 'No results found.' ), 1320 'warnDeleteMenu' => __( "You are about to permanently delete this menu. \n 'Cancel' to stop, 'OK' to delete." ), 1321 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ), 1322 'untitled' => _x( '(no label)', 'missing menu item navigation label' ), 1323 ) 1324 ); 1315 $scripts->set_translations( 'nav-menu' ); 1325 1316 1326 1317 $scripts->add( 'custom-header', '/wp-admin/js/custom-header.js', array( 'jquery-masonry' ), false, 1 );
Note: See TracChangeset
for help on using the changeset viewer.