diff --git a/core/modules/content_translation/content_translation.pages.inc b/core/modules/content_translation/content_translation.pages.inc index fca8b9a..b5e328e 100644 --- a/core/modules/content_translation/content_translation.pages.inc +++ b/core/modules/content_translation/content_translation.pages.inc @@ -23,7 +23,7 @@ function content_translation_overview(EntityInterface $entity) { $languages = language_list(); $original = $entity->getUntranslated()->language()->id; $translations = $entity->getTranslationLanguages(); - $field_ui = \Drupal::moduleHandler()->moduleExists('field_ui') && user_access('administer ' . $entity->entityType() . ' fields'); + $administrator = user_access('administer languages'); $rel = array(); foreach (array('canonical', 'edit-form', 'drupal:content-translation-overview') as $name) { @@ -122,12 +122,8 @@ function content_translation_overview(EntityInterface $entity) { $links['add'] = isset($add_links->links[$langcode]['href']) ? $add_links->links[$langcode] : array('href' => $add_path, 'language' => $language); $links['add']['title'] = t('Add'); } - elseif ($field_ui) { - $entity_path = $entity_manager->getAdminPath($entity->entityType(), $entity->bundle()); - // Link directly to the fields tab to make it easier to find the - // setting to enable translation on fields. - $path = $entity_path . '/fields'; - $links['nofields'] = array('title' => t('No translatable fields'), 'href' => $path, 'language' => $language); + elseif ($administrator) { + $links['nofields'] = array('title' => t('No translatable fields'), 'href' => 'admin/config/regional/content-language', 'language' => $language); } } diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php index d75da20..c8d554c 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeTranslationUITest.php @@ -70,7 +70,7 @@ protected function getEditorPermissions() { * {@inheritdoc} */ protected function getAdministratorPermissions() { - return array_merge(parent::getAdministratorPermissions(), array('access administration pages', 'administer content types', 'administer node fields', 'access content overview', 'bypass node access')); + return array_merge(parent::getAdministratorPermissions(), array('access administration pages', 'administer content types', 'administer node fields', 'access content overview', 'bypass node access', 'administer languages')); } /**