diff --git a/core/modules/system/src/Form/ModulesListConfirmForm.php b/core/modules/system/src/Form/ModulesListConfirmForm.php index 0d03644..2dfbcb3 100644 --- a/core/modules/system/src/Form/ModulesListConfirmForm.php +++ b/core/modules/system/src/Form/ModulesListConfirmForm.php @@ -142,13 +142,18 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // Install the given modules. if (!empty($this->modules['install'])) { $this->moduleHandler->install(array_keys($this->modules['install'])); + $module_names = array_values($this->modules['install']); + + drupal_set_message(format_plural(count($module_names), 'Module %name has been enabled.', '@count modules have been enabled: %names.', array( + '%name' => $module_names[0], + '%names' => implode(', ', $module_names), + ))); } // Gets module list after install process, flushes caches and displays a // message if there are changes. if ($before != $this->moduleHandler->getModuleList()) { drupal_flush_all_caches(); - drupal_set_message($this->t('The module configuration changes have been saved.')); } $form_state->setRedirectUrl($this->getCancelUrl()); diff --git a/core/modules/system/src/Form/ModulesListForm.php b/core/modules/system/src/Form/ModulesListForm.php index 3c01772..fc53a39 100644 --- a/core/modules/system/src/Form/ModulesListForm.php +++ b/core/modules/system/src/Form/ModulesListForm.php @@ -507,13 +507,18 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // There seem to be no dependencies that would need approval. if (!empty($modules['install'])) { $this->moduleHandler->install(array_keys($modules['install'])); + $module_names = array_values($modules['install']); + + drupal_set_message(format_plural(count($module_names), 'Module %name has been enabled', '@count modules have been enabled: %names', array( + '%name' => $module_names[0], + '%names' => implode(', ', $module_names), + ))); } // Gets module list after install process, flushes caches and displays a // message if there are changes. if ($before != $this->moduleHandler->getModuleList()) { drupal_flush_all_caches(); - drupal_set_message(t('The configuration options have been saved.')); } }