A platform for community discussion. Free, open, simple.
DEV: Update TranslateAccelerator missing translation string (#22158)
David Taylorf8ea5b1136e6
diff --git a/lib/freedom_patches/translate_accelerator.rb b/lib/freedom_patches/translate_accelerator.rbindex a95ab7275c0..047a4754506 100644--- a/lib/freedom_patches/translate_accelerator.rb+++ b/lib/freedom_patches/translate_accelerator.rb@@ -148,7 +148,7 @@ module I18nelsif should_raiseraise I18n::MissingTranslationData.new(locale, key)else- -"translation missing: #{locale}.#{key}"+ -"Translation missing: #{locale}.#{key}"endenddiff --git a/spec/integrity/i18n_spec.rb b/spec/integrity/i18n_spec.rbindex efe2060a261..1b50b7abec2 100644--- a/spec/integrity/i18n_spec.rb+++ b/spec/integrity/i18n_spec.rb@@ -32,7 +32,7 @@ RSpec.describe "i18n integrity checks" doit "has an i18n key for each Site Setting" doSiteSetting.all_settings.each do |s|next if s[:plugin] == SiteSetting::SAMPLE_TEST_PLUGIN.name- expect(s[:description]).not_to match(/translation missing/)+ expect(s[:description]).not_to match(/Translation missing/)endenddiff --git a/spec/lib/freedom_patches/translate_accelerator_spec.rb b/spec/lib/freedom_patches/translate_accelerator_spec.rbindex 16c0c9e1acf..c7a019ed554 100644--- a/spec/lib/freedom_patches/translate_accelerator_spec.rb+++ b/spec/lib/freedom_patches/translate_accelerator_spec.rb@@ -26,7 +26,13 @@ RSpec.describe "translate accelerator" doorig = I18n.t("i_am_an_unknown_key99")expect(I18n.t("i_am_an_unknown_key99").object_id).to eq(orig.object_id)- expect(I18n.t("i_am_an_unknown_key99")).to eq("translation missing: en.i_am_an_unknown_key99")+ expect(I18n.t("i_am_an_unknown_key99")).to eq("Translation missing: en.i_am_an_unknown_key99")+ end++ it "has the same 'translation missing' message as upstream" do+ expect(I18n.t("this_key_does_not_exist")).to eq(+ I18n.translate_no_cache("this_key_does_not_exist"),+ )endit "returns the correct language" dodiff --git a/spec/requests/admin/email_templates_controller_spec.rb b/spec/requests/admin/email_templates_controller_spec.rbindex 4fb80b48daf..0680d982d88 100644--- a/spec/requests/admin/email_templates_controller_spec.rb+++ b/spec/requests/admin/email_templates_controller_spec.rb@@ -450,7 +450,7 @@ RSpec.describe Admin::EmailTemplatesController doit "uses only existing email templates" doAdmin::EmailTemplatesController.email_keys.each do |key|- expect(I18n.t(key)).to_not include("translation missing")+ expect(I18n.t(key)).to_not include("Translation missing")endendend