Make the notification mails for notes show when a note is resolved
This commit is contained in:
parent
d1660a1c4f
commit
9f5787fd20
3 changed files with 15 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<p><%= t 'notifier.note_comment_notification.greeting' %></p>
|
||||
|
||||
<% if @owner %>
|
||||
<p><%= t 'notifier.note_comment_notification.your_note', :commenter => @commenter, :place => @place %></p>
|
||||
<p><%= t "notifier.note_comment_notification.#{@event}.your_note", :commenter => @commenter, :place => @place %></p>
|
||||
<% else %>
|
||||
<p><%= t 'notifier.note_comment_notification.commented_note', :commenter => @commenter, :place => @place %></p>
|
||||
<p><%= t "notifier.note_comment_notification.#{@event}.commented_note", :commenter => @commenter, :place => @place %></p>
|
||||
<% end %>
|
||||
|
||||
==
|
||||
|
|
|
@ -1209,11 +1209,17 @@ en:
|
|||
click_the_link: "If this is you, please click the link below to reset your password."
|
||||
note_comment_notification:
|
||||
anonymous: An anonymous user
|
||||
subject_own: "[OpenStreetMap] %{commenter} has commented on one of your notes"
|
||||
subject_other: "[OpenStreetMap] %{commenter} has commented on a note you are interested in"
|
||||
greeting: "Hi,"
|
||||
your_note: "%{commenter} has left a comment on one of your map notes near %{place}."
|
||||
commented_note: "%{commenter} has left a comment on a map note you have commented on. The note is near %{place}."
|
||||
commented:
|
||||
subject_own: "[OpenStreetMap] %{commenter} has commented on one of your notes"
|
||||
subject_other: "[OpenStreetMap] %{commenter} has commented on a note you are interested in"
|
||||
your_note: "%{commenter} has left a comment on one of your map notes near %{place}."
|
||||
commented_note: "%{commenter} has left a comment on a map note you have commented on. The note is near %{place}."
|
||||
closed:
|
||||
subject_own: "[OpenStreetMap] %{commenter} has resolved one of your notes"
|
||||
subject_other: "[OpenStreetMap] %{commenter} has resolved a note you are interested in"
|
||||
your_note: "%{commenter} has resolved one of your map notes near %{place}."
|
||||
commented_note: "%{commenter} has resolved a map note you have commented on. The note is near %{place}."
|
||||
details: "More details about the note can be found at %{url}."
|
||||
message:
|
||||
inbox:
|
||||
|
|
Loading…
Add table
Reference in a new issue