Loading core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php +5 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,11 @@ protected function doVocabularyListTest() { // Test if the link to translate actually goes to the translate page. $this->drupalGet($translate_link); $this->assertSession()->responseContains('<th>Language</th>'); // Test if the local task for translation is on this page. $this->assertSession()->linkExists('Translate taxonomy vocabulary'); $local_task_url = parse_url($this->getSession()->getPage()->findLink('Translate taxonomy vocabulary')->getAttribute('href')); $this->assertSame(base_path() . $translate_link, $local_task_url['path']); } /** Loading core/modules/taxonomy/taxonomy.module +15 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,21 @@ function taxonomy_theme_suggestions_taxonomy_term(array $variables) { return $suggestions; } /** * Implements hook_local_tasks_alter(). * * @todo Evaluate removing as part of https://www.drupal.org/node/2358923. */ function taxonomy_local_tasks_alter(&$local_tasks) { $local_task_key = 'config_translation.local_tasks:entity.taxonomy_vocabulary.config_translation_overview'; if (isset($local_tasks[$local_task_key])) { // The config_translation module expects the base route to be // entity.taxonomy_vocabulary.edit_form like it is for other configuration // entities. Taxonomy uses the overview_form as the base route. $local_tasks[$local_task_key]['base_route'] = 'entity.taxonomy_vocabulary.overview_form'; } } /** * Prepares variables for taxonomy term templates. * Loading Loading
core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php +5 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,11 @@ protected function doVocabularyListTest() { // Test if the link to translate actually goes to the translate page. $this->drupalGet($translate_link); $this->assertSession()->responseContains('<th>Language</th>'); // Test if the local task for translation is on this page. $this->assertSession()->linkExists('Translate taxonomy vocabulary'); $local_task_url = parse_url($this->getSession()->getPage()->findLink('Translate taxonomy vocabulary')->getAttribute('href')); $this->assertSame(base_path() . $translate_link, $local_task_url['path']); } /** Loading
core/modules/taxonomy/taxonomy.module +15 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,21 @@ function taxonomy_theme_suggestions_taxonomy_term(array $variables) { return $suggestions; } /** * Implements hook_local_tasks_alter(). * * @todo Evaluate removing as part of https://www.drupal.org/node/2358923. */ function taxonomy_local_tasks_alter(&$local_tasks) { $local_task_key = 'config_translation.local_tasks:entity.taxonomy_vocabulary.config_translation_overview'; if (isset($local_tasks[$local_task_key])) { // The config_translation module expects the base route to be // entity.taxonomy_vocabulary.edit_form like it is for other configuration // entities. Taxonomy uses the overview_form as the base route. $local_tasks[$local_task_key]['base_route'] = 'entity.taxonomy_vocabulary.overview_form'; } } /** * Prepares variables for taxonomy term templates. * Loading