From bf1cbe615f858d74824dc17ffd1da25ee320e2d4 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Fri, 24 Feb 2023 17:23:39 +1100 Subject: [PATCH] Remove unused Spree translation checker If we wanted similar functionality in the future then we would implement it differently. At the moment, it's just unused code. --- spec/lib/spree/i18n_spec.rb | 77 +++---------------------------------- 1 file changed, 6 insertions(+), 71 deletions(-) diff --git a/spec/lib/spree/i18n_spec.rb b/spec/lib/spree/i18n_spec.rb index f535d4e5d3..7de1899e20 100644 --- a/spec/lib/spree/i18n_spec.rb +++ b/spec/lib/spree/i18n_spec.rb @@ -2,7 +2,6 @@ require 'rspec/expectations' require 'spree/i18n' -require 'support/i18n_translations_checker' describe "i18n" do before do @@ -28,20 +27,20 @@ describe "i18n" do end it "translates within the spree scope" do - expect(Spree.normal_t(:foo)).to eql("bar") + expect(Spree.t(:foo)).to eql("bar") expect(Spree.translate(:foo)).to eql("bar") end it "translates within the spree scope using a path" do allow(Spree).to receive(:virtual_path).and_return('bar') - expect(Spree.normal_t('.legacy_translation')).to eql("back in the day...") + expect(Spree.t('.legacy_translation')).to eql("back in the day...") expect(Spree.translate('.legacy_translation')).to eql("back in the day...") end it "raise error without any context when using a path" do expect { - Spree.normal_t('.legacy_translation') + Spree.t('.legacy_translation') }.to raise_error expect { @@ -50,82 +49,18 @@ describe "i18n" do end it "prepends a string scope" do - expect(Spree.normal_t(:foo, scope: "bar")).to eql("bar within bar scope") + expect(Spree.t(:foo, scope: "bar")).to eql("bar within bar scope") end it "prepends to an array scope" do - expect(Spree.normal_t(:foo, scope: ["bar"])).to eql("bar within bar scope") + expect(Spree.t(:foo, scope: ["bar"])).to eql("bar within bar scope") end it "returns two translations" do - expect(Spree.normal_t([:foo, 'bar.foo'])).to eql(["bar", "bar within bar scope"]) + expect(Spree.t([:foo, 'bar.foo'])).to eql(["bar", "bar within bar scope"]) end it "returns reasonable string for missing translations" do expect(Spree.t(:missing_entry)).to include("