diff --git a/app/services/orders/customer_credit_service.rb b/app/services/orders/customer_credit_service.rb index 59823d84fe..10a913eeb8 100644 --- a/app/services/orders/customer_credit_service.rb +++ b/app/services/orders/customer_credit_service.rb @@ -92,7 +92,7 @@ module Orders end def translation_scope - "orders.customer_credit_service" + "customer_credit_service" end class Response diff --git a/config/locales/en.yml b/config/locales/en.yml index 2b8134bc77..2d518b258b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -5220,8 +5220,7 @@ en: credit_payment_method_missing: Credit payment method is missing no_credit_available: No credit available not_enough_credit_available: Not enough credit available - orders: - customer_credit_service: - no_credit_owed: No credit owed - credit_payment_method_missing: Customer credit payment method is missing, please check configuration - refund_sucessful: Refund successful! + customer_credit_service: + no_credit_owed: No credit owed + credit_payment_method_missing: Customer credit payment method is missing, please check configuration + refund_sucessful: Refund successful! diff --git a/spec/system/admin/variants_spec.rb b/spec/system/admin/variants_spec.rb index 2f6280f778..c4653b48ff 100644 --- a/spec/system/admin/variants_spec.rb +++ b/spec/system/admin/variants_spec.rb @@ -220,13 +220,9 @@ RSpec.describe ' let(:product) { create(:simple_product) } let(:variant) { product.variants.first } - around do |example| - I18n.default_locale = :es - example.run - I18n.default_locale = :en - end - before do + allow(I18n).to receive(:default_locale).and_return(:es) + variant.update( unit_value: 1, unit_description: 'foo' ) # When I view the variant