Translate the subject and be sure to set the charset to utf-8 for the mail.
svn path=/plone.app.discussion/trunk/; revision=39587
This commit is contained in:
parent
da81b1073b
commit
4b15b31e51
@ -197,7 +197,8 @@ def notify_user(obj, event):
|
|||||||
for comment in conversation.getComments():
|
for comment in conversation.getComments():
|
||||||
if obj != comment and \
|
if obj != comment and \
|
||||||
comment.author_notification and comment.author_email:
|
comment.author_notification and comment.author_email:
|
||||||
subject = _(u"A comment has been posted.")
|
subject = translate(_(u"A comment has been posted."),
|
||||||
|
context=obj.REQUEST)
|
||||||
message = translate(Message(MAIL_NOTIFICATION_MESSAGE,
|
message = translate(Message(MAIL_NOTIFICATION_MESSAGE,
|
||||||
mapping={'title': obj.title,
|
mapping={'title': obj.title,
|
||||||
'link': content_object.absolute_url()}),
|
'link': content_object.absolute_url()}),
|
||||||
@ -244,7 +245,7 @@ def notify_moderator(obj, event):
|
|||||||
|
|
||||||
# Compose email
|
# Compose email
|
||||||
#comment = conversation.getComments().next()
|
#comment = conversation.getComments().next()
|
||||||
subject = _(u"A comment has been posted.")
|
subject = translate(_(u"A comment has been posted."), context=obj.REQUEST)
|
||||||
message = translate(Message(MAIL_NOTIFICATION_MESSAGE,
|
message = translate(Message(MAIL_NOTIFICATION_MESSAGE,
|
||||||
mapping={'title': obj.title,
|
mapping={'title': obj.title,
|
||||||
'link': content_object.absolute_url()}),
|
'link': content_object.absolute_url()}),
|
||||||
@ -252,6 +253,6 @@ def notify_moderator(obj, event):
|
|||||||
|
|
||||||
# Send email
|
# Send email
|
||||||
if PLONE_4:
|
if PLONE_4:
|
||||||
mail_host.send(message, mto, sender, subject)
|
mail_host.send(message, mto, sender, subject, charset='utf-8')
|
||||||
else:
|
else:
|
||||||
mail_host.secureSend(message, mto, sender, subject=subject)
|
mail_host.secureSend(message, mto, sender, subject=subject, charset='utf-8')
|
||||||
|
Loading…
Reference in New Issue
Block a user