Ticket #24223: 24223.patch
| File 24223.patch, 3.3 KB (added by , 13 years ago) |
|---|
-
wp-admin/includes/class-wp-upgrader.php
50 50 51 51 $this->strings['download_failed'] = __('Download failed.'); 52 52 $this->strings['installing_package'] = __('Installing the latest version…'); 53 $this->strings['no_files'] = __('The package contains no files.'); 53 54 $this->strings['folder_exists'] = __('Destination folder already exists.'); 54 55 $this->strings['mkdir_failed'] = __('Could not create directory.'); 55 56 $this->strings['incompatible_archive'] = __('The package could not be installed.'); … … 194 195 if ( 1 == count($source_files) && $wp_filesystem->is_dir( trailingslashit($source) . $source_files[0] . '/') ) //Only one folder? Then we want its contents. 195 196 $source = trailingslashit($source) . trailingslashit($source_files[0]); 196 197 elseif ( count($source_files) == 0 ) 197 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], __( 'The plugin contains no files.' )); //There are no files?198 return new WP_Error( 'incompatible_archive', $this->strings['incompatible_archive'], $this->strings['no_files'] ); //There are no files? 198 199 else //It's only a single file, the upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename. 199 200 $source = trailingslashit($source); 200 201 … … 388 389 $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>…'); 389 390 $this->strings['unpack_package'] = __('Unpacking the package…'); 390 391 $this->strings['installing_package'] = __('Installing the plugin…'); 392 $this->strings['no_files'] = __('The plugin contains no files.'); 391 393 $this->strings['process_failed'] = __('Plugin install failed.'); 392 394 $this->strings['process_success'] = __('Plugin installed successfully.'); 393 395 } … … 667 669 $this->strings['downloading_package'] = __('Downloading install package from <span class="code">%s</span>…'); 668 670 $this->strings['unpack_package'] = __('Unpacking the package…'); 669 671 $this->strings['installing_package'] = __('Installing the theme…'); 672 $this->strings['no_files'] = __('The theme contains no files.'); 670 673 $this->strings['process_failed'] = __('Theme install failed.'); 671 674 $this->strings['process_success'] = __('Theme installed successfully.'); 672 675 /* translators: 1: theme name, 2: version */ … … 1242 1245 1243 1246 function add_strings() { 1244 1247 $this->upgrader->strings['skin_upgrade_start'] = __('The update process is starting. This process may take a while on some hosts, so please be patient.'); 1245 $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: <strong>%2$s</strong> .');1248 $this->upgrader->strings['skin_update_failed_error'] = __('An error occurred while updating %1$s: <strong>%2$s</strong>'); 1246 1249 $this->upgrader->strings['skin_update_failed'] = __('The update of %1$s failed.'); 1247 1250 $this->upgrader->strings['skin_update_successful'] = __('%1$s updated successfully.').' <a onclick="%2$s" href="#" class="hide-if-no-js"><span>'.__('Show Details').'</span><span class="hidden">'.__('Hide Details').'</span>.</a>'; 1248 1251 $this->upgrader->strings['skin_upgrade_end'] = __('All updates have been completed.');