diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index d0913868332..604cb93b956 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1024,7 +1024,7 @@ function comment_form_node_type_form_alter(&$form, $form_state) { if (module_exists('content_translation')) { $comment_form = $form; $comment_form_state['content_translation']['key'] = 'language_configuration'; - $form['comment'] += translation_entity_enable_widget('comment', 'comment_node_' . $node_type->id(), $comment_form, $comment_form_state); + $form['comment'] += content_translation_enable_widget('comment', 'comment_node_' . $node_type->id(), $comment_form, $comment_form_state); array_unshift($form['#submit'], 'comment_translation_configuration_element_submit'); } } diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSettingsTest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSettingsTest.php index 182eb64bc04..80c5a45b8f8 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSettingsTest.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationSettingsTest.php @@ -38,7 +38,7 @@ class ContentTranslationSettingsTest extends WebTestBase { $this->drupalCreateContentType(array('type' => 'article')); $this->drupalCreateContentType(array('type' => 'page')); - $admin_user = $this->drupalCreateUser(array('administer languages', 'administer content translation')); + $admin_user = $this->drupalCreateUser(array('administer languages', 'administer content translation', 'administer content types')); $this->drupalLogin($admin_user); } @@ -96,6 +96,11 @@ class ContentTranslationSettingsTest extends WebTestBase { $language_configuration = language_get_default_configuration('comment', 'comment_node_article'); $this->assertEqual($language_configuration['langcode'], 'current_interface', 'The default language for article comments is set to the current interface language.'); $this->assertTrue($language_configuration['language_show'], 'The language selector for article comments is shown.'); + + // Verify language widget appears on node type form. + $this->drupalGet('admin/structure/types/manage/article'); + $this->assertField('content_translation'); + $this->assertFieldChecked('edit-content-translation'); } /** diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestCache.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestCache.php index 615bffc9b46..c40b11e1768 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestCache.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Plugin/Core/Entity/EntityTestCache.php @@ -25,7 +25,7 @@ use Drupal\Core\Language\Language; * "form" = { * "default" = "Drupal\entity_test\EntityTestFormController" * }, - * "translation" = "Drupal\translation_entity\EntityTranslationControllerNG" + * "translation" = "Drupal\content_translation\ContentTranslationControllerNG" * }, * base_table = "entity_test", * fieldable = TRUE,