diff --git a/core/lib/Drupal/Core/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/Extension/ModuleInstaller.php index dba7a94..ec0bcb4 100644 --- a/core/lib/Drupal/Core/Extension/ModuleInstaller.php +++ b/core/lib/Drupal/Core/Extension/ModuleInstaller.php @@ -345,7 +345,7 @@ public function uninstall(array $module_list, $uninstall_dependents = TRUE) { foreach ($reasons as $reason) { $reason_message[] = implode(', ', $reason); } - throw new ModuleUninstallValidatorException(format_string('The following reasons prevents the modules from being uninstalled: @reasons', array( + throw new ModuleUninstallValidatorException(format_string('The following reasons prevent the modules from being uninstalled: @reasons', array( '@reasons' => implode(', ', $reason_message), ))); } diff --git a/core/modules/system/css/system.admin.css b/core/modules/system/css/system.admin.css index 7f23aab..959a908 100644 --- a/core/modules/system/css/system.admin.css +++ b/core/modules/system/css/system.admin.css @@ -157,7 +157,8 @@ small .admin-link:after { margin-bottom: 0; } .admin-requirements, -.admin-required { +.admin-required, +.validation-reasons { font-size: 0.9em; color: #666; } diff --git a/core/modules/system/src/Form/ModulesUninstallForm.php b/core/modules/system/src/Form/ModulesUninstallForm.php index ec1a0ea..e8fb208 100644 --- a/core/modules/system/src/Form/ModulesUninstallForm.php +++ b/core/modules/system/src/Form/ModulesUninstallForm.php @@ -175,9 +175,9 @@ public function buildForm(array $form, FormStateInterface $form_state) { if (isset($validation_reasons[$module_key])) { $disabled_message = \Drupal::translation()->formatPlural(count($validation_reasons[$module_key]), 'The following reason prevents @module from being uninstalled: @reasons', - 'The following reasons prevents @module from being uninstalled: @reasons', + 'The following reasons prevent @module from being uninstalled: @reasons', array('@module' => $module->getName(), '@reasons' => implode('; ', $validation_reasons[$module_key]))); - $disabled_message .= '
' . $disabled_message . '
'; + $disabled_message = '
' . $disabled_message . '
'; } $form['uninstall'][$module->getName()]['description']['uninstall']['#markup'] = $this->t($disabled_message); diff --git a/core/modules/system/src/Tests/Field/FieldModuleUninstallValidatorTest.php b/core/modules/system/src/Tests/Field/FieldModuleUninstallValidatorTest.php index f427ade..d571e4b 100644 --- a/core/modules/system/src/Tests/Field/FieldModuleUninstallValidatorTest.php +++ b/core/modules/system/src/Tests/Field/FieldModuleUninstallValidatorTest.php @@ -83,7 +83,7 @@ public function testUninstallingModule() { } catch (ModuleUninstallValidatorException $e) { $this->pass($message); - $this->assertEqual($e->getMessage(), 'The following reasons prevents the modules from being uninstalled: There is data for the field extra_base_field on entity type Test entity.'); + $this->assertEqual($e->getMessage(), 'The following reasons prevent the modules from being uninstalled: There is data for the field extra_base_field on entity type Test entity.'); } // Verify uninstalling entity_test is not possible when there is content for