diff --git a/core/modules/menu_ui/menu_ui.module b/core/modules/menu_ui/menu_ui.module index 4700926..23d65a6 100644 --- a/core/modules/menu_ui/menu_ui.module +++ b/core/modules/menu_ui/menu_ui.module @@ -39,7 +39,7 @@ function menu_ui_help($route_name, RouteMatchInterface $route_match) { $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Managing menus') . '
'; - $output .= '
' . t('Users with the Administer menus and menu items permission can add, edit, and delete custom menus on the Menus page. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the Block module installed). By selecting Edit menu, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('!block_help' => \Drupal::url('help.page', array('name' => 'block')), '!menu' => \Drupal::url('entity.menu.collection'))) . '
'; + $output .= '
' . t('Users with the Administer menus and menu links permission can add, edit, and delete custom menus on the Menus page. Custom menus can be special site menus, menus of external links, or any combination of internal and external links. You may create an unlimited number of additional menus, each of which will automatically have an associated block (if you have the Block module installed). By selecting Edit menu, you can add, edit, or delete links for a given menu. The links listing page provides a drag-and-drop interface for controlling the order of links, and creating a hierarchy within the menu.', array('!block_help' => \Drupal::url('help.page', array('name' => 'block')), '!menu' => \Drupal::url('entity.menu.collection'))) . '
'; $output .= '
' . t('Displaying menus') . '
'; $output .= '
' . t('If you have the Block module enabled, then each menu that you create is rendered in a block that you enable and position on the Block layout page. In some themes, the main menu and possibly the secondary menu will be output automatically; you may be able to disable this behavior on the theme\'s settings page.', array('!blocks' => (\Drupal::moduleHandler()->moduleExists('block')) ? \Drupal::url('block.admin_display') : '#', '!themes' => \Drupal::url('system.themes_page'), '!theme_settings' => \Drupal::url('system.theme_settings'))) . '
'; $output .= '
'; @@ -244,7 +244,7 @@ function menu_ui_get_menu_link_defaults(NodeInterface $node) { /** * Implements hook_form_BASE_FORM_ID_alter() for node_form. * - * Adds menu item fields to the node form. + * Adds menu link fields to the node form. * * @see menu_ui_form_node_form_submit() */ @@ -270,7 +270,7 @@ function menu_ui_form_node_form_alter(&$form, FormStateInterface $form_state) { $default = $node_type->getThirdPartySetting('menu_ui', 'parent', 'main:'); } $parent_element = $menu_parent_selector->parentSelectElement($default, $defaults['id'], $available_menus); - // If no possible parent menu items were found, there is nothing to display. + // If no possible parent menu links were found, there is nothing to display. if (empty($parent_element)) { return; } @@ -323,7 +323,7 @@ function menu_ui_form_node_form_alter(&$form, FormStateInterface $form_state) { ); $form['menu']['link']['menu_parent'] = $parent_element; - $form['menu']['link']['menu_parent']['#title'] = t('Parent item'); + $form['menu']['link']['menu_parent']['#title'] = t('Parent link'); $form['menu']['link']['menu_parent']['#attributes']['class'][] = 'menu-parent-select'; $form['menu']['link']['weight'] = array( @@ -341,7 +341,7 @@ function menu_ui_form_node_form_alter(&$form, FormStateInterface $form_state) { } /** - * Form submission handler for menu item field on the node form. + * Form submission handler for menu link field on the node form. * * @see menu_ui_form_node_form_alter() */ @@ -405,10 +405,10 @@ function menu_ui_form_node_type_form_alter(&$form, FormStateInterface $form_stat $options = $menu_parent_selector->getParentSelectOptions(''); $form['menu']['menu_parent'] = array( '#type' => 'select', - '#title' => t('Default parent item'), + '#title' => t('Default parent link'), '#default_value' => $type->getThirdPartySetting('menu_ui', 'parent', 'main:'), '#options' => $options, - '#description' => t('Choose the menu item to be the default parent for a new link in the content authoring form.'), + '#description' => t('Choose the menu link to be the default parent for a new link in the content authoring form.'), '#attributes' => array('class' => array('menu-title-select')), ); @@ -423,12 +423,12 @@ function menu_ui_form_node_type_form_alter(&$form, FormStateInterface $form_stat */ function menu_ui_form_node_type_form_validate(&$form, FormStateInterface $form_state) { $available_menus = array_filter($form_state->getValue('menu_options')); - // If there is at least one menu allowed, the selected item should be in + // If there is at least one menu allowed, the selected link should be in // one of them. if (count($available_menus)) { $menu_item_id_parts = explode(':', $form_state->getValue('menu_parent')); if (!in_array($menu_item_id_parts[0], $available_menus)) { - $form_state->setErrorByName('menu_parent', t('The selected menu item is not under one of the selected menus.')); + $form_state->setErrorByName('menu_parent', t('The selected menu link is not under one of the selected menus.')); } } else { diff --git a/core/modules/menu_ui/src/Tests/MenuNodeTest.php b/core/modules/menu_ui/src/Tests/MenuNodeTest.php index 6b1a9a4..cd61611 100644 --- a/core/modules/menu_ui/src/Tests/MenuNodeTest.php +++ b/core/modules/menu_ui/src/Tests/MenuNodeTest.php @@ -79,7 +79,7 @@ function testMenuNodeFormWidget() { 'menu_parent' => 'main:', ); $this->drupalPostForm('admin/structure/types/manage/page', $edit, t('Save content type')); - $this->assertText(t('The selected menu item is not under one of the selected menus.')); + $this->assertText(t('The selected menu link is not under one of the selected menus.')); $this->assertNoRaw(t('The content type %name has been updated.', array('%name' => 'Basic page'))); // Enable Tools menu as available menu. diff --git a/core/modules/views/src/Plugin/views/display/Page.php b/core/modules/views/src/Plugin/views/display/Page.php index 751b2fe..0b61dd4 100644 --- a/core/modules/views/src/Plugin/views/display/Page.php +++ b/core/modules/views/src/Plugin/views/display/Page.php @@ -169,7 +169,7 @@ public function optionsSummary(&$categories, &$options) { // This adds a 'Settings' link to the style_options setting if the style // has options. if ($menu['type'] == 'default tab') { - $options['menu']['setting'] = $this->t('Parent menu item'); + $options['menu']['setting'] = $this->t('Parent menu link'); $options['menu']['links']['tab_options'] = $this->t('Change settings for the parent menu'); } } @@ -182,7 +182,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { switch ($form_state->get('section')) { case 'menu': - $form['#title'] .= $this->t('Menu item entry'); + $form['#title'] .= $this->t('Menu link entry'); $form['menu'] = array( '#prefix' => '
', '#suffix' => '
', @@ -315,7 +315,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { } $form['tab_markup'] = array( - '#markup' => '
' . $this->t('When providing a menu item as a tab, Drupal needs to know what the parent menu item of that tab will be. Sometimes the parent will already exist, but other times you will need to have one created. The path of a parent item will always be the same path with the last part left off. i.e, if the path to this view is foo/bar/baz, the parent path would be foo/bar.') . '
', + '#markup' => '
' . $this->t('When providing a menu link as a tab, Drupal needs to know what the parent menu link of that tab will be. Sometimes the parent will already exist, but other times you will need to have one created. The path of a parent link will always be the same path with the last part left off. i.e, if the path to this view is foo/bar/baz, the parent path would be foo/bar.') . '
', ); $form['tab_options'] = array( @@ -326,9 +326,9 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { $form['tab_options']['type'] = array( '#prefix' => '
', '#suffix' => '
', - '#title' => $this->t('Parent menu item'), + '#title' => $this->t('Parent menu link'), '#type' => 'radios', - '#options' => array('none' => $this->t('Already exists'), 'normal' => $this->t('Normal menu item'), 'tab' => $this->t('Menu tab')), + '#options' => array('none' => $this->t('Already exists'), 'normal' => $this->t('Normal menu link'), 'tab' => $this->t('Menu tab')), '#default_value' => $tab_options['type'], ); $form['tab_options']['title'] = array( @@ -336,7 +336,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { '#title' => $this->t('Title'), '#type' => 'textfield', '#default_value' => $tab_options['title'], - '#description' => $this->t('If creating a parent menu item, enter the title of the item.'), + '#description' => $this->t('If creating a parent menu link, enter the title of the link.'), '#states' => array( 'visible' => array( array( @@ -352,7 +352,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { '#title' => $this->t('Description'), '#type' => 'textfield', '#default_value' => $tab_options['description'], - '#description' => $this->t('If creating a parent menu item, enter the description of the item.'), + '#description' => $this->t('If creating a parent menu link, enter the description of the link.'), '#states' => array( 'visible' => array( array( @@ -370,7 +370,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { '#type' => 'textfield', '#default_value' => $tab_options['weight'], '#size' => 5, - '#description' => $this->t('If the parent menu item is a tab, enter the weight of the tab. Heavier tabs will sink and the lighter tabs will be positioned nearer to the first menu item.'), + '#description' => $this->t('If the parent menu link is a tab, enter the weight of the tab. Heavier tabs will sink and the lighter tabs will be positioned nearer to the first menu link.'), '#states' => array( 'visible' => array( ':input[name="tab_options[type]"]' => array('value' => 'tab'), @@ -391,7 +391,7 @@ public function validateOptionsForm(&$form, FormStateInterface $form_state) { $path = $this->getOption('path'); $menu_type = $form_state->getValue(array('menu', 'type')); if ($menu_type == 'normal' && strpos($path, '%') !== FALSE) { - $form_state->setError($form['menu']['type'], $this->t('Views cannot create normal menu items for paths with a % in them.')); + $form_state->setError($form['menu']['type'], $this->t('Views cannot create normal menu links for paths with a % in them.')); } if ($menu_type == 'default tab' || $menu_type == 'tab') {