Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
comment.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Nov 2009 at 15:24 UTC
Updated:
2 Dec 2009 at 19:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
peximo commentedTo avoid this behavior we need to set default comment language to language neutral without locale enabled, like node, and set this to content language via locale module.
Comment #2
plachlet's test this
Comment #3
moshe weitzman commentedWould it work to simplify the last line:
BEFORE:
$form['language']['#value'] = empty($form['language']['#value']) ? $language->language : $form['language']['#value'];AFTER:
$form['language']['#default_value'] = $language->languageComment #4
peximo commentedThe form element type 'value' (and $form['language'] is a 'value' type) doesn't have a property 'default_value', so $form['language']['#default_value'] doesn't work.
Comment #5
moshe weitzman commentedComment #6
plachWhat about the following?
(We might avoid an unecessary function call)
This review is powered by Dreditor.
Comment #7
peximo commentedFixed with plach suggestion.
Comment #8
plachlooks good!
Comment #9
dries commentedIt seems like both the current approach, and the approach taken by this patch make assumptions about the language of a comment.
Reality is that both are potentially flawed. Admittedly, the approach taken in this patch is probably less flawed because the assumption seems better.
On my personal blog, which is written in English, the assumption would still fail -- my posts are always in English, but people sometimes reply in Dutch because they know I speak Dutch.
PS: Mollom has an API that can be used to identify the language a piece of content is written in. Maybe the Mollom module for Drupal 7 needs to be extended to set the actual language, instead of a language that has been guessed based on the context.
Comment #10
peximo commentedHi, I fully agree that both approaches make assumptions about language. But the previous approach is IMO also incorrect because without locale all content (nodes, comments...) must be language neutral.
I have also changed #605630: Comment language administration UI to make explicit this assumption allowing user with proper permissions to select the comment language.
This whould be a great solution.
Comment #11
webchickDries, it's not clear to me your concerns with this patch? Should I commit it, or did you want some adjustments made?
Comment #12
dries commentedCommitted to CVS HEAD.