diff --git a/core/modules/search/lib/Drupal/search/Controller/SearchController.php b/core/modules/search/lib/Drupal/search/Controller/SearchController.php index 6767767..83ca3b5 100644 --- a/core/modules/search/lib/Drupal/search/Controller/SearchController.php +++ b/core/modules/search/lib/Drupal/search/Controller/SearchController.php @@ -118,7 +118,7 @@ public function redirectSearchPage(SearchPageInterface $entity) { * The title for the search page edit form. */ public function editTitle(SearchPageInterface $search_page) { - return $this->t('Edit @label search page', array('@label' => $search_page->label())); + return $this->t('Edit %label search page', array('%label' => $search_page->label())); } /** @@ -134,6 +134,14 @@ public function editTitle(SearchPageInterface $search_page) { */ public function performOperation(SearchPageInterface $search_page, $op) { $search_page->$op()->save(); + + if ($op == 'enable') { + drupal_set_message($this->t('The %label search page has been enabled.', array('%label' => $search_page->label()))); + } + elseif ($op == 'disable') { + drupal_set_message($this->t('The %label search page has been disabled.', array('%label' => $search_page->label()))); + } + return $this->redirect('search.settings'); } diff --git a/core/modules/search/lib/Drupal/search/Form/SearchPageAddForm.php b/core/modules/search/lib/Drupal/search/Form/SearchPageAddForm.php index db7d175..79ff609 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchPageAddForm.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchPageAddForm.php @@ -42,7 +42,7 @@ public function save(array $form, array &$form_state) { parent::save($form, $form_state); - drupal_set_message($this->t('The search page has been added.')); + drupal_set_message($this->t('The %label search page has been added.', array('%label' => $this->entity->label()))); } } diff --git a/core/modules/search/lib/Drupal/search/Form/SearchPageDeleteForm.php b/core/modules/search/lib/Drupal/search/Form/SearchPageDeleteForm.php index 1ad7203..c9a5752 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchPageDeleteForm.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchPageDeleteForm.php @@ -18,7 +18,7 @@ class SearchPageDeleteForm extends EntityConfirmFormBase { * {@inheritdoc} */ public function getQuestion() { - return $this->t('Are you sure you want to delete the %label search?', array('%label' => $this->entity->label())); + return $this->t('Are you sure you want to delete the %label search page?', array('%label' => $this->entity->label())); } /** @@ -43,7 +43,7 @@ public function getConfirmText() { public function submit(array $form, array &$form_state) { $this->entity->delete(); $form_state['redirect_route']['route_name'] = 'search.settings'; - drupal_set_message($this->t('The %label search has been deleted.', array('%label' => $this->entity->label()))); + drupal_set_message($this->t('The %label search page has been deleted.', array('%label' => $this->entity->label()))); } } diff --git a/core/modules/search/lib/Drupal/search/Form/SearchPageEditForm.php b/core/modules/search/lib/Drupal/search/Form/SearchPageEditForm.php index 37a15ac..de9b1e4 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchPageEditForm.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchPageEditForm.php @@ -27,7 +27,7 @@ protected function actions(array $form, array &$form_state) { public function save(array $form, array &$form_state) { parent::save($form, $form_state); - drupal_set_message($this->t('The search page has been updated.')); + drupal_set_message($this->t('The %label search page has been updated.', array('%label' => $this->entity->label()))); } } diff --git a/core/modules/search/lib/Drupal/search/Form/SearchPageFormBase.php b/core/modules/search/lib/Drupal/search/Form/SearchPageFormBase.php index 9e2718d..225a55a 100644 --- a/core/modules/search/lib/Drupal/search/Form/SearchPageFormBase.php +++ b/core/modules/search/lib/Drupal/search/Form/SearchPageFormBase.php @@ -152,7 +152,7 @@ public function validate(array $form, array &$form_state) { ->condition('id', $form_state['values']['id'], '<>') ->execute(); if ($path) { - $this->setFormError('path', $form_state, $this->t('The search path must be unique.')); + $this->setFormError('path', $form_state, $this->t('The search page path must be unique.')); } if ($this->plugin instanceof PluginFormInterface) { diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php index 84934e0..aa4d925 100644 --- a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php +++ b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php @@ -110,7 +110,7 @@ function testSearchModuleSettingsPage() { $this->drupalPostForm(NULL, $edit, t('Save search page')); // Ensure that the modifications took effect. - $this->assertText(t('The search page has been updated.')); + $this->assertText(t('search page has been updated.')); $this->drupalGet('admin/config/search/settings/manage/dummy_search_type'); $this->assertTrue($this->xpath('//select[@id="edit-extra-type-settings-boost"]//option[@value="ii" and @selected="selected"]'), 'Module specific settings can be changed'); } @@ -232,7 +232,7 @@ public function testMultipleSearchPages() { $first['path'] = strtolower($this->randomName(8)); $this->drupalPostForm(NULL, $first, t('Add search page')); $this->assertDefaultSearch($first_id, 'The default page matches the only search page.'); - $this->assertText(t('The search page has been added.')); + $this->assertText(t('The %label search page has been added.', array('%label' => $first['label']))); // Attempt to add a search page with an existing path. $edit = array();