Browse Source

i18n auth mailer

Maarten van den Berg 7 years ago
parent
commit
f1177aa201

+ 4 - 4
app/views/authentication_mailer/password_confirm_email.text.erb

1
-Hello <%= @user.person.first_name %>,
1
+<%= t 'authentication.emails.greeting', name: @user.person.first_name %>
2
 
2
 
3
-Please confirm your account for Aardbei by clicking on the following link:
3
+<%= t 'authentication.emails.confirm.click_this' %>
4
 
4
 
5
 <%= confirm_url(token: @token.token) %>
5
 <%= confirm_url(token: @token.token) %>
6
 
6
 
7
-This link will expire <%= @token.expires %>.
7
+<%= t 'authentication.emails.link_expires', expires: @token.expires %>
8
 
8
 
9
-Aardbei
9
+<%= t 'authentication.emails.ending' %>

+ 5 - 6
app/views/authentication_mailer/password_reset_email.text.erb

1
-Hello <%= @user.person.first_name %>,
1
+<%= t 'authentication.emails.greeting', name: @user.person.first_name %>
2
 
2
 
3
-You (or someone pretending to be you) have requested to reset your password.
4
-If this was you, please open the following link:
3
+<%= t 'authentication.emails.forgot.blurb' %>
5
 
4
 
6
 <%= reset_password_url(token: @token.token) %>
5
 <%= reset_password_url(token: @token.token) %>
7
 
6
 
8
-This link will expire at <%= @token.expires %>, and is usable only once.
9
-If you did not request this password reset, ignore this message.
7
+<%= t 'authentication.emails.link_expires', expires: @token.expires %>
8
+<%= t 'authentication.emails.forgot.ignore_if_not_you' %>
10
 
9
 
11
-Aardbei
10
+<%= t 'authentication.emails.ending' %>

+ 12 - 0
config/locales/authentication/en.yml

12
     new_password_confirm: Confirm new password
12
     new_password_confirm: Confirm new password
13
 
13
 
14
     need_introducer: Creating an account requires that you have been added to a group beforehand by an administrator. Contact someone if your email address is not recognized.
14
     need_introducer: Creating an account requires that you have been added to a group beforehand by an administrator. Contact someone if your email address is not recognized.
15
+
16
+    emails:
17
+      greeting: Hello %{name},
18
+      ending: Aardbei
19
+      link_expires: This link will expire %{expires}.
20
+
21
+      confirm:
22
+        click_this: Please confirm your account for Aardbei by clicking on the following link:
23
+
24
+      forgot:
25
+        blurb: You (or someone pretending to be you) have requested to reset your password. If this was you, please open the following link:
26
+        ignore_if_not_you: If you did not request this password reset, ignore this message.

+ 12 - 0
config/locales/authentication/nl.yml

12
     new_password_confirm: Herhaal nieuw wachtwoord
12
     new_password_confirm: Herhaal nieuw wachtwoord
13
 
13
 
14
     need_introducer: Je kan alleen een account aanmaken wanneer je door een beheerder aan een groep bent toegevoegd. Neem contact op met iemand wanneer je emailadres niet wordt herkend.
14
     need_introducer: Je kan alleen een account aanmaken wanneer je door een beheerder aan een groep bent toegevoegd. Neem contact op met iemand wanneer je emailadres niet wordt herkend.
15
+
16
+    emails:
17
+      greeting: Hoi %{name},
18
+      ending: Aardbei
19
+      link_expires: Deze link is bruikbaar tot %{expires}.
20
+
21
+      confirm:
22
+        click_this: Bevestig je account voor Aardbei door te klikken op de volgende link:
23
+
24
+      forgot:
25
+        blurb: Jij (of iemand die doet alsof hij jou is) heeft een wachtwoordwijziging aangevraagd. Open de volgende link als je dit wilt:
26
+        ignore_if_noy_you: Als jij dit niet hebt aangevraagd kan je dit bericht negeren, en is je oude wachtwoord onveranderd.