diff --git a/core/modules/comment/src/CommentLinkBuilder.php b/core/modules/comment/src/CommentLinkBuilder.php index 22c1340..56b7101 100644 --- a/core/modules/comment/src/CommentLinkBuilder.php +++ b/core/modules/comment/src/CommentLinkBuilder.php @@ -179,6 +179,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra && $this->currentUser->hasPermission('access comments'))) { $links['comment-add'] = array( 'title' => $this->t('Add new comment'), + 'language' => $entity->language(), 'attributes' => array('title' => $this->t('Share your thoughts and opinions related to this posting.')), 'fragment' => 'comment-form', ); diff --git a/core/modules/comment/src/Tests/CommentPagerTest.php b/core/modules/comment/src/Tests/CommentPagerTest.php index 42af43a..66ade66 100644 --- a/core/modules/comment/src/Tests/CommentPagerTest.php +++ b/core/modules/comment/src/Tests/CommentPagerTest.php @@ -289,16 +289,16 @@ function testTwoPagers() { $account = $this->drupalCreateUser(array('administer node display')); $this->drupalLogin($account); $this->drupalGet('admin/structure/types/manage/article/display'); - $this->assertNoText(t('Pager ID: @id', array('@id' => 0)), 'No summary for standard pager'); - $this->assertText(t('Pager ID: @id', array('@id' => 1))); + $this->assertNoText(t(' using pager ID @id', array('@id' => 0)), 'No summary for standard pager'); + $this->assertText(t(' using pager ID @id', array('@id' => 1))); $this->drupalPostAjaxForm(NULL, array(), 'comment_settings_edit'); // Change default pager to 2. $this->drupalPostForm(NULL, array('fields[comment][settings_edit_form][settings][pager_id]' => 2), t('Save')); - $this->assertText(t('Pager ID: @id', array('@id' => 2))); + $this->assertText(t(' using pager ID @id', array('@id' => 2))); // Revert the changes back. $this->drupalPostAjaxForm(NULL, array(), 'comment_settings_edit'); $this->drupalPostForm(NULL, array('fields[comment][settings_edit_form][settings][pager_id]' => 0), t('Save')); - $this->assertNoText(t('Pager ID: @id', array('@id' => 0)), 'No summary for standard pager'); + $this->assertNoText(t(' using pager ID @id', array('@id' => 0)), 'No summary for standard pager'); $this->drupalLogin($this->admin_user); diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index ee43ca8..3354fbc 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -6,6 +6,7 @@ */ use Drupal\comment\CommentInterface; +use Drupal\comment\Entity\CommentType; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; use Drupal\Component\Utility\Xss; use Drupal\Core\Entity\EntityInterface; diff --git a/core/modules/rdf/src/Tests/CommentAttributesTest.php b/core/modules/rdf/src/Tests/CommentAttributesTest.php index 69a5966..882bc50 100644 --- a/core/modules/rdf/src/Tests/CommentAttributesTest.php +++ b/core/modules/rdf/src/Tests/CommentAttributesTest.php @@ -8,7 +8,7 @@ namespace Drupal\rdf\Tests; use Drupal\comment\CommentInterface; -use Drupal\comment\CommentManagerInterface; +use Drupal\comment\CommentTypeInterface; use Drupal\comment\Tests\CommentTestBase; /** @@ -39,7 +39,7 @@ protected function setUp() { $this->setCommentPreview(DRUPAL_OPTIONAL); $this->setCommentForm(TRUE); $this->setCommentSubject(TRUE); - $this->setCommentSettings('comment_default_mode', CommentManagerInterface::COMMENT_MODE_THREADED, 'Comment paging changed.'); + $this->setThreadingMode(CommentTypeInterface::THREADING_MODE_THREADED); // Prepares commonly used URIs. $this->base_uri = \Drupal::url('', [], ['absolute' => TRUE]);