Make WordPress Core

Ticket #37550: 37550.diff

File 37550.diff, 3.4 KB (added by obenland, 9 years ago)
  • src/wp-admin/js/updates.js

     
    350350
    351351                if ( 'plugins' === pagenow || 'plugins-network' === pagenow ) {
    352352                        $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' );
    354354                        message    = wp.updates.l10n.updatingLabel.replace( '%s', $updateRow.find( '.plugin-title strong' ).text() );
    355355                } else if ( 'plugin-install' === pagenow || 'plugin-install-network' === pagenow ) {
    356356                        $card    = $( '.plugin-card-' + args.slug );
     
    900900                }, args );
    901901
    902902                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' );
    904904
    905905                } else {
    906906                        $notice = $( '#update-theme' ).closest( '.notice' ).removeClass( 'notice-large' );
     
    15641564
    15651565                if ( _.isString( response ) ) {
    15661566                        error = response;
     1567                } else if ( 'undefined' !== typeof response.readyState && 0 == response.readyState ) {
     1568                        error = wp.updates.l10n.connectionError;
    15671569                } else if ( _.isString( response.responseText ) && '' !== response.responseText ) {
    15681570                        error = response.responseText;
    15691571                } else if ( _.isString( response.statusText ) ) {
     
    20212023                                if ( 'wp-' + response.update + '-update-success' === event.type ) {
    20222024                                        success++;
    20232025                                } else {
    2024                                         itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.theme-title strong' ).text();
     2026                                        itemName = response.pluginName ? response.pluginName : $( '[data-slug="' + response.slug + '"]' ).find( '.column-primary strong' ).text();
    20252027
    20262028                                        error++;
    20272029                                        errorMessages.push( itemName + ': ' + response.errorMessage );
  • src/wp-includes/script-loader.php

     
    679679                                /* translators: %s: Importer name */
    680680                                'activateImporterLabel'      => __( 'Run %s' ),
    681681                                'unknownError'               => __( 'An unknown error occurred' ),
     682                                'connectionError'            => __( 'Connection lost or the server is busy. Please try again later.' ),
    682683                                'pluginsFound'               => __( 'Number of plugins found: %d' ),
    683684                                'noPluginsFound'             => __( 'No plugins found. Try a different search.' ),
    684685                        ),
  • tests/qunit/fixtures/updates.js

     
    4646                'activateThemeLabel':  'Activate %s',
    4747                'activateImporter': 'Run Importer',
    4848                'unknownError': 'An unknown error occurred',
     49                'connectionError': 'Connection lost or the server is busy. Please try again later.',
    4950                'pluginsFound': 'Number of plugins found: %d',
    5051                'noPluginsFound': 'No plugins found. Try a different search.'
    5152        }