Opened 9 years ago
Last modified 6 years ago
#917 new defect
Comment notifications are sent in the sender's language setting
|Reported by:||ayleph||Owned by:|
|Component:||programming||Keywords:||comment, language, locale|
When a user comments on a media entry, the notification email sent to the recipient is sent in the sender's language locale, not the recipient's.
Change History (5)
comment:1 by , 9 years ago
comment:2 by , 7 years ago
I can't think of a better way. Maybe we could add a migration to extend the LocalUser class as below and then query the user's
locale_preference when sending email to that user. CCing tsyesika for input.
@@ -371,6 +371,7 @@ class LocalUser(User): wants_comment_notification = Column(Boolean, default=True) wants_notifications = Column(Boolean, default=True) license_preference = Column(Unicode) + locale_preference = Column(Unicode) uploaded = Column(Integer, default=0) upload_limit = Column(Integer)
Edit: We'd probably also want to add something to the user profile page to allow them to select a locale, possibly on registration. That might be more reliable than relying on the browser to tell us.
comment:3 by , 7 years ago
I think adding a locale preference option on the user model is an excellent idea. This should also be configurable in the UI I think (but default to whatever the browser tells us upon joining).
comment:4 by , 7 years ago
Thanks for the input Tsyesika. At this point you're much more familiar with the user model than I am, so getting your approval makes it sound like a workable idea. I'll try to start working on some code changes to incorporate a locale preference and add UI configuration options. Eventually we'll need a migration as well.
comment:5 by , 6 years ago
It looks like this is a duplicate of #504. However, since the original ticket has almost no discussion, I'm going to close it in favor of this one.
Also, it appears that the idea of adding a language preference previously appeared in #247, so I've double-duplicated tickets. However, since both of these tickets have useful comments about how to address the issue, I don't want to close either one yet.
Does mediagoblin even have the concept of a user's language besides what the current request passes? As best as I can tell it doesn't. Perhaps mediagoblin should add a configurable user setting for preferred language, defaulting to whatever header they passed when they created an account.