WordPress.org

Make WordPress Core

Ticket #27196: 27196.3.diff

File 27196.3.diff, 1.2 KB (added by jazzs3quence, 7 years ago)
  • wp-admin/includes/class-wp-upgrader.php

     
    5151                $this->strings['download_failed'] = __('Download failed.');
    5252                $this->strings['installing_package'] = __('Installing the latest version…');
    5353                $this->strings['no_files'] = __('The package contains no files.');
    54                 $this->strings['folder_exists'] = __('Destination folder already exists.');
     54                $this->strings['folder_exists'] = __('Plugin folder already exists.');
     55                $this->strings['remove_first'] = __( 'Please either delete the existing plugin before uploading a new version or use the Updates page to update this plugin.' );
    5556                $this->strings['mkdir_failed'] = __('Could not create directory.');
    5657                $this->strings['incompatible_archive'] = __('The package could not be installed.');
    5758
     
    406407                $this->skin->set_result($result);
    407408                if ( is_wp_error($result) ) {
    408409                        $this->skin->error($result);
     410                        if ( in_array( 'folder_exists', $result->get_error_codes() ) ){
     411                                $this->skin->feedback( 'remove_first' );
     412                        }
    409413                        $this->skin->feedback('process_failed');
    410414                } else {
    411415                        //Install Succeeded