diff --git a/app/notifications/repository_item_date_notification.rb b/app/notifications/repository_item_date_notification.rb index 6548ee5f3..8e0993a91 100644 --- a/app/notifications/repository_item_date_notification.rb +++ b/app/notifications/repository_item_date_notification.rb @@ -4,7 +4,7 @@ class RepositoryItemDateNotification < BaseNotification def message unit = human_readable_unit(column.metadata['reminder_unit'], column.metadata['reminder_value']) I18n.t( - 'notifications.notification.item_date_reminder_html', + 'notifications.content.item_date_reminder.message_html', repository_row_name: subject.name, value: column.metadata['reminder_value'], units: unit @@ -15,7 +15,9 @@ class RepositoryItemDateNotification < BaseNotification :item_date_reminder end - def title; end + def title + I18n.t('notifications.content.item_date_reminder.title_html') + end def subject RepositoryRow.find(params[:repository_row_id]) @@ -36,6 +38,8 @@ class RepositoryItemDateNotification < BaseNotification private def human_readable_unit(seconds, value) + return unless seconds + units_hash = { '2419200' => 'month', '604800' => 'week', diff --git a/app/notifications/task_due_date_notification.rb b/app/notifications/task_due_date_notification.rb index 18f8b84f2..39143195f 100644 --- a/app/notifications/task_due_date_notification.rb +++ b/app/notifications/task_due_date_notification.rb @@ -12,7 +12,9 @@ class TaskDueDateNotification < BaseNotification :my_module_due_date_reminder end - def title; end + def title + I18n.t('notifications.content.my_module_due_date_reminder.title_html') + end def subject MyModule.find(params[:my_module_id])