class Notifier < ActionMailer::Base
def signup_confirm(user, token)
common_headers user
- subject "[OpenStreetMap] Confirm your email address"
+ subject I18n.t('notifier.signup_confirm.subject')
body :url => url_for(:host => SERVER_URL,
:controller => "user", :action => "confirm",
:confirm_string => token.token)
def email_confirm(user, token)
common_headers user
recipients user.new_email
- subject "[OpenStreetMap] Confirm your email address"
+ subject I18n.t('notifier.email_confirm.subject')
body :address => user.new_email,
:url => url_for(:host => SERVER_URL,
:controller => "user", :action => "confirm_email",
def lost_password(user, token)
common_headers user
- subject "[OpenStreetMap] Password reset request"
+ subject I18n.t('notifier.lost_password.subject')
body :url => url_for(:host => SERVER_URL,
:controller => "user", :action => "reset_password",
:email => user.email, :token => token.token)
def reset_password(user, pass)
common_headers user
- subject "[OpenStreetMap] Password reset"
+ subject I18n.t('notifier.reset_password.subject')
body :pass => pass
end
def message_notification(message)
common_headers message.recipient
- subject "[OpenStreetMap] #{message.sender.display_name} sent you a new message"
+ subject I18n.t('notifier.message_notification.subject', :user => message.sender.display_name)
body :to_user => message.recipient.display_name,
:from_user => message.sender.display_name,
:body => message.body,
- :subject => message.title,
+ :title => message.title,
:readurl => url_for(:host => SERVER_URL,
:controller => "message", :action => "read",
:message_id => message.id),
def diary_comment_notification(comment)
common_headers comment.diary_entry.user
- subject "[OpenStreetMap] #{comment.user.display_name} commented on your diary entry"
+ subject I18n.t('notifier.diary_comment_notification.subject', :user => comment.user.display_name)
body :to_user => comment.diary_entry.user.display_name,
:from_user => comment.user.display_name,
:body => comment.body,
befriendee = User.find_by_id(friend.friend_user_id)
common_headers befriendee
- subject "[OpenStreetMap] #{befriender.display_name} added you as a friend"
+ subject I18n.t('notifier.friend_notification.subject', :user => befriender.display_name)
body :user => befriender.display_name,
:userurl => url_for(:host => SERVER_URL,
:controller => "user", :action => "view",
-<p>Hi,</p>
+<p><%= t 'notifier.email_confirm_html.greeting' %></p>
-<p>Someone (hopefully you) would like to change their email address over at
- <%= SERVER_URL %> to <%= @address %>.</p>
+<p><%= t 'notifier.email_confirm_html.hopefully_you', :server_url => SERVER_URL, :new_address => @address %></p>
-<p>If this is you, please click the link below to confirm the change.</p>
+<p><%= t 'notifier.email_confirm_html.click_the_link' %></p>
<p><a href="<%= @url %>"><%= @url %></a></p>
-Hi,
+<%= t 'notifier.email_confirm_plain.greeting' %>
-Someone (hopefully you) would like to change their email address over at
-<%= SERVER_URL %> to <%= @address %>.
+<%= t 'notifier.email_confirm_plain.hopefully_you_1' %>
+<%= t 'notifier.email_confirm_plain.hopefully_you_2', :server_url => SERVER_URL, :new_address => @address %>
-If this is you, please click the link below to confirm the change.
+<%= t 'notifier.email_confirm_plain.click_the_link' %>
<%= @url %>
-<p>Hi,</p>
+<p><%= t 'notifier.lost_password_html.greeting' %></p>
-<p>Someone (possibly you) has asked for the password to be reset on this
- email addresses openstreetmap.org account.</p>
+<p><%= t 'notifier.lost_password_html.hopefully_you' %></p>
-<p>If this is you, please click the link below to reset your password.</p>
+<p><%= t 'notifier.lost_password_html.click_the_link' %></p>
<p><a href="<%= @url %>"><%= @url %></a></p>
-Hi,
+<%= t 'notifier.lost_password_plain.greeting' %>
-Someone (possibly you) has asked for the password to be reset on this
-email addresses openstreetmap.org account.
+<%= t 'notifier.lost_password_plain.hopefully_you_1' %>
+<%= t 'notifier.lost_password_plain.hopefully_you_2' %>
-If this is you, please click the link below to reset your password.
+<%= t 'notifier.lost_password_plain.click_the_link' %>
<%= @url %>
***************************************************************************
* *
-* Please do not reply to this email. *
-* Use the OpenStreetMap web site to reply. *
-* *
-* Bitte antworten Sie nicht auf diese E-Mail. *
-* Verwenden Sie die OpenStreetMap Website zum Antworten. *
-* *
-* Por favor, no responda a este mensaje. *
-* Utilice el OpenStreetMap sitio web para responder. *
-* *
-* S’il vous plaît de ne pas répondre à ce message. *
-* Utilisez le OpenStreetMap site Web pour y répondre. *
+<%= t'notifier.message_notification.banner1' %>
+<%= t'notifier.message_notification.banner2' %>
* *
***************************************************************************
-Hi <%= @to_user %>,
+<%= t'notifier.message_notification.hi', :to_user => @to_user %>
-<%= @from_user %> has sent you a message through OpenStreetMap with the subject "<%= @subject %>":
+<%= t'notifier.message_notification.header', :from_user => @from_user, :subject => @title %>
==
<%= @body %>
==
-You can also read the message at <%= @readurl %>
-and you can reply at <%= @replyurl %>
+<%= t'notifier.message_notification.footer1', :readurl => @readurl %>
+<%= t'notifier.message_notification.footer2', :replyurl => @replyurl %>
***************************************************************************
* *
-* Please do not reply to this email. *
-* Use the OpenStreetMap web site to reply. *
-* *
-* Bitte antworten Sie nicht auf diese E-Mail. *
-* Verwenden Sie die OpenStreetMap Website zum Antworten. *
-* *
-* Por favor, no responda a este mensaje. *
-* Utilice el OpenStreetMap sitio web para responder. *
-* *
-* S’il vous plaît de ne pas répondre à ce message. *
-* Utilisez le OpenStreetMap site Web pour y répondre. *
+<%= t'notifier.message_notification.banner1' %>
+<%= t'notifier.message_notification.banner2' %>
* *
***************************************************************************
-<p>Hi,</p>
+<p><%= t 'notifier.reset_password_html.greeting' %></p>
-<p>Your password has been reset to <%= @pass %></p>
+<p><%= t 'notifier.reset_password_html.reset', :new_password => @pass %></p>
-Hi,
+<%= t 'notifier.reset_password_plain.greeting' %>
-Your password has been reset to <%= @pass %>
+<%= t 'notifier.reset_password_plain.reset', :new_password => @pass %>
alt_donation: Make a Donation
notifier:
diary_comment_notification:
+ subject: "[OpenStreetMap] {{user}} commented on your diary entry"
banner1: "* Please do not reply to this email. *"
banner2: "* Use the OpenStreetMap web site to reply. *"
hi: "Hi {{to_user}},"
header: "{{from_user}} has commented on your recent OpenStreetMap diary entry with the subject {{subject}}:"
footer: "You can also read the comment at {{readurl}} and you can comment at {{commenturl}} or reply at {{replyurl}}"
+ message_notification:
+ subject: "[OpenStreetMap] {{user}} sent you a new message"
+ banner1: "* Please do not reply to this email. *"
+ banner2: "* Use the OpenStreetMap web site to reply. *"
+ hi: "Hi {{to_user}},"
+ header: "{{from_user}} has sent you a message through OpenStreetMap with the subject {{subject}}:"
+ footer1: "You can also read the message at {{readurl}}"
+ footer2: "and you can reply at {{replyurl}}"
friend_notification:
+ subject: "[OpenStreetMap] {{user}} added you as a friend"
had_added_you: "{{user}} has added you as a friend on OpenStreetMap."
see_their_profile: "You can see their profile at {{userurl}} and add them as a friend too if you wish."
+ signup_confirm:
+ subject: "[OpenStreetMap] Confirm your email address"
signup_confirm_plain:
greeting: "Hi there!"
hopefully_you: "Someone (hopefully you) would like to create an account over at"
wiki_signup: 'You may also want to <a href="http://wiki.openstreetmap.org/index.php?title=Special:Userlogin&type=signup&returnto=Main_Page">sign up to the OpenStreetMap wiki</a>.'
user_wiki_page: 'It is recommended that you create a user wiki page, which includes category tags noting where you are, such as <a href="http://wiki.openstreetmap.org/wiki/Category:Users_in_London">[[Category:Users_in_London]]</a>.'
current_user: 'A list of current users in categories, based on where in the world they are, is available from <a href="http://wiki.openstreetmap.org/wiki/Category:Users_by_geographical_region">Category:Users_by_geographical_region</a>.'
+ email_confirm:
+ subject: "[OpenStreetMap] Confirm your email address"
+ email_confirm_plain:
+ greeting: "Hi,"
+ hopefully_you_1: "Someone (hopefully you) would like to change their email address over at"
+ hopefully_you_2: "{{server_url}} to {{new_address}}."
+ click_the_link: "If this is you, please click the link below to confirm the change."
+ email_confirm_html:
+ greeting: "Hi,"
+ hopefully_you: "Someone (hopefully you) would like to change their email address over at {{server_url}} to {{new_address}}."
+ click_the_link: "If this is you, please click the link below to confirm the change."
+ lost_password:
+ subject: "[OpenStreetMap] Password reset request"
+ lost_password_plain:
+ greeting: "Hi,"
+ hopefully_you_1: "Someone (possibly you) has asked for the password to be reset on this"
+ hopefully_you_2: "email addresses openstreetmap.org account."
+ click_the_link: "If this is you, please click the link below to reset your password."
+ lost_password_html:
+ greeting: "Hi,"
+ hopefully_you: "Someone (possibly you) has asked for the password to be reset on this email address's openstreetmap.org account."
+ click_the_link: "If this is you, please click the link below to reset your password."
+ reset_password:
+ subject: "[OpenStreetMap] Password reset"
+ reset_password_plain:
+ greeting: "Hi,"
+ reset: "Your password has been reset to {{new_password}}"
+ reset_password_html:
+ greeting: "Hi,"
+ reset: "Your password has been reset to {{new_password}}"
message:
inbox:
title: "Inbox"