Changeset 57654
- Timestamp:
- 02/18/2024 10:14:04 PM (10 months ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/admin/common.js
r57022 r57654 353 353 354 354 window.setPostThumbnailL10n = deprecateL10nObject( 'setPostThumbnailL10n', window.setPostThumbnailL10n, '5.5.0' ); 355 356 /** 357 * Removed in 6.5.0, needed for back-compatibility. 358 * 359 * @since 4.5.0 360 * @deprecated 6.5.0 361 */ 362 window.uiAutocompleteL10n = window.uiAutocompleteL10n || { 363 noResults: '', 364 oneResult: '', 365 manyResults: '', 366 itemSelected: '' 367 }; 368 369 window.uiAutocompleteL10n = deprecateL10nObject( 'uiAutocompleteL10n', window.uiAutocompleteL10n, '6.5.0' ); 355 370 356 371 /** -
trunk/src/js/_enqueues/admin/tags-suggest.js
r53089 r57654 5 5 */ 6 6 ( function( $ ) { 7 if ( typeof window.uiAutocompleteL10n === 'undefined' ) {8 return;9 }10 11 7 var tempID = 0; 12 8 var separator = wp.i18n._x( ',', 'tag delimiter' ) || ','; 9 var __ = wp.i18n.__, 10 _n = wp.i18n._n, 11 sprintf = wp.i18n.sprintf; 13 12 14 13 function split( val ) { … … 140 139 }, 141 140 messages: { 142 noResults: window.uiAutocompleteL10n.noResults,141 noResults: __( 'No results found.' ), 143 142 results: function( number ) { 144 if ( number > 1 ) { 145 return window.uiAutocompleteL10n.manyResults.replace( '%d', number ); 146 } 147 148 return window.uiAutocompleteL10n.oneResult; 143 return sprintf( 144 /* translators: %d: Number of search results found. */ 145 _n( 146 '%d result found. Use up and down arrow keys to navigate.', 147 '%d results found. Use up and down arrow keys to navigate.', 148 number 149 ), 150 number 151 ); 149 152 } 150 153 } -
trunk/src/js/_enqueues/vendor/tinymce/plugins/wplink/plugin.js
r47122 r57654 99 99 var speak = ( typeof window.wp !== 'undefined' && window.wp.a11y && window.wp.a11y.speak ) ? window.wp.a11y.speak : function() {}; 100 100 var hasLinkError = false; 101 var __ = window.wp.i18n.__; 102 var _n = window.wp.i18n._n; 103 var sprintf = window.wp.i18n.sprintf; 101 104 102 105 function getSelectedLink() { … … 458 461 }, 459 462 messages: { 460 noResults: ( typeof window.uiAutocompleteL10n !== 'undefined' ) ? window.uiAutocompleteL10n.noResults : '',463 noResults: __( 'No results found.' ) , 461 464 results: function( number ) { 462 if ( typeof window.uiAutocompleteL10n !== 'undefined' ) { 463 if ( number > 1 ) { 464 return window.uiAutocompleteL10n.manyResults.replace( '%d', number ); 465 } 466 467 return window.uiAutocompleteL10n.oneResult; 468 } 465 return sprintf( 466 /* translators: %d: Number of search results found. */ 467 _n( 468 '%d result found. Use up and down arrow keys to navigate.', 469 '%d results found. Use up and down arrow keys to navigate.', 470 number 471 ), 472 number 473 ); 469 474 } 470 475 } -
trunk/src/wp-includes/script-loader.php
r57602 r57654 932 932 $scripts->add( 'jquery-ui-position', false, array( 'jquery-ui-core' ), '1.13.2', 1 ); 933 933 $scripts->add( 'jquery-ui-widget', false, array( 'jquery-ui-core' ), '1.13.2', 1 ); 934 935 // Strings for 'jquery-ui-autocomplete' live region messages.936 did_action( 'init' ) && $scripts->localize(937 'jquery-ui-autocomplete',938 'uiAutocompleteL10n',939 array(940 'noResults' => __( 'No results found.' ),941 /* translators: Number of results found when using jQuery UI Autocomplete. */942 'oneResult' => __( '1 result found. Use up and down arrow keys to navigate.' ),943 /* translators: %d: Number of results found when using jQuery UI Autocomplete. */944 'manyResults' => __( '%d results found. Use up and down arrow keys to navigate.' ),945 'itemSelected' => __( 'Item selected.' ),946 )947 );948 934 949 935 // Deprecated, not used in core, most functionality is included in jQuery 1.3. … … 1248 1234 $scripts->add( 'admin-bar', "/wp-includes/js/admin-bar$suffix.js", array( 'hoverintent-js' ), false, 1 ); 1249 1235 1250 $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'jquery', 'wp-a11y' ), false, 1 ); 1236 $scripts->add( 'wplink', "/wp-includes/js/wplink$suffix.js", array( 'common', 'jquery', 'wp-a11y', 'wp-i18n' ), false, 1 ); 1237 $scripts->set_translations( 'wplink' ); 1251 1238 did_action( 'init' ) && $scripts->localize( 1252 1239 'wplink', … … 1426 1413 $scripts->set_translations( 'tags-box' ); 1427 1414 1428 $scripts->add( 'tags-suggest', "/wp-admin/js/tags-suggest$suffix.js", array( ' jquery-ui-autocomplete', 'wp-a11y' ), false, 1 );1415 $scripts->add( 'tags-suggest', "/wp-admin/js/tags-suggest$suffix.js", array( 'common', 'jquery-ui-autocomplete', 'wp-a11y', 'wp-i18n' ), false, 1 ); 1429 1416 $scripts->set_translations( 'tags-suggest' ); 1430 1417
Note: See TracChangeset
for help on using the changeset viewer.