reset password email translation and fixes

jamesperet 9 years ago
parent
commit
8728b44be8

+ 9 - 5
app/views/devise/mailer/reset_password_instructions.html.erb

@@ -1,8 +1,12 @@
1
-<p>Hello <%= @resource.email %>!</p>
1
+<p><%= t 'reset_password.hello'%> <%= @resource.full_name %>!</p>
2 2
 
3
-<p>Someone has requested a link to change your password. You can do this through the link below.</p>
3
+<p><%= t 'reset_password.reset_text'%></p>
4 4
 
5
-<p><%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %></p>
5
+<p><%= link_to (t 'reset_password.change_my_password'), edit_password_url(@resource, reset_password_token: @token) %></p>
6 6
 
7
-<p>If you didn't request this, please ignore this email.</p>
8
-<p>Your password won't change until you access the link above and create a new one.</p>
7
+<p><%= t 'reset_password.not_requested'%></p>
8
+<p><%= t 'reset_password.password_will_not_change'%></p>
9
+
10
+<hr>
11
+<% @config = Info.first %>
12
+<p><i>Mensagem enviada pelo site <%= @config.website_link != nil ? (link_to @config.website_name, @config.website_link) : @config.website_name  %>.</i></p>

+ 1 - 1
app/views/devise/sessions/new.html.erb

@@ -6,7 +6,7 @@
6 6
 	     </div>
7 7
 	     <div class="panel-body">
8 8
 	         <form role="form">
9
-			    <%= bootstrap_flash %>
9
+			    <% bootstrap_flash %>
10 10
 			    <%= f.alert_message "Please fix the errors below."%>
11 11
 	             <fieldset>
12 12
 	                     <%= f.email_field :email, required: true, autofocus: true, class: "input-block-level" %>

+ 4 - 1
config/environments/development.rb

@@ -27,8 +27,11 @@ RailsWebsiteTemplate::Application.configure do
27 27
   # number of complex assets.
28 28
   config.assets.debug = true
29 29
   
30
-  #config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
30
+  config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
31
+  config.action_mailer.raise_delivery_errors = true
32
+  
31 33
   #config.action_mailer.delivery_method = :letter_opener
34
+  config.action_mailer.delivery_method = :smtp
32 35
   
33 36
   config.action_mailer.smtp_settings = {
34 37
       :address   => "smtp.mandrillapp.com",

+ 7 - 0
config/locales/email.en.yml

@@ -0,0 +1,7 @@
1
+en:
2
+  reset_password:
3
+    hello: Hello
4
+    reset_text: Someone has requested a link to change your password. You can do this through the link below.
5
+    change_my_password: Change my password
6
+    not_requested: "If you didn't request this, please ignore this email."
7
+    password_will_not_change: "Your password won't change until you access the link above and create a new one."

+ 8 - 0
config/locales/email.pt-BR.yml

@@ -0,0 +1,8 @@
1
+pt-BR:
2
+  reset_password:
3
+    hello: Olá
4
+    reset_text: Alguem requisitou um link para troca de senha. Você pode fazer isso seguindo o link abaixo.
5
+    change_my_password: Trocar minha senha
6
+    not_requested: "Se você não solicitou a mudança de senha, por favor ignore este email."
7
+    password_will_not_change: Sua senha não vai mudar a não ser que você crie uma nova.
8
+