X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/52611a5bfa69165179bd871b925b5f8b14942e2e..fd8a77552600ed2bff0bda0f0fd524a07998df4f:/app/models/notifier.rb diff --git a/app/models/notifier.rb b/app/models/notifier.rb index 5972a700b..341c9072a 100644 --- a/app/models/notifier.rb +++ b/app/models/notifier.rb @@ -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 + @event = comment.event if comment.author @commenter = comment.author.display_name @@ -137,9 +138,9 @@ class Notifier < ActionMailer::Base 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 - 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