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)
|
@place = Nominatim.describe_location(comment.note.lat, comment.note.lon, 14, @locale)
|
||||||
@comment = comment.body
|
@comment = comment.body
|
||||||
@owner = recipient == comment.note.author
|
@owner = recipient == comment.note.author
|
||||||
|
@event = comment.event
|
||||||
|
|
||||||
if comment.author
|
if comment.author
|
||||||
@commenter = comment.author.display_name
|
@commenter = comment.author.display_name
|
||||||
|
@ -137,9 +138,9 @@ class Notifier < ActionMailer::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
if @owner
|
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
|
end
|
||||||
|
|
||||||
mail :to => recipient.email, :subject => subject
|
mail :to => recipient.email, :subject => subject
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<p><%= t 'notifier.note_comment_notification.greeting' %></p>
|
<p><%= t 'notifier.note_comment_notification.greeting' %></p>
|
||||||
|
|
||||||
<% if @owner %>
|
<% 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 %>
|
<% 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 %>
|
<% end %>
|
||||||
|
|
||||||
==
|
==
|
||||||
|
|
|
@ -1209,11 +1209,17 @@ en:
|
||||||
click_the_link: "If this is you, please click the link below to reset your password."
|
click_the_link: "If this is you, please click the link below to reset your password."
|
||||||
note_comment_notification:
|
note_comment_notification:
|
||||||
anonymous: An anonymous user
|
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,"
|
greeting: "Hi,"
|
||||||
your_note: "%{commenter} has left a comment on one of your map notes near %{place}."
|
commented:
|
||||||
commented_note: "%{commenter} has left a comment on a map note you have commented on. The note is near %{place}."
|
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}."
|
details: "More details about the note can be found at %{url}."
|
||||||
message:
|
message:
|
||||||
inbox:
|
inbox:
|
||||||
|
|
Loading…
Add table
Reference in a new issue