diff options
Diffstat (limited to 'app/mailers/emails/profile.rb')
-rw-r--r-- | app/mailers/emails/profile.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/mailers/emails/profile.rb b/app/mailers/emails/profile.rb index 5b1750400d8..54a4c4be6a8 100644 --- a/app/mailers/emails/profile.rb +++ b/app/mailers/emails/profile.rb @@ -153,7 +153,7 @@ module Emails Gitlab::I18n.with_locale(@user.preferred_language) do email_with_layout( to: @user.notification_email_or_default, - subject: subject(_("Attempted sign in to %{host} using a wrong two-factor authentication code") % { host: Gitlab.config.gitlab.host })) + subject: subject(_("Attempted sign in to %{host} using an incorrect verification code") % { host: Gitlab.config.gitlab.host })) end end @@ -177,6 +177,19 @@ module Emails mail_with_locale(to: @user.notification_email_or_default, subject: subject(_("New email address added"))) end end + + def new_achievement_email(user, achievement) + return unless user&.active? + + @user = user + @achievement = achievement + + Gitlab::I18n.with_locale(@user.preferred_language) do + email_with_layout( + to: @user.notification_email_or_default, + subject: subject(s_("Achievements|%{namespace_full_path} awarded you the %{achievement_name} achievement") % { namespace_full_path: @achievement.namespace.full_path, achievement_name: @achievement.name })) + end + end end end |