Make the rest of the email translatable.

This commit is contained in:
Tom Hughes 2009-06-05 23:53:47 +00:00
parent 606e5ed267
commit d9dbd3edf1
9 changed files with 76 additions and 54 deletions

View file

@ -1,7 +1,7 @@
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)
@ -10,7 +10,7 @@ class Notifier < ActionMailer::Base
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",
@ -19,7 +19,7 @@ class Notifier < ActionMailer::Base
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)
@ -27,7 +27,7 @@ class Notifier < ActionMailer::Base
def reset_password(user, pass)
common_headers user
subject "[OpenStreetMap] Password reset"
subject I18n.t('notifier.reset_password.subject')
body :pass => pass
end
@ -53,11 +53,11 @@ class Notifier < ActionMailer::Base
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),
@ -68,7 +68,7 @@ class Notifier < ActionMailer::Base
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,
@ -97,7 +97,7 @@ class Notifier < ActionMailer::Base
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",

View file

@ -1,8 +1,7 @@
<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>

View file

@ -1,8 +1,8 @@
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 %>

View file

@ -1,8 +1,7 @@
<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>

View file

@ -1,8 +1,8 @@
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 %>

View file

@ -1,42 +1,24 @@
***************************************************************************
* *
* 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. *
* *
* Sil 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. *
* *
* Sil 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' %>
* *
***************************************************************************

View file

@ -1,3 +1,3 @@
<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>

View file

@ -1,3 +1,3 @@
Hi,
<%= t 'notifier.reset_password_plain.greeting' %>
Your password has been reset to <%= @pass %>
<%= t 'notifier.reset_password_plain.reset', :new_password => @pass %>