From b4c79693d46ec8df796d23a33181004dfbc0b434 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Tue, 6 Jun 2023 09:23:43 -0400 Subject: [PATCH 1/3] Revert "Merge pull request #22545 from kbrock/peg_i18n" This reverts commit 6e1123215424d2197080836e6538b5f755d03496, reversing changes made to b4c75931b5e75e0299715a5845abb6dcb8f598c1. --- Gemfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Gemfile b/Gemfile index 801a5030514..a5079d3a5cc 100644 --- a/Gemfile +++ b/Gemfile @@ -41,9 +41,6 @@ gem "fast_gettext", "~>2.0.1" gem "gettext_i18n_rails", "~>1.10.1" gem "gettext_i18n_rails_js", "~>1.3.0" gem "hamlit", "~>2.11.0" -# rails-i18n typically takes care of this dependency -# hardcoding to avoid 1.14 issue. remove once 1.15 comes out -gem "i18n", "~>1.13.0" gem "inifile", "~>3.0", :require => false gem "inventory_refresh", "~>2.0", :require => false gem "kubeclient", "~>4.0", :require => false # For scaling pods at runtime From b240efe79203cbae45b2928a66001f17a8546681 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Tue, 6 Jun 2023 11:27:38 -0400 Subject: [PATCH 2/3] upgrade gettext_i18n_rails gem that handles i18n 1.13.1 and frozen strungs --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index a5079d3a5cc..a0e5df8b18b 100644 --- a/Gemfile +++ b/Gemfile @@ -38,7 +38,7 @@ gem "default_value_for", "~>3.3" gem "docker-api", "~>1.33.6", :require => false gem "elif", "=0.1.0", :require => false gem "fast_gettext", "~>2.0.1" -gem "gettext_i18n_rails", "~>1.10.1" +gem "gettext_i18n_rails", "~>1.11" gem "gettext_i18n_rails_js", "~>1.3.0" gem "hamlit", "~>2.11.0" gem "inifile", "~>3.0", :require => false From 1dc4bd911ef0d85b8ec4a1dd24ddfb4edb1e8503 Mon Sep 17 00:00:00 2001 From: Keenan Brock Date: Mon, 12 Jun 2023 20:04:24 -0400 Subject: [PATCH 3/3] Support missing translations for i18n 1.14 missing translation: changed to Missing translation in the source Changed our dictionary to handle this case Support missing translations for i18n 1.14 i18n gem used to return "missing translation:" As of 1.14, it returns "Missing translation:" Changed our dictionary to handle this case --- app/models/dictionary.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dictionary.rb b/app/models/dictionary.rb index 83c92d443fe..0e3693073cd 100644 --- a/app/models/dictionary.rb +++ b/app/models/dictionary.rb @@ -52,7 +52,7 @@ def self.ui_lookup(options = {}) def self.i18n_lookup(type, text) result = I18n.t("dictionary.#{type}.#{text}", :locale => "en") - result.start_with?("translation missing:") ? nil : result + result if result && !result.match?(/Translation missing:/i) end private_class_method :i18n_lookup end