X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d1660a1c4fb71b61b7bd9181a2ec3822652bc29e..9f5787fd203fad5ffe1fb54525d65bf519457dc3:/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