about summary refs log tree commit diff
path: root/app/mailers
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-04-12 17:11:49 +0200
committerEugen <eugen@zeonfederated.com>2017-04-12 17:11:49 +0200
commitd90d23699ca611f05d8def40109505251507fa46 (patch)
treee3ffdab55a7d5f5456732d03b827ee2bd140f896 /app/mailers
parent1f5ff46fd92f679cdb548c93c47920786f2dcc33 (diff)
Make Reporting admin section translatable (#1549)
* Make Reporting admin section translatable

And translate it into english and french

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

* Make subject of emails translatable and improve french translation

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

* Make error pages translatable and translate them in english and french

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

* Translate site setting section

* Insert instance in registration emails and improve them a bit

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/user_mailer.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb
index 3b4d4d076..64ca92a3a 100644
--- a/app/mailers/user_mailer.rb
+++ b/app/mailers/user_mailer.rb
@@ -7,9 +7,10 @@ class UserMailer < Devise::Mailer
   def confirmation_instructions(user, token, _opts = {})
     @resource = user
     @token    = token
+    @instance = Rails.configuration.x.local_domain
 
     I18n.with_locale(@resource.locale || I18n.default_locale) do
-      mail to: @resource.unconfirmed_email.blank? ? @resource.email : @resource.unconfirmed_email
+      mail to: @resource.unconfirmed_email.blank? ? @resource.email : @resource.unconfirmed_email, subject: I18n.t('devise.mailer.confirmation_instructions.subject', instance: @instance)
     end
   end
 
@@ -18,7 +19,7 @@ class UserMailer < Devise::Mailer
     @token    = token
 
     I18n.with_locale(@resource.locale || I18n.default_locale) do
-      mail to: @resource.email
+      mail to: @resource.email, subject: I18n.t('devise.mailer.reset_password_instructions.subject')
     end
   end
 
@@ -26,7 +27,7 @@ class UserMailer < Devise::Mailer
     @resource = user
 
     I18n.with_locale(@resource.locale || I18n.default_locale) do
-      mail to: @resource.email
+      mail to: @resource.email, subject: I18n.t('devise.mailer.password_change.subject')
     end
   end
 end