diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php index 7ee62a0..0c4487c 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigEntityListBuilder.php @@ -37,19 +37,25 @@ public function getDefaultOperations(EntityInterface $entity) { /** @var \Drupal\Core\Config\Entity\ConfigEntityInterface $entity */ $operations = parent::getDefaultOperations($entity); + // Set language of each default operation unspecified, so operations keep + // the current interface language of the page. + foreach($operations as &$operation) { + $operation['url']->setOption('language', NULL); + } + if ($this->entityType->hasKey('status')) { if (!$entity->status() && $entity->hasLinkTemplate('enable')) { $operations['enable'] = array( 'title' => t('Enable'), 'weight' => -10, - 'url' => $entity->urlInfo('enable'), + 'url' => $entity->urlInfo('enable', ['language' => NULL]), ); } elseif ($entity->hasLinkTemplate('disable')) { $operations['disable'] = array( 'title' => t('Disable'), 'weight' => 40, - 'url' => $entity->urlInfo('disable'), + 'url' => $entity->urlInfo('disable', ['language' => NULL]), ); } } diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module index b4f882b..171adab 100644 --- a/core/modules/config_translation/config_translation.module +++ b/core/modules/config_translation/config_translation.module @@ -170,7 +170,7 @@ function config_translation_entity_operation(EntityInterface $entity) { $operations['translate'] = array( 'title' => t('Translate'), 'weight' => 50, - 'url' => $entity->urlInfo($link_template), + 'url' => $entity->urlInfo($link_template, ['language' => NULL]), ); } diff --git a/core/modules/content_translation/content_translation.module b/core/modules/content_translation/content_translation.module index 3b29ecc..53d3302 100644 --- a/core/modules/content_translation/content_translation.module +++ b/core/modules/content_translation/content_translation.module @@ -215,7 +215,7 @@ function content_translation_entity_operation(EntityInterface $entity) { if ($entity->hasLinkTemplate('drupal:content-translation-overview') && content_translation_translate_access($entity)->isAllowed()) { $operations['translate'] = array( 'title' => t('Translate'), - 'url' => $entity->urlInfo('drupal:content-translation-overview'), + 'url' => $entity->urlInfo('drupal:content-translation-overview', ['language' => NULL]), 'weight' => 50, ); } diff --git a/core/modules/menu_ui/src/MenuListBuilder.php b/core/modules/menu_ui/src/MenuListBuilder.php index d93f945..5eb7890 100644 --- a/core/modules/menu_ui/src/MenuListBuilder.php +++ b/core/modules/menu_ui/src/MenuListBuilder.php @@ -54,7 +54,7 @@ public function getDefaultOperations(EntityInterface $entity) { $operations['add'] = array( 'title' => t('Add link'), 'weight' => 20, - 'url' => $entity->urlInfo('add-link-form'), + 'url' => $entity->urlInfo('add-link-form', ['language' => NULL]), ); } if (isset($operations['delete'])) {