Changeset 53124
- Timestamp:
- 04/11/2022 04:49:29 AM (3 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/updates.js
r52139 r53124 35 35 _x = wp.i18n._x, 36 36 _n = wp.i18n._n, 37 _nx = wp.i18n._nx, 37 38 sprintf = wp.i18n.sprintf; 38 39 … … 971 972 $views = $( '.subsubsub' ), 972 973 $pluginRow = $( this ), 974 $currentView = $views.find( '[aria-current="page"]' ), 975 $itemsCount = $( '.displaying-num' ), 973 976 columnCount = $form.find( 'thead th:not(.hidden), thead td' ).length, 974 977 pluginDeletedRow = wp.template( 'item-deleted-row' ), … … 978 981 * @type {Object} 979 982 */ 980 plugins = settings.plugins; 983 plugins = settings.plugins, 984 remainingCount; 981 985 982 986 // Add a success message after deleting a plugin. … … 1057 1061 $form.find( '#the-list' ).append( '<tr class="no-items"><td class="colspanchange" colspan="' + columnCount + '">' + __( 'No plugins are currently available.' ) + '</td></tr>' ); 1058 1062 } 1063 } 1064 1065 if ( $itemsCount.length && $currentView.length ) { 1066 remainingCount = plugins[ $currentView.parent( 'li' ).attr('class') ].length; 1067 $itemsCount.text( 1068 sprintf( 1069 /* translators: %s: The remaining number of plugins. */ 1070 _nx( '%s item', '%s items', 'plugin/plugins', remainingCount ), 1071 remainingCount 1072 ) 1073 ); 1059 1074 } 1060 1075 } ); -
trunk/src/wp-includes/script-loader.php
r53103 r53124 1341 1341 $scripts->set_translations( 'privacy-tools' ); 1342 1342 1343 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'common', 'jquery', 'wp-util', 'wp-a11y', 'wp-sanitize' ), false, 1 );1343 $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'common', 'jquery', 'wp-util', 'wp-a11y', 'wp-sanitize', 'wp-i18n' ), false, 1 ); 1344 1344 $scripts->set_translations( 'updates' ); 1345 1345 did_action( 'init' ) && $scripts->localize(
Note: See TracChangeset
for help on using the changeset viewer.