diff --git a/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php b/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php index 34f38e200d6cf143dc474e79e028c7f5f392c002..8e3433bc0e1b7c3e05adb06dd2d7f23b6468dcba 100644 --- a/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php +++ b/core/modules/menu_link_content/src/Plugin/Menu/MenuLinkContent.php @@ -194,7 +194,7 @@ public function getEditRoute() { * {@inheritdoc} */ public function getTranslateRoute() { - return $this->getEntity()->urlInfo('content-translation-overview'); + return $this->getEntity()->urlInfo('drupal:content-translation-overview'); } /** diff --git a/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php b/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php index a281583b0cec94b1ea1f88782f38831d425466d1..811f883f9112abdbdc691c2b3f7453c0b6ddd0b1 100644 --- a/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php +++ b/core/modules/menu_link_content/src/Tests/MenuLinkContentUITest.php @@ -8,6 +8,7 @@ namespace Drupal\menu_link_content\Tests; use Drupal\content_translation\Tests\ContentTranslationUITest; +use Drupal\menu_link_content\Entity\MenuLinkContent; /** * Tests the menu link content UI. @@ -62,6 +63,19 @@ protected function createEntity($values, $langcode, $bundle_name = NULL) { return parent::createEntity($values, $langcode, $bundle_name); } + /** + * Ensure that a translate link can be found on the menu edit form. + */ + public function testTranslationLinkOnMenuEditForm() { + $this->drupalGet('admin/structure/menu/manage/tools'); + $this->assertNoLink(t('Translate')); + + $menu_link_content = MenuLinkContent::create(['menu_name' => 'tools', 'route_name' => 'entity.menu.collection']); + $menu_link_content->save(); + $this->drupalGet('admin/structure/menu/manage/tools'); + $this->assertLink(t('Translate')); + } + /** * Tests that translation page inherits admin status of edit page. */