This is a follow-up in response to #1188388-98: Entity translation UI in core

Problem

Comment language is by default set to the detected content languge when posting a comment for the first time. The assumption behind this behavior is that a user is likely to comment in the same language of the content she is commenting. Since the same content may be displayed in different languages when translated, we may end up with a list of comments in different languages. This may work in some scenarios but in others we may need to filter them out per language.

Proposed Solution

Introduce on option in the comment settings to display only comments whose language matches the detected content language.

Next Steps

This summary needs to be clarified by plach.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YesCT’s picture

Issue summary: View changes

Updated issue summary. corrected comment link to be 98 instead of 97

plach’s picture

Issue summary: View changes

Updated issue summary.

plach’s picture

Title: Filter comments taking into account translation availability or status [Follow-up to Entity Translation UI in core] » Filter comments taking into account translation availability or status
Component: entity system » translation_entity.module
Category: feature » task

This is not a feature: we need this to remove nod translation.

plach’s picture

Title: Filter comments taking into account translation availability or status » Filter comments taking into account the current content language

This will not be necessary if the comment list become a views block.

YesCT’s picture

Issue tags: +Novice

Related: #1834276: establish what needs to be done to remove Content Translation from core and then remove it

Next steps:
find the issue for making the comments a views block (or create the issue) and post back here with a link to the issue. (novice)

joates’s picture

i have searched all 10 pages of Drupal core issues tagged VDC for the keyword "comment" and found none that concern this discussion directly.

there exists an issue suggesting to include the admin listing of comments as a view (here) but we are discussing moving the actual user comments (attached to a node view) into a separate block aren't we?

probably a new issue needs to be created. (by someone with more experience than me)

joates’s picture

Issue tags: -Novice

i did the searching but i don't have the knowledge of how views is being integrated into core to be able to create the new issue.

removed novice tag.

plach’s picture

YesCT’s picture

YesCT’s picture

ah, maybe we are waiting to see how #1938062: Convert the recent_comments block to a view goes. (See #2.)

plach’s picture

Actually I was hoping that #1938096: Convert the node comments list to a view would solve this for us.

Gábor Hojtsy’s picture

Component: translation_entity.module » content_translation.module
Gábor Hojtsy’s picture

Issue summary: View changes

Updated issue summary.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jibran’s picture

Issue summary: View changes

A blast from the past #1823450-13: [Meta] Convert core listings to Views @plach wrote:

Given #10 what about node comments? Among the rest, this would make #1807322: Filter comments taking into account the current content language not necessary.

or see #2.
Good news #1986606: Convert the comments administration screen to a view is in. Do we want to close this as outdated?

dgovorunov’s picture

As I can see original issue request still not implemented.

Node comments via views is a very useful feature for multilingual projects.
With this feature developers could easily add language related auto or exposed filters.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

cptX’s picture

Can anybody answer if this functionality is available in D9? I see references in internet about an option called "Filter comments per language" but probably was in D7 and not in D8/D9 anymore! Can anybody tell me how can I achieve this functionality? Is there any view for comments on node?

rgz_russia’s picture

Any news? It should be possible to filter comments.

apaderno’s picture

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

penyaskito’s picture

Version: 9.5.x-dev » 10.1.x-dev
Status: Active » Needs review
FileSize
0 bytes

WIP: This would filter comments per language.

If we have a thread, and the root comment is not translated but the responses are, there are weird identations as the first won't be shown.
It would be great checking how D7 worked in that scenario.

Scenario: node translated in English and Spanish

Add comment 1. in English
Add comment 1.1 in Spanish
Add comment 2 in English
Translate comment 2 to Spanish
Add comment 3 in Spanish

In English I should see:

1
2

In Spanish I should see:
1.2? Not sure. Also not sure if it's good enough if it has the wrong identation as probably it's not a very common scenario.
2
3

penyaskito’s picture

Accidentally uploaded empty patch.

apaderno’s picture

Status: Needs review » Needs work
sahil.goyal’s picture

Fixing a minor CCF error to make #29 pass the test.

apaderno’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs tests, +Needs upgrade path

Since this is adding a new configuration option it will need an upgrade path for existing sites. With test coverage.

penyaskito’s picture

Next step is not adding tests or upgrade path, but decide if this is something we want to do and if patch at #28 is good enough.

A screenshot of how does it look in D7 when we have an scenario like the described in #28 would be helpful.

I'll attach screenshots of how it looks like in D10.1 with that patch if noone beats me to do it.

smustgrave’s picture

Gotcha

Never put thought into it but wonder how most sites (non Drupal) handle comments in different languages.

If an article is posted wouldn’t someone like to see all comments vs maybe the comments just in my language.

But can see the other side of if majority of comments are in another language may not be useful.

Just thinking out loud

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.