mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
Merge pull request #6755 from ivanscinote/SCI-9775-ik
Fix translations for notifications (Due date, Date/Date&Time, Low stock) [SCI-9775]
This commit is contained in:
commit
254550ef7f
4 changed files with 13 additions and 6 deletions
|
@ -4,7 +4,8 @@ class LowStockNotification < BaseNotification
|
|||
def message
|
||||
I18n.t(
|
||||
'notifications.content.item_low_stock_reminder.message_html',
|
||||
repository_row_name: subject.name
|
||||
repository_row_name: subject.name,
|
||||
repository: repository.name
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -19,4 +20,8 @@ class LowStockNotification < BaseNotification
|
|||
def subject
|
||||
RepositoryRow.find(params[:repository_row_id])
|
||||
end
|
||||
|
||||
def repository
|
||||
Repository.find(subject.repository_id)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
class TaskDueDateNotification < BaseNotification
|
||||
def message
|
||||
I18n.t(
|
||||
'notifications.notification.my_module_due_date_reminder_html',
|
||||
'notifications.content.my_module_due_date_reminder.message_html',
|
||||
my_module_name: subject.name
|
||||
)
|
||||
end
|
||||
|
|
|
@ -22,7 +22,9 @@ if ENV['ENABLE_FLUICS_SYNC'] == 'true'
|
|||
end
|
||||
end
|
||||
|
||||
scheduler.every '1h' do
|
||||
reminder_job_interval = ENV['REMINDER_JOB_INTERVAL'] || '1h'
|
||||
|
||||
scheduler.every reminder_job_interval do
|
||||
MyModules::DueDateReminderJob.perform_now
|
||||
RepositoryItemDateReminderJob.perform_now
|
||||
end
|
||||
|
|
|
@ -3444,13 +3444,13 @@ en:
|
|||
content:
|
||||
my_module_due_date_reminder:
|
||||
title_html: "Task due date reminder"
|
||||
message_html: "Due date for %{my_module_name} is coming up"
|
||||
message_html: "Due date for a task %{my_module_name} is coming up."
|
||||
item_low_stock_reminder:
|
||||
title_html: "Item stock reminder"
|
||||
message_html: "Item %{repository_row_name} is running low"
|
||||
message_html: "Item %{repository_row_name} in inventory %{repository} is running low."
|
||||
item_date_reminder:
|
||||
title_html: "Item date reminder"
|
||||
message_html: "Date reminder for %{repository_row_name} is coming up in %{value} %{units}"
|
||||
message_html: "Date reminder for %{repository_row_name} is coming up in %{value} %{units}."
|
||||
deliver:
|
||||
download_link: "Download link:"
|
||||
download_text: "Click the link to download the file."
|
||||
|
|
Loading…
Reference in a new issue