diff --git a/app/notifiers/session_reminder_notifier.rb b/app/notifiers/session_reminder_notifier.rb index 9eec6e10..c7e4a4f4 100644 --- a/app/notifiers/session_reminder_notifier.rb +++ b/app/notifiers/session_reminder_notifier.rb @@ -29,10 +29,14 @@ def title end def subject + t("mailers.session_mailer.reminder.subject", title: record.title) + end + + def email_title if params[:time_before_session].match?(/^0\s/) - t("mailers.session_mailer.reminder.subject.without_time") + t("mailers.session_mailer.reminder.title.without_time") else - t("mailers.session_mailer.reminder.subject.with_time", time_before_session: params[:time_before_session]) + t("mailers.session_mailer.reminder.title.with_time", time_before_session: params[:time_before_session]) end end diff --git a/app/views/session_mailer/reminder.html.erb b/app/views/session_mailer/reminder.html.erb index 5752604c..ce9e243f 100644 --- a/app/views/session_mailer/reminder.html.erb +++ b/app/views/session_mailer/reminder.html.erb @@ -1,6 +1,6 @@
-

<%= @notification&.subject %>

+

<%= @notification&.email_title %>

<%= link_to @session.title, sessions_url, style: "color: #CB0C1C; text-decoration: none;" %> diff --git a/config/locales/en.yml b/config/locales/en.yml index eb685092..46bcb690 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -32,7 +32,8 @@ en: mailers: session_mailer: reminder: - subject: + subject: "%{title} is starting soon" + title: with_time: "Your bookmarked session is starting in %{time_before_session}." without_time: "Your bookmarked session is starting soon." password_mailer: