From 529a024657fb0c08094765e0d5fea3b6ec593342 Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Tue, 15 Apr 2014 20:25:15 -0700
Subject: [PATCH] Issue #2156661 by Jalandhar, jsbalsera, ianthomas_uk,
 sidharthap, jhodgdon: Search admin menu entry uses "settings" -- UI-text
 standards violation.

---
 .../search/Plugin/SearchIndexingInterface.php |  2 +-
 .../Tests/SearchConfigSettingsFormTest.php    | 42 +++++++++----------
 .../Tests/SearchMultilingualEntityTest.php    |  2 +-
 .../Drupal/search/Tests/SearchRankingTest.php | 10 ++---
 core/modules/search/search.menu_links.yml     |  4 +-
 core/modules/search/search.module             |  8 ++--
 core/modules/search/search.routing.yml        | 18 ++++----
 7 files changed, 43 insertions(+), 43 deletions(-)

diff --git a/core/modules/search/lib/Drupal/search/Plugin/SearchIndexingInterface.php b/core/modules/search/lib/Drupal/search/Plugin/SearchIndexingInterface.php
index 26edef555669..4bc30f8ae1cc 100644
--- a/core/modules/search/lib/Drupal/search/Plugin/SearchIndexingInterface.php
+++ b/core/modules/search/lib/Drupal/search/Plugin/SearchIndexingInterface.php
@@ -27,7 +27,7 @@ interface SearchIndexingInterface {
    *
    * This method is called every cron run if the plugin has been set as
    * an active search module on the Search settings page
-   * (admin/config/search/settings). It allows your module to add items to the
+   * (admin/config/search/pages). It allows your module to add items to the
    * built-in search index using search_index(), or to add them to your module's
    * own indexing mechanism.
    *
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
index 97030a644ca8..25372eb73d1b 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php
@@ -70,26 +70,26 @@ function setUp() {
   function testSearchSettingsPage() {
 
     // Test that the settings form displays the correct count of items left to index.
-    $this->drupalGet('admin/config/search/settings');
+    $this->drupalGet('admin/config/search/pages');
     $this->assertText(t('There are @count items left to index.', array('@count' => 0)));
 
     // Test the re-index button.
-    $this->drupalPostForm('admin/config/search/settings', array(), t('Re-index site'));
+    $this->drupalPostForm('admin/config/search/pages', array(), t('Re-index site'));
     $this->assertText(t('Are you sure you want to re-index the site'));
-    $this->drupalPostForm('admin/config/search/settings/reindex', array(), t('Re-index site'));
+    $this->drupalPostForm('admin/config/search/pages/reindex', array(), t('Re-index site'));
     $this->assertText(t('The index will be rebuilt'));
-    $this->drupalGet('admin/config/search/settings');
+    $this->drupalGet('admin/config/search/pages');
     $this->assertText(t('There is 1 item left to index.'));
 
     // Test that the form saves with the default values.
-    $this->drupalPostForm('admin/config/search/settings', array(), t('Save configuration'));
+    $this->drupalPostForm('admin/config/search/pages', array(), t('Save configuration'));
     $this->assertText(t('The configuration options have been saved.'), 'Form saves with the default values.');
 
     // Test that the form does not save with an invalid word length.
     $edit = array(
       'minimum_word_size' => $this->randomName(3),
     );
-    $this->drupalPostForm('admin/config/search/settings', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/config/search/pages', $edit, t('Save configuration'));
     $this->assertNoText(t('The configuration options have been saved.'), 'Form does not save with an invalid word length.');
   }
 
@@ -97,7 +97,7 @@ function testSearchSettingsPage() {
    * Verifies plugin-supplied settings form.
    */
   function testSearchModuleSettingsPage() {
-    $this->drupalGet('admin/config/search/settings');
+    $this->drupalGet('admin/config/search/pages');
     $this->clickLink(t('Edit'), 1);
 
     // Ensure that the default setting was picked up from the default config
@@ -111,7 +111,7 @@ function testSearchModuleSettingsPage() {
 
     // Ensure that the modifications took effect.
     $this->assertRaw(t('The %label search page has been updated.', array('%label' => 'Dummy search type')));
-    $this->drupalGet('admin/config/search/settings/manage/dummy_search_type');
+    $this->drupalGet('admin/config/search/pages/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');
   }
 
@@ -146,7 +146,7 @@ function testSearchModuleDisabling() {
     // Test each plugin if it's enabled as the only search plugin.
     foreach ($entities as $entity_id => $entity) {
       // Set this as default.
-      $this->drupalGet("admin/config/search/settings/manage/$entity_id/set-default");
+      $this->drupalGet("admin/config/search/pages/manage/$entity_id/set-default");
 
       // Run a search from the correct search URL.
       $info = $plugin_info[$entity_id];
@@ -185,7 +185,7 @@ function testSearchModuleDisabling() {
       $entity->enable()->save();
     }
     // Set the node search as default.
-    $this->drupalGet('admin/config/search/settings/manage/node_search/set-default');
+    $this->drupalGet('admin/config/search/pages/manage/node_search/set-default');
 
     foreach (array('search/node/pizza', 'search/node') as $path) {
       $this->drupalGet($path);
@@ -217,7 +217,7 @@ public function testMultipleSearchPages() {
     $this->assertDefaultSearch(FALSE);
 
     // Ensure that no search pages are configured.
-    $this->drupalGet('admin/config/search/settings');
+    $this->drupalGet('admin/config/search/pages');
     $this->assertText(t('No search pages have been configured.'));
 
     // Add a search page.
@@ -264,14 +264,14 @@ public function testMultipleSearchPages() {
       'entities[' . $first_id . '][weight]' => 10,
       'entities[' . $second_id . '][weight]' => -10,
     );
-    $this->drupalPostForm('admin/config/search/settings', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/config/search/pages', $edit, t('Save configuration'));
     $this->drupalGet('search');
     $elements = $this->xpath('//*[contains(@class, :class)]//a', array(':class' => 'tabs primary'));
     $this->assertIdentical((string) $elements[0]['href'], url('search/' . $second['path']));
     $this->assertIdentical((string) $elements[1]['href'], url('search/' . $first['path']));
 
     // Check the initial state of the search pages.
-    $this->drupalGet('admin/config/search/settings');
+    $this->drupalGet('admin/config/search/pages');
     $this->verifySearchPageOperations($first_id, TRUE, FALSE, FALSE, FALSE);
     $this->verifySearchPageOperations($second_id, TRUE, TRUE, TRUE, FALSE);
 
@@ -318,28 +318,28 @@ public function testMultipleSearchPages() {
    */
   protected function verifySearchPageOperations($id, $edit, $delete, $disable, $enable) {
     if ($edit) {
-      $this->assertLinkByHref("admin/config/search/settings/manage/$id");
+      $this->assertLinkByHref("admin/config/search/pages/manage/$id");
     }
     else {
-      $this->assertNoLinkByHref("admin/config/search/settings/manage/$id");
+      $this->assertNoLinkByHref("admin/config/search/pages/manage/$id");
     }
     if ($delete) {
-      $this->assertLinkByHref("admin/config/search/settings/manage/$id/delete");
+      $this->assertLinkByHref("admin/config/search/pages/manage/$id/delete");
     }
     else {
-      $this->assertNoLinkByHref("admin/config/search/settings/manage/$id/delete");
+      $this->assertNoLinkByHref("admin/config/search/pages/manage/$id/delete");
     }
     if ($disable) {
-      $this->assertLinkByHref("admin/config/search/settings/manage/$id/disable");
+      $this->assertLinkByHref("admin/config/search/pages/manage/$id/disable");
     }
     else {
-      $this->assertNoLinkByHref("admin/config/search/settings/manage/$id/disable");
+      $this->assertNoLinkByHref("admin/config/search/pages/manage/$id/disable");
     }
     if ($enable) {
-      $this->assertLinkByHref("admin/config/search/settings/manage/$id/enable");
+      $this->assertLinkByHref("admin/config/search/pages/manage/$id/enable");
     }
     else {
-      $this->assertNoLinkByHref("admin/config/search/settings/manage/$id/enable");
+      $this->assertNoLinkByHref("admin/config/search/pages/manage/$id/enable");
     }
   }
 
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php
index 7a54b5860357..37e00e8e2582 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php
@@ -127,7 +127,7 @@ function testMultilingualSearch() {
 
     // Now index the rest of the nodes.
     // Make sure index throttle is high enough, via the UI.
-    $this->drupalPostForm('admin/config/search/settings', array('cron_limit' => 20), t('Save configuration'));
+    $this->drupalPostForm('admin/config/search/pages', array('cron_limit' => 20), t('Save configuration'));
     $this->assertEqual(20, \Drupal::config('search.settings')->get('index.cron_limit', 100), 'Config setting was saved correctly');
 
     $this->plugin->updateIndex();
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
index 5d16f801953e..48410d66f276 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php
@@ -108,7 +108,7 @@ public function testRankings() {
     $this->cronRun();
 
     // Test that the settings form displays the context ranking section.
-    $this->drupalGet('admin/config/search/settings/manage/node_search');
+    $this->drupalGet('admin/config/search/pages/manage/node_search');
     $this->assertText(t('Content ranking'));
 
     // Check that all rankings are visible and set to 0.
@@ -121,8 +121,8 @@ public function testRankings() {
     foreach ($node_ranks as $node_rank) {
       // Enable the ranking we are testing.
       $edit['rankings_' . $node_rank] = 10;
-      $this->drupalPostForm('admin/config/search/settings/manage/node_search', $edit, t('Save search page'));
-      $this->drupalGet('admin/config/search/settings/manage/node_search');
+      $this->drupalPostForm('admin/config/search/pages/manage/node_search', $edit, t('Save search page'));
+      $this->drupalGet('admin/config/search/pages/manage/node_search');
       $this->assertTrue($this->xpath('//select[@id="edit-rankings-' . $node_rank . '"]//option[@value="10"]'), 'Select list to prioritize ' . $node_rank . ' for node ranks is visible and set to 10.');
 
       // Reload the plugin to get the up-to-date values.
@@ -137,8 +137,8 @@ public function testRankings() {
 
     // Save the final node_rank change then check that all rankings are visible
     // and have been set back to 0.
-    $this->drupalPostForm('admin/config/search/settings/manage/node_search', $edit, t('Save search page'));
-    $this->drupalGet('admin/config/search/settings/manage/node_search');
+    $this->drupalPostForm('admin/config/search/pages/manage/node_search', $edit, t('Save search page'));
+    $this->drupalGet('admin/config/search/pages/manage/node_search');
     foreach ($node_ranks as $node_rank) {
       $this->assertTrue($this->xpath('//select[@id="edit-rankings-' . $node_rank . '"]//option[@value="0"]'), 'Select list to prioritize ' . $node_rank . ' for node ranks is visible and set to 0.');
     }
diff --git a/core/modules/search/search.menu_links.yml b/core/modules/search/search.menu_links.yml
index 4648596a71e4..da872a96f439 100644
--- a/core/modules/search/search.menu_links.yml
+++ b/core/modules/search/search.menu_links.yml
@@ -3,8 +3,8 @@ search.view:
   route_name: search.view
   hidden: 1
 search.settings:
-  title: 'Search settings'
+  title: 'Search pages'
   parent: system.admin_config_search
-  description: 'Configure relevance settings for search and other indexing options.'
+  description: 'Configure search pages and search indexing options.'
   route_name: search.settings
   weight: -10
diff --git a/core/modules/search/search.module b/core/modules/search/search.module
index e6ea9f0d2cca..10d541e67979 100644
--- a/core/modules/search/search.module
+++ b/core/modules/search/search.module
@@ -76,18 +76,18 @@ function search_help($path, $arg) {
       $output .= '<dt>' . t('Searching content and users') . '</dt>';
       $output .= '<dd>' . t('Users with <em>Use search</em> permission can use the search block and <a href="@search">Search page</a>. Users with the <em>View published content</em> permission can search for content containing exact keywords. Users with the <em>View user profiles</em> permission can search for users containing the keyword anywhere in the user name, and users with the <em>Administer users</em> permission can search for users by email address. Additionally, users with <em>Use advanced search</em> permission can find content using more complex search methods and filtering by choosing the <em>Advanced search</em> option on the <a href="@search">Search page</a>.', array('@search' => url('search'))) . '</dd>';
       $output .= '<dt>' . t('Indexing content with cron') . '</dt>';
-      $output .= '<dd>' . t('To provide keyword searching, the search engine maintains an index of words found in the content and its fields, along with text added to your content by other modules (such as comments from the core Comment module, and taxonomy terms from the core Taxonomy module). To build and maintain this index, a correctly configured <a href="@cron">cron maintenance task</a> is required. Users with <em>Administer search</em> permission can further configure the cron settings on the <a href="@searchsettings">Search settings page</a>.', array('@cron' => 'http://drupal.org/cron', '@searchsettings' => url('admin/config/search/settings'))) . '</dd>';
+      $output .= '<dd>' . t('To provide keyword searching, the search engine maintains an index of words found in the content and its fields, along with text added to your content by other modules (such as comments from the core Comment module, and taxonomy terms from the core Taxonomy module). To build and maintain this index, a correctly configured <a href="@cron">cron maintenance task</a> is required. Users with <em>Administer search</em> permission can further configure the cron settings on the <a href="@searchsettings">Search settings page</a>.', array('@cron' => 'http://drupal.org/cron', '@searchsettings' => url('admin/config/search/pages'))) . '</dd>';
       $output .= '<dt>' . t('Content reindexing') . '</dt>';
-      $output .= '<dd>' . t('Content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. Unlike content-related actions, actions related to the structure of your site do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, enabling or disabling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the <a href="@searchsettings">Search settings page</a>. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', array('@searchsettings' => url('admin/config/search/settings'))) . '</dd>';
+      $output .= '<dd>' . t('Content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. Unlike content-related actions, actions related to the structure of your site do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, enabling or disabling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the <a href="@searchsettings">Search settings page</a>. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', array('@searchsettings' => url('admin/config/search/pages'))) . '</dd>';
       $output .= '<dt>' . t('Configuring search settings') . '</dt>';
-      $output .= '<dd>' . t('Indexing behavior can be adjusted using the <a href="@searchsettings">Search settings page</a>. Users with <em>Administer search</em> permission can control settings such as the <em>Number of items to index per cron run</em>, <em>Indexing settings</em> (word length), <em>Active search plugins</em>, and <em>Content ranking</em>, which lets you adjust the priority in which indexed content is returned in results.', array('@searchsettings' => url('admin/config/search/settings'))) . '</dd>';
+      $output .= '<dd>' . t('Indexing behavior can be adjusted using the <a href="@searchsettings">Search settings page</a>. Users with <em>Administer search</em> permission can control settings such as the <em>Number of items to index per cron run</em>, <em>Indexing settings</em> (word length), <em>Active search plugins</em>, and <em>Content ranking</em>, which lets you adjust the priority in which indexed content is returned in results.', array('@searchsettings' => url('admin/config/search/pages'))) . '</dd>';
       $output .= '<dt>' . t('Search block') . '</dt>';
       $output .= '<dd>' . t('The Search module includes a default <em>Search form</em> block, which can be enabled and configured on the <a href="@blocks">Blocks administration page</a>. The block is available to users with the <em>Search content</em> permission.', array('@blocks' => url('admin/structure/block'))) . '</dd>';
       $output .= '<dt>' . t('Extending Search module') . '</dt>';
       $output .= '<dd>' . t('By default, the Search module only supports exact keyword matching in content searches. You can modify this behavior by installing a language-specific stemming module for your language (such as <a href="@porterstemmer_url">Porter Stemmer</a> for American English), which allows words such as walk, walking, and walked to be matched in the Search module. Another approach is to use a third-party search technology with stemming or partial word matching features built in, such as <a href="@solr_url">Apache Solr</a> or <a href="@sphinx_url">Sphinx</a>. These and other <a href="@contrib-search">search-related contributed modules</a> can be downloaded by visiting Drupal.org.', array('@contrib-search' => 'http://drupal.org/project/modules?filters=tid%3A105', '@porterstemmer_url' => 'http://drupal.org/project/porterstemmer', '@solr_url' => 'http://drupal.org/project/apachesolr', '@sphinx_url' => 'http://drupal.org/project/sphinx')) . '</dd>';
       $output .= '</dl>';
       return $output;
-    case 'admin/config/search/settings':
+    case 'admin/config/search/pages':
       return '<p>' . t('The search engine maintains an index of words found in your site\'s content. To build and maintain this index, a correctly configured <a href="@cron">cron maintenance task</a> is required. Indexing behavior can be adjusted using the settings below.', array('@cron' => url('admin/reports/status'))) . '</p>';
     case 'search#noresults':
       return t('<ul>
diff --git a/core/modules/search/search.routing.yml b/core/modules/search/search.routing.yml
index 8cdec79d97c8..b75ae6e00a4f 100644
--- a/core/modules/search/search.routing.yml
+++ b/core/modules/search/search.routing.yml
@@ -1,13 +1,13 @@
 search.settings:
-  path: '/admin/config/search/settings'
+  path: '/admin/config/search/pages'
   defaults:
     _entity_list: 'search_page'
-    _title: 'Search settings'
+    _title: 'Search pages'
   requirements:
     _permission: 'administer search'
 
 search.reindex_confirm:
-  path: '/admin/config/search/settings/reindex'
+  path: '/admin/config/search/pages/reindex'
   defaults:
     _form: '\Drupal\search\Form\ReindexConfirm'
     _title: 'Clear index'
@@ -15,7 +15,7 @@ search.reindex_confirm:
     _permission: 'administer search'
 
 search.add_type:
-  path: '/admin/config/search/settings/add/{search_plugin_id}'
+  path: '/admin/config/search/pages/add/{search_plugin_id}'
   defaults:
     _entity_form: 'search_page.add'
     _title: 'Add new search page'
@@ -23,7 +23,7 @@ search.add_type:
     _entity_create_access: 'search_page'
 
 search.edit:
-  path: '/admin/config/search/settings/manage/{search_page}'
+  path: '/admin/config/search/pages/manage/{search_page}'
   defaults:
     _entity_form: 'search_page.edit'
     _title_callback: '\Drupal\search\Controller\SearchController::editTitle'
@@ -31,7 +31,7 @@ search.edit:
     _entity_access: 'search_page.update'
 
 search.enable:
-  path: '/admin/config/search/settings/manage/{search_page}/enable'
+  path: '/admin/config/search/pages/manage/{search_page}/enable'
   defaults:
     _controller: '\Drupal\search\Controller\SearchController::performOperation'
     op: 'enable'
@@ -39,7 +39,7 @@ search.enable:
     _entity_access: 'search_page.update'
 
 search.disable:
-  path: '/admin/config/search/settings/manage/{search_page}/disable'
+  path: '/admin/config/search/pages/manage/{search_page}/disable'
   defaults:
     _controller: '\Drupal\search\Controller\SearchController::performOperation'
     op: 'disable'
@@ -47,14 +47,14 @@ search.disable:
     _entity_access: 'search_page.disable'
 
 search.set_default:
-  path: '/admin/config/search/settings/manage/{search_page}/set-default'
+  path: '/admin/config/search/pages/manage/{search_page}/set-default'
   defaults:
     _controller: '\Drupal\search\Controller\SearchController::setAsDefault'
   requirements:
     _entity_access: 'search_page.update'
 
 search.delete:
-  path: '/admin/config/search/settings/manage/{search_page}/delete'
+  path: '/admin/config/search/pages/manage/{search_page}/delete'
   defaults:
     _entity_form: 'search_page.delete'
   requirements:
-- 
GitLab