From d90d23699ca611f05d8def40109505251507fa46 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Wed, 12 Apr 2017 17:11:49 +0200 Subject: Make Reporting admin section translatable (#1549) * Make Reporting admin section translatable And translate it into english and french Signed-off-by: Thomas Citharel * Make subject of emails translatable and improve french translation Signed-off-by: Thomas Citharel * Make error pages translatable and translate them in english and french Signed-off-by: Thomas Citharel * Translate site setting section * Insert instance in registration emails and improve them a bit Signed-off-by: Thomas Citharel --- app/mailers/user_mailer.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'app/mailers') 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 -- cgit