]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/notifier.rb
Add iD editor
[rails.git] / app / models / notifier.rb
index 5972a700b8af794c9246c777df171a458e445820..341c9072a94b6635e1a7b409267b400c320c5cfc 100644 (file)
@@ -129,6 +129,7 @@ class Notifier < ActionMailer::Base
     @place = Nominatim.describe_location(comment.note.lat, comment.note.lon, 14, @locale)
     @comment = comment.body
     @owner = recipient == comment.note.author
     @place = Nominatim.describe_location(comment.note.lat, comment.note.lon, 14, @locale)
     @comment = comment.body
     @owner = recipient == comment.note.author
+    @event = comment.event
 
     if comment.author
       @commenter = comment.author.display_name
 
     if comment.author
       @commenter = comment.author.display_name
@@ -137,9 +138,9 @@ class Notifier < ActionMailer::Base
     end
 
     if @owner
     end
 
     if @owner
-      subject = I18n.t('notifier.note_comment_notification.subject_own', :commenter => @commenter)
+      subject = I18n.t("notifier.note_comment_notification.#{@event}.subject_own", :commenter => @commenter)
     else
     else
-      subject = I18n.t('notifier.note_comment_notification.subject_other', :commenter => @commenter)
+      subject = I18n.t("notifier.note_comment_notification.#{@event}.subject_other", :commenter => @commenter)
     end
 
     mail :to => recipient.email, :subject => subject
     end
 
     mail :to => recipient.email, :subject => subject