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.

Remove titleization from payment and shipment state translations

Gabriel Z. Lovison2a726e060a25
diff --git a/core/config/locales/en.yml b/core/config/locales/en.yml
index 1dc35618c7..4d455ef079 100644
--- a/core/config/locales/en.yml
+++ b/core/config/locales/en.yml
@@ -1523,7 +1523,7 @@ en:
password_protected: Password protected
paste: Paste
path: Path
- pay: pay
+ pay: Pay
payment: Payment
payment_amount: Payment amount
payment_attempts: failed attempts
@@ -1540,11 +1540,11 @@ en:
payment_source: Payment source
payment_state: Payment State
payment_states:
- balance_due: Balance due
+ balance_due: Balance Due
checkout: Checkout
complete: Complete
completed: Completed
- credit_owed: Credit owed
+ credit_owed: Credit Owed
failed: Failed
paid: Paid
partially_refunded: Partially Refunded
diff --git a/storefront/app/views/spree/checkout/_payment_methods.html.erb b/storefront/app/views/spree/checkout/_payment_methods.html.erb
index 6116809edd..0d81906796 100644
--- a/storefront/app/views/spree/checkout/_payment_methods.html.erb
+++ b/storefront/app/views/spree/checkout/_payment_methods.html.erb
@@ -66,7 +66,7 @@
class="btn-primary w-full lg:w-2/5 font-semibold checkout-content-save-continue-button my-5 !py-4"
>
<%= render 'button_processing', is_hidden: true %>
- <%= Spree.t(:pay).titleize %>
+ <%= Spree.t(:pay) %>
</button>
</div>
<% end %>
diff --git a/storefront/app/views/themes/default/spree/account/_order.html.erb b/storefront/app/views/themes/default/spree/account/_order.html.erb
index 798fa1bea9..e62fc09c14 100644
--- a/storefront/app/views/themes/default/spree/account/_order.html.erb
+++ b/storefront/app/views/themes/default/spree/account/_order.html.erb
@@ -8,16 +8,16 @@
<% if order.payment_state == 'void' %>
<% if order.order_refunded? %>
<span class="badge-refunded">
- <%= Spree.t("payment_states.refunded").titleize %>
+ <%= Spree.t("payment_states.refunded") %>
</span>
<% else %>
<span class="badge-void">
- <%= Spree.t("payment_states.#{order.payment_state}").titleize %>
+ <%= Spree.t("payment_states.#{order.payment_state}") %>
</span>
<% end %>
<% else %>
<span class="badge-success">
- <%= Spree.t("payment_states.#{order.payment_state}").titleize %>
+ <%= Spree.t("payment_states.#{order.payment_state}") %>
</span>
<% end %>
<% end %>
@@ -26,11 +26,11 @@
<% if order.shipment_state %>
<% if order.shipment_state == 'shipped' %>
<span class="badge-success">
- <%= Spree.t("shipment_states.#{order.shipment_state}").titleize %>
+ <%= Spree.t("shipment_states.#{order.shipment_state}") %>
</span>
<% else %>
<span class="badge-<%= order.shipment_state %>">
- <%= Spree.t("shipment_states.#{order.shipment_state}").titleize %>
+ <%= Spree.t("shipment_states.#{order.shipment_state}") %>
</span>
<% end %>
<% end %>
diff --git a/storefront/app/views/themes/default/spree/checkout/complete.html.erb b/storefront/app/views/themes/default/spree/checkout/complete.html.erb
index be0c6de329..544b0812f2 100644
--- a/storefront/app/views/themes/default/spree/checkout/complete.html.erb
+++ b/storefront/app/views/themes/default/spree/checkout/complete.html.erb
@@ -24,7 +24,7 @@
<div class="mt-3 border-t pt-3">
<span class="text-sm"><%= Spree.t(:status) %></span>
<% if @order.payment_state.present? %>
- <span class="badge-<%= @order.payment_state %>"><%= Spree.t("payment_states.#{@order.payment_state}").titleize %></span>
+ <span class="badge-<%= @order.payment_state %>"><%= Spree.t("payment_states.#{@order.payment_state}") %></span>
<% else %>
<span class="badge-pending"><%= Spree.t(:pending) %></span>
<% end %>