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.

Localize backorder notice in the checkout view

Gabriel Z. Lovisoncc11fab004cc
diff --git a/storefront/app/views/spree/checkout/_delivery.html.erb b/storefront/app/views/spree/checkout/_delivery.html.erb
index fc00f6fc3f..a7a1d0b6a6 100644
--- a/storefront/app/views/spree/checkout/_delivery.html.erb
+++ b/storefront/app/views/spree/checkout/_delivery.html.erb
@@ -6,7 +6,7 @@
<div id="shipping-method">
<% if @order.backordered_variants.any? %>
<div class="alert rounded border border-default text-sm p-5 mb-6">
- Some products in your cart will be dispatched a bit later than the rest of your order:
+ <%= Spree.t("storefront.checkout.backorder_notice") %>
<ul class="list-disc list-inside flex-col flex space-y-1 mt-2">
<% @order.backordered_variants.each do |variant| %>
<li><%= variant.name %></li>
@@ -67,4 +67,3 @@
</div>
</div>
<% end %>
-
diff --git a/storefront/config/locales/en.yml b/storefront/config/locales/en.yml
index 606e97b2a5..dca96d9ba0 100644
--- a/storefront/config/locales/en.yml
+++ b/storefront/config/locales/en.yml
@@ -20,6 +20,7 @@ en:
checkout:
all_transactions_are_secure_and_encrypted: All transactions are secure and encrypted
already_have_an_account: Already have an account?
+ backorder_notice: 'Some products in your cart will be dispatched a bit later than the rest of your order:'
by_placing_this_order_you_agree_to: By placing this order you agree to
calculated_at_next_step: Calculated at next step
continue_to_cart: Continue to cart