Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internationalized body of mailers #1989

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/views/devise/mailer/confirmation_instructions.html.erb
@@ -1,5 +1,6 @@
<p>Welcome <%= @resource.email %>!</p>
<p><%= t('devise.mailer.confirmation_instructions.greeting', :recepient => @resource.email) %></p>

<p>You can confirm your account email through the link below:</p>
<p><%= t('devise.mailer.confirmation_instructions.instruction') %></p>

<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
<p><%= link_to t('devise.mailer.confirmation_instructions.action'),
confirmation_url(@resource, :confirmation_token => @resource.confirmation_token) %></p>
10 changes: 5 additions & 5 deletions app/views/devise/mailer/reset_password_instructions.html.erb
@@ -1,8 +1,8 @@
<p>Hello <%= @resource.email %>!</p>
<p><%= t('devise.mailer.reset_password_instructions.greeting', :recepient => @resource.email) %></p>

<p>Someone has requested a link to change your password, and you can do this through the link below.</p>
<p><%= t('devise.mailer.reset_password_instructions.instruction') %></p>

<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>
<p><%= link_to t('devise.mailer.reset_password_instructions.action'), edit_password_url(@resource, :reset_password_token => @resource.reset_password_token) %></p>

<p>If you didn't request this, please ignore this email.</p>
<p>Your password won't change until you access the link above and create a new one.</p>
<p><%= t('devise.mailer.reset_password_instructions.instruction_2') %></p>
<p><%= t('devise.mailer.reset_password_instructions.instruction_3') %></p>
8 changes: 4 additions & 4 deletions app/views/devise/mailer/unlock_instructions.html.erb
@@ -1,7 +1,7 @@
<p>Hello <%= @resource.email %>!</p>
<p><%= t('devise.mailer.unlock_instructions.greeting', :recepient => @resource.email) %></p>

<p>Your account has been locked due to an excessive amount of unsuccessful sign in attempts.</p>
<p><%= t('devise.mailer.unlock_instructions.message') %></p>

<p>Click the link below to unlock your account:</p>
<p><%= t('devise.mailer.unlock_instructions.instruction') %></p>

<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
<p><%= link_to t('devise.mailer.unlock_instructions.action'), unlock_url(@resource, :unlock_token => @resource.unlock_token) %></p>
11 changes: 11 additions & 0 deletions config/locales/en.yml
Expand Up @@ -53,7 +53,18 @@ en:
mailer:
confirmation_instructions:
subject: 'Confirmation instructions'
greeting: 'Welcome %{recepient}!'
instruction: 'You can confirm your account email through the link below:'
action: 'Confirm my account'
reset_password_instructions:
subject: 'Reset password instructions'
greeting: 'Hello %{recepient}!'
instruction: 'Someone has requested a link to change your password, and you can do this through the link below.'
action: 'Change my password'
instruction_2: "If you didn't request this, please ignore this email."
instruction_3: "Your password won't change until you access the link above and create a new one."
unlock_instructions:
subject: 'Unlock Instructions'
greeting: 'Hello %{recepient}!'
message: 'Your account has been locked due to an excessive amount of unsuccessful sign in attempts.'
instruction: 'Click the link below to unlock your account:'