From 2da170912fc9e18890bd9ebcd60ff61ab3495a0b Mon Sep 17 00:00:00 2001 From: Ashish Gaur Date: Sat, 12 Apr 2025 12:01:06 +0530 Subject: [PATCH] Use translation for none in reports --- config/locales/en.yml | 1 + lib/reporting/report_row_builder.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index f81b6232ee..6b53dffa19 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1760,6 +1760,7 @@ en: email_confirmation: "Email confirmation is pending. We've sent a confirmation email to %{email}." not_visible: "%{enterprise} is not visible and so cannot be found on the map or in searches" reports: + none: none deprecated: "This report is deprecated and will be removed in a future release." hidden: HIDDEN unitsize: UNITSIZE diff --git a/lib/reporting/report_row_builder.rb b/lib/reporting/report_row_builder.rb index 7b4403d440..d748c754d4 100644 --- a/lib/reporting/report_row_builder.rb +++ b/lib/reporting/report_row_builder.rb @@ -79,7 +79,7 @@ module Reporting # rubocop:disable Metrics/CyclomaticComplexity def format_cell(value, column = nil) - return "none" if value.nil? + return I18n.t("admin.reports.none") if value.nil? # Currency if report.columns_format[column] == :currency