diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index 773fabb..75be23d 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -1,24 +1,28 @@ class UserMailer < ActionMailer::Base - default from: I18n.t('helpers.main_email.from') + default from: Rails.configuration.branding[:organisation][:email] def sharing_notification(role) @role = role - mail(to: @role.user.email, subject: I18n.t('helpers.main_email.access_given')) + mail(to: @role.user.email, + subject: _("You have been given access to a Data Management Plan")) end def permissions_change_notification(role) @role = role - mail(to: @role.user.email, subject: I18n.t('helpers.main_email.permission_changed')) + mail(to: @role.user.email, + subject: _("DMP permissions changed")) end def project_access_removed_notification(user, plan) @user = user @plan = plan - mail(to: @user.email, subject: I18n.t('helpers.main_email.access_removed')) + mail(to: @user.email, + subject: _("DMP access removed")) end def api_token_granted_notification(user) @user = user - mail(to: @user.email, subject: I18n.t('helper.api_mail_subject')) + mail(to: @user.email, + subject: _('API Permission Granted')) end end \ No newline at end of file diff --git a/app/views/devise/mailer/confirmation_instructions.html.erb b/app/views/devise/mailer/confirmation_instructions.html.erb index c1faca5..0a4d984 100644 --- a/app/views/devise/mailer/confirmation_instructions.html.erb +++ b/app/views/devise/mailer/confirmation_instructions.html.erb @@ -1,5 +1,5 @@ -

<%= t('custom_devise.welcome_to_DMP') %>, <%= @email %>!

+

<%= _("Welcome to %{application_name}") % {application_name: Rails.configuration.branding[:application][:name]} %>, <%= @email %>!

-

<%= t('custom_devise.thank_you_and_confirm') %>

+

<%= _("Thank you for registering. Please confirm your email address") %>:

-

<%= link_to t('custom_devise.click_to_confirm'), confirmation_url(@resource, :confirmation_token => @token) %> <%= t('custom_devise.1st_part_copy') %> <%= confirmation_url(@resource, :confirmation_token => @token) %> <%= t('custom_devise.2nd_part_copy') %>

\ No newline at end of file +

<%= link_to _("Click here to confirm your account"), confirmation_url(@resource, :confirmation_token => @token) %> (<%= _("or copy") %> <%= confirmation_url(@resource, :confirmation_token => @token) %> <%= _("into your browser") %>).

\ No newline at end of file