Make WordPress Core

Ticket #38918: 38918.2.diff

File 38918.2.diff, 848 bytes (added by johnbillion, 7 years ago)
  • src/wp-admin/includes/plugin.php

    diff --git a/src/wp-admin/includes/plugin.php b/src/wp-admin/includes/plugin.php
    index 97dd767850..b318175905 100644
    a b function delete_plugins( $plugins, $deprecated = '' ) { 
    891891                set_site_transient( 'update_plugins', $current );
    892892        }
    893893
    894         if ( ! empty($errors) )
    895                 return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s.'), implode(', ', $errors)) );
     894        if ( ! empty( $errors ) ) {
     895                /* translators: %l: Plugin filename or comma separated list of plugin filenames */
     896                $message = _n( 'Could not fully remove the plugin %l.', 'Could not fully remove the plugins %l.', count( $errors ) );
     897                return new WP_Error( 'could_not_remove_plugin', wp_sprintf(
     898                        $message,
     899                        $errors
     900                ) );
     901        }
    896902
    897903        return true;
    898904}