Plugins: Introduce a singular and plural form for the plugin deletion error message.

Props eddhurst, SergeyBiryukov

Fixes #38918

Built from https://develop.svn.wordpress.org/trunk@41713


git-svn-id: http://core.svn.wordpress.org/trunk@41547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2017-10-03 17:13:46 +00:00
parent 1e1a48aaa0
commit f4f31bc598
2 changed files with 12 additions and 3 deletions

View File

@ -891,8 +891,17 @@ function delete_plugins( $plugins, $deprecated = '' ) {
set_site_transient( 'update_plugins', $current );
}
if ( ! empty($errors) )
return new WP_Error('could_not_remove_plugin', sprintf(__('Could not fully remove the plugin(s) %s.'), implode(', ', $errors)) );
if ( ! empty( $errors ) ) {
if ( 1 === count( $errors ) ) {
/* translators: %s: plugin filename */
$message = __( 'Could not fully remove the plugin %s.' );
} else {
/* translators: %s: comma-separated list of plugin filenames */
$message = __( 'Could not fully remove the plugins %s.' );
}
return new WP_Error( 'could_not_remove_plugin', sprintf( $message, implode( ', ', $errors ) ) );
}
return true;
}

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.9-alpha-41712';
$wp_version = '4.9-alpha-41713';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.