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