Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Spec fixes, translation fixes

Damian Legawiec0f90c14ee961
diff --git a/admin/config/locales/en.yml b/admin/config/locales/en.yml
index a04dce2272..3dad4ece9c 100644
--- a/admin/config/locales/en.yml
+++ b/admin/config/locales/en.yml
@@ -46,9 +46,9 @@ en:
getting_started:
description: Everything you need to set up to start selling.
hi: Hi
- whats_happening_on: Here's what's happening on <strong>%{store_name}</strong> today.
top_products: Top products
view_report: View report
+ whats_happening_on: Here's what's happening on <strong>%{store_name}</strong> today.
display_on_options:
back_end: Only on admin panel
both: On both admin panel & storefront
diff --git a/core/app/models/spree/promotion.rb b/core/app/models/spree/promotion.rb
index 4dff892f42..a0f8bdd9ff 100644
--- a/core/app/models/spree/promotion.rb
+++ b/core/app/models/spree/promotion.rb
@@ -122,7 +122,7 @@ module Spree
end
def expired?
- expires_at.present? && expires_at < Time.current
+ !!(starts_at && Time.current < starts_at || expires_at && Time.current > expires_at)
end
def activate(payload)
diff --git a/core/config/locales/en.yml b/core/config/locales/en.yml
index 3328a2cf8e..46dd688977 100644
--- a/core/config/locales/en.yml
+++ b/core/config/locales/en.yml
@@ -783,7 +783,6 @@ en:
label: Choose must be shipped to this country
coupon: Coupon
coupon_code: Coupon code
- coupon_codes: Coupon codes
coupon_code_already_applied: The coupon code has already been applied to this order
coupon_code_applied: The coupon code was successfully applied to your order.
coupon_code_apply: Apply
@@ -795,6 +794,7 @@ en:
coupon_code_removed: The coupon code was successfully removed from your order.
coupon_code_unknown_error: This coupon code could not be applied to the cart at this time.
coupon_code_used: The coupon code you entered has already been used. Please try again.
+ coupon_codes: Coupon codes
create: Create
create_a_new_account: Create a new account
create_account: Create account
diff --git a/core/spec/models/spree/adjustment_spec.rb b/core/spec/models/spree/adjustment_spec.rb
index 16913798e7..fdb7fe1926 100644
--- a/core/spec/models/spree/adjustment_spec.rb
+++ b/core/spec/models/spree/adjustment_spec.rb
@@ -203,7 +203,7 @@ describe Spree::Adjustment, type: :model do
end
context "the promotion is eligible" do
- it "sets the adjustment elgiible to true" do
+ it "sets the adjustment eligible to true" do
subject
expect(adjustment.eligible).to eq true
end
@@ -216,7 +216,7 @@ describe Spree::Adjustment, type: :model do
context "the promotion is not eligible" do
before { promotion.update!(starts_at: 1.day.from_now) }
- it "sets the adjustment elgiible to false" do
+ it "sets the adjustment eligible to false" do
subject
expect(adjustment.eligible).to eq false
end