Commit 1cac4b5f authored by alexpott's avatar alexpott

Issue #977440 by andypost, amateescu: Clean-up comment links title attributes

parent e6844da4
......@@ -109,7 +109,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra
if (!empty($entity->get($field_name)->comment_count)) {
$links['comment-comments'] = array(
'title' => $this->formatPlural($entity->get($field_name)->comment_count, '1 comment', '@count comments'),
'attributes' => array('title' => $this->t('Jump to the first comment of this posting.')),
'attributes' => array('title' => $this->t('Jump to the first comment.')),
'fragment' => 'comments',
'url' => $entity->urlInfo(),
);
......@@ -119,7 +119,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra
'url' => Url::fromRoute('<current>'),
'attributes' => array(
'class' => 'hidden',
'title' => $this->t('Jump to the first new comment of this posting.'),
'title' => $this->t('Jump to the first new comment.'),
'data-history-node-last-comment-timestamp' => $entity->get($field_name)->last_comment_timestamp,
'data-history-node-field-name' => $field_name,
),
......@@ -134,7 +134,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra
$links['comment-add'] = array(
'title' => $this->t('Add new comment'),
'language' => $entity->language(),
'attributes' => array('title' => $this->t('Add a new comment to this page.')),
'attributes' => array('title' => $this->t('Share your thoughts and opinions.')),
'fragment' => 'comment-form',
);
if ($comment_form_location == CommentItemInterface::FORM_SEPARATE_PAGE) {
......@@ -168,7 +168,7 @@ public function buildCommentedEntityLinks(FieldableEntityInterface $entity, arra
if ($comment_form_location == CommentItemInterface::FORM_SEPARATE_PAGE || (!empty($entity->get($field_name)->comment_count) && $this->currentUser->hasPermission('access comments'))) {
$links['comment-add'] = array(
'title' => $this->t('Add new comment'),
'attributes' => array('title' => $this->t('Share your thoughts and opinions related to this posting.')),
'attributes' => array('title' => $this->t('Share your thoughts and opinions.')),
'fragment' => 'comment-form',
);
if ($comment_form_location == CommentItemInterface::FORM_SEPARATE_PAGE) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment