diff --git a/app/controllers/bulk_upload_lettings_resume_controller.rb b/app/controllers/bulk_upload_lettings_resume_controller.rb index 5e240e7cb..4c21d39e2 100644 --- a/app/controllers/bulk_upload_lettings_resume_controller.rb +++ b/app/controllers/bulk_upload_lettings_resume_controller.rb @@ -23,12 +23,6 @@ class BulkUploadLettingsResumeController < ApplicationController end end - def pluralize_logs_and_errors_warning(log_count, error_count) - is_or_are = log_count == 1 ? "is" : "are" - need_or_needs = error_count == 1 ? "needs" : "need" - "There #{is_or_are} #{view_context.pluralize(log_count, 'log')} in this bulk upload with #{view_context.pluralize(error_count, 'error')} that still #{need_or_needs} to be fixed after upload." - end - private def form diff --git a/app/helpers/logs_helper.rb b/app/helpers/logs_helper.rb index aa132afd6..0e988fda9 100644 --- a/app/helpers/logs_helper.rb +++ b/app/helpers/logs_helper.rb @@ -38,4 +38,10 @@ module LogsHelper when "lettings" then csv_download_lettings_logs_path(search:, codes_only:) end end + + def pluralize_logs_and_errors_warning(log_count, error_count) + is_or_are = log_count == 1 ? "is" : "are" + need_or_needs = error_count == 1 ? "needs" : "need" + "There #{is_or_are} #{pluralize(log_count, 'log')} in this bulk upload with #{pluralize(error_count, 'error')} that still #{need_or_needs} to be fixed after upload." + end end diff --git a/app/views/bulk_upload_lettings_resume/confirm.html.erb b/app/views/bulk_upload_lettings_resume/confirm.html.erb index 0cf6d3a89..a61a73651 100644 --- a/app/views/bulk_upload_lettings_resume/confirm.html.erb +++ b/app/views/bulk_upload_lettings_resume/confirm.html.erb @@ -7,7 +7,7 @@ Bulk upload for lettings (<%= @bulk_upload.year_combo %>)
<%= controller.pluralize_logs_and_errors_warning(@bulk_upload.logs.count, @bulk_upload.bulk_upload_errors.count) %>
+<%= pluralize_logs_and_errors_warning(@bulk_upload.logs.count, @bulk_upload.bulk_upload_errors.count) %>
<%= govuk_warning_text(icon_fallback_text: "Danger") do %> You can not delete logs once you create them