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.
Comment | File | Size | Author |
---|---|---|---|
#31 | interdiff_29-31.txt | 634 bytes | sahil.goyal |
#31 | 1807322-31.patch | 6.38 KB | sahil.goyal |
| |||
#29 | 1807322-filter-comments-per-language-29.patch | 6.38 KB | penyaskito |
Comments
Comment #0.0
YesCT CreditAttribution: YesCT commentedUpdated issue summary. corrected comment link to be 98 instead of 97
Comment #0.1
plachUpdated issue summary.
Comment #1
plachThis is not a feature: we need this to remove nod translation.
Comment #2
plachThis will not be necessary if the comment list become a views block.
Comment #3
YesCT CreditAttribution: YesCT commentedRelated: #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)
Comment #4
joates CreditAttribution: joates commentedi 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)
Comment #5
joates CreditAttribution: joates commentedi 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.
Comment #6
plachAdded a link to this in #1823450-13: [Meta] Convert core listings to Views.
Comment #7
YesCT CreditAttribution: YesCT commentedshould this wait on #1778178: Convert comments to the new Entity Field API specifically #731724: Convert comment settings into a field to make them work with CMI and non-node entities ?
Comment #8
YesCT CreditAttribution: YesCT commentedah, maybe we are waiting to see how #1938062: Convert the recent_comments block to a view goes. (See #2.)
Comment #9
plachActually I was hoping that #1938096: Convert the node comments list to a view would solve this for us.
Comment #10
Gábor HojtsyComment #10.0
Gábor HojtsyUpdated issue summary.
Comment #15
jibranA blast from the past #1823450-13: [Meta] Convert core listings to Views @plach wrote:
or see #2.
Good news #1986606: Convert the comments administration screen to a view is in. Do we want to close this as outdated?
Comment #16
dgovorunov CreditAttribution: dgovorunov commentedAs 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.
Comment #21
cptX CreditAttribution: cptX commentedCan 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?
Comment #22
rgz_russia CreditAttribution: rgz_russia commentedAny news? It should be possible to filter comments.
Comment #23
apadernoComment #28
penyaskitoWIP: 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
Comment #29
penyaskitoAccidentally uploaded empty patch.
Comment #30
apadernoComment #31
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedFixing a minor CCF error to make #29 pass the test.
Comment #32
apadernoComment #33
smustgrave CreditAttribution: smustgrave at Mobomo commentedSince this is adding a new configuration option it will need an upgrade path for existing sites. With test coverage.
Comment #34
penyaskitoNext 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.
Comment #35
smustgrave CreditAttribution: smustgrave at Mobomo commentedGotcha
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