Use correct locale for note comment notification emails
authorTom Hughes <tom@compton.nu>
Mon, 27 May 2013 09:35:05 +0000 (10:35 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 27 May 2013 09:35:05 +0000 (10:35 +0100)
app/models/notifier.rb

index 341c9072a94b6635e1a7b409267b400c320c5cfc..3e66be8645ba727259932200a4d87a349aecd110 100644 (file)
@@ -134,13 +134,13 @@ class Notifier < ActionMailer::Base
     if comment.author
       @commenter = comment.author.display_name
     else
-      @commenter = I18n.t("notifier.note_comment_notification.anonymous")
+      @commenter = I18n.t("notifier.note_comment_notification.anonymous", :locale => @locale)
     end
 
     if @owner
-      subject = I18n.t("notifier.note_comment_notification.#{@event}.subject_own", :commenter => @commenter)
+      subject = I18n.t("notifier.note_comment_notification.#{@event}.subject_own", :commenter => @commenter, :locale => @locale)
     else
-      subject = I18n.t("notifier.note_comment_notification.#{@event}.subject_other", :commenter => @commenter)
+      subject = I18n.t("notifier.note_comment_notification.#{@event}.subject_other", :commenter => @commenter, :locale => @locale)
     end
 
     mail :to => recipient.email, :subject => subject