Ticket #37550: 37550.diff
File 37550.diff, 3.4 KB (added by , 9 years ago) |
---|
-
src/wp-admin/js/updates.js
350 350 351 351 if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) { 352 352 $updateRow = $( 'tr[data-plugin="' + args.plugin + '"]' ); 353 $message = $updateRow.find( '.update-message' ). addClass( 'updating-message' ).find( 'p' );353 $message = $updateRow.find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' ); 354 354 message = wp.updates.l10n.updatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() ); 355 355 } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) { 356 356 $card = $( '.plugin-card-' + args.slug ); … … 900 900 }, args ); 901 901 902 902 if ( 'themes-network' === pagenow ) { 903 $notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ). addClass( 'updating-message' ).find( 'p' );903 $notice = $( '[data-slug="' + args.slug + '"]' ).find( '.update-message' ).removeClass( 'notice-error' ).addClass( 'updating-message notice-warning' ).find( 'p' ); 904 904 905 905 } else { 906 906 $notice = $( '#update-theme' ).closest( '.notice' ).removeClass( 'notice-large' ); … … 1564 1564 1565 1565 if ( _.isString( response ) ) { 1566 1566 error = response; 1567 } else if ( 'undefined' !== typeof response.readyState && 0 == response.readyState ) { 1568 error = wp.updates.l10n.connectionError; 1567 1569 } else if ( _.isString( response.responseText ) && '' !== response.responseText ) { 1568 1570 error = response.responseText; 1569 1571 } else if ( _.isString( response.statusText ) ) { … … 2021 2023 if ( 'wp-' + response.update + '-update-success' === event.type ) { 2022 2024 success++; 2023 2025 } else { 2024 itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '. theme-titlestrong' ).text();2026 itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.column-primary strong' ).text(); 2025 2027 2026 2028 error++; 2027 2029 errorMessages.push( itemName + ': ' + response.errorMessage ); -
src/wp-includes/script-loader.php
679 679 /* translators: %s: Importer name */ 680 680 'activateImporterLabel' => __( 'Run %s' ), 681 681 'unknownError' => __( 'An unknown error occurred' ), 682 'connectionError' => __( 'Connection lost or the server is busy. Please try again later.' ), 682 683 'pluginsFound' => __( 'Number of plugins found: %d' ), 683 684 'noPluginsFound' => __( 'No plugins found. Try a different search.' ), 684 685 ), -
tests/qunit/fixtures/updates.js
46 46 'activateThemeLabel': 'Activate %s', 47 47 'activateImporter': 'Run Importer', 48 48 'unknownError': 'An unknown error occurred', 49 'connectionError': 'Connection lost or the server is busy. Please try again later.', 49 50 'pluginsFound': 'Number of plugins found: %d', 50 51 'noPluginsFound': 'No plugins found. Try a different search.' 51 52 }