diff --git a/core/modules/content_translation/src/Controller/ContentTranslationController.php b/core/modules/content_translation/src/Controller/ContentTranslationController.php
index 41092e3..c82eda3 100644
--- a/core/modules/content_translation/src/Controller/ContentTranslationController.php
+++ b/core/modules/content_translation/src/Controller/ContentTranslationController.php
@@ -177,10 +177,10 @@ public function overview(RouteMatchInterface $route_match, $entity_type_id = NUL
elseif (!$is_original && $handler->getTranslationAccess($entity, 'update')->isAllowed()) {
$links['edit']['url'] = $edit_url;
}
-
if (isset($links['edit'])) {
$links['edit']['title'] = $this->t('Edit');
}
+
$status = array('data' => array(
'#type' => 'inline_template',
'#template' => '{% if status %}{{ "Published"|t }}{% else %}{{ "Not published"|t }}{% endif %}{% if outdated %} {{ "outdated"|t }}{% endif %}',
@@ -197,17 +197,15 @@ public function overview(RouteMatchInterface $route_match, $entity_type_id = NUL
else {
$source_name = isset($languages[$source]) ? $languages[$source]->getName() : $this->t('n/a');
if ($entity->access('delete') && $entity_type->hasLinkTemplate('delete-form')) {
- $links['delete'] = array(
- 'title' => $this->t('Delete'),
- 'url' => $entity->urlInfo('delete-form'),
- 'language' => $language,
- );
+ $url = $entity->urlInfo('delete-form');
+ $url->setOption('query', [ContentTranslationFormLanguage::QUERY_PARAMETER => $langcode] + $destination);
+ $links['delete']['url'] = $url;
}
elseif ($handler->getTranslationAccess($entity, 'delete')->isAllowed()) {
- $links['delete'] = array(
- 'title' => $this->t('Delete'),
- 'url' => $delete_url,
- );
+ $links['delete']['url'] = $delete_url;
+ }
+ if (isset($links['delete'])) {
+ $links['delete']['title'] = $this->t('Delete');
}
}
}
diff --git a/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php b/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php
index 72b9b16..0193188 100644
--- a/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php
+++ b/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php
@@ -187,8 +187,6 @@ protected function doTestWorkflows(UserInterface $user, $expected_status) {
// An editor should be pointed to the entity form in multilingual mode.
// We need a new expected edit path with a new language.
$translate_url = $this->entity->url('drupal:content-translation-overview', ['language' => $languages[$this->langcodes[1]], 'absolute' => FALSE]);
- debug($translate_url);
- debug(Url::fromRoute('')->toString());
$options = ['query' => [ContentTranslationFormLanguage::QUERY_PARAMETER => $langcode, 'destination' => $translate_url]];
$expected_edit_url = $this->entity->url('edit-form', $options);
$this->assertUrl($expected_edit_url, [], 'The translation overview points to the edit form for editors when editing translations.');