From 407193846cbeaed465f153e76a5d84affaa2541b Mon Sep 17 00:00:00 2001 From: Kat Date: Fri, 6 Sep 2024 15:31:15 +0100 Subject: [PATCH] Update pluralization in email --- app/models/user.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 3e38d12bf..bdf72d7e9 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -384,13 +384,13 @@ private reassigned_logs_text = "" case log_reassignment when "reassign_all" - reassigned_logs_text = "There are #{logs_count} logs assigned to you. The stock owner and managing agent on these logs has been changed from #{current_organisation.name} to #{new_organisation.name}." + reassigned_logs_text = "There are #{logs_count} #{'log'.pluralize(logs_count)} assigned to you. The stock owner and managing agent on #{logs_count == 1 ? 'this log' : 'these logs'} has been changed from #{current_organisation.name} to #{new_organisation.name}." when "reassign_stock_owner" - reassigned_logs_text = "There are #{logs_count} logs assigned to you. The stock owner on these logs has been changed from #{current_organisation.name} to #{new_organisation.name}." + reassigned_logs_text = "There are #{logs_count} #{'log'.pluralize(logs_count)} assigned to you. The stock owner on #{logs_count == 1 ? 'this log' : 'these logs'} has been changed from #{current_organisation.name} to #{new_organisation.name}." when "reassign_managing_agent" - reassigned_logs_text = "There are #{logs_count} logs assigned to you. The managing agent on these logs has been changed from #{current_organisation.name} to #{new_organisation.name}." + reassigned_logs_text = "There are #{logs_count} #{'log'.pluralize(logs_count)} assigned to you. The managing agent on #{logs_count == 1 ? 'this log' : 'these logs'} has been changed from #{current_organisation.name} to #{new_organisation.name}." when "unassign" - reassigned_logs_text = "There are #{logs_count} logs assigned to you. These have now been unassigned." + reassigned_logs_text = "There are #{logs_count} #{'log'.pluralize(logs_count)} assigned to you. #{logs_count == 1 ? 'This' : 'These'} have now been unassigned." end template_id = ORGANISATION_UPDATE_TEMPLATE_ID