From 349ba58bdec1949fdd32954f51969d9e6b231f69 Mon Sep 17 00:00:00 2001 From: Neri J Jakubowski Jr Date: Mon, 23 Feb 2026 12:29:46 -0300 Subject: [PATCH] Localization and missing strings --- .../app/components/solidus_admin/orders/index/component.rb | 6 +++--- .../components/solidus_admin/ui/pages/index/component.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/admin/app/components/solidus_admin/orders/index/component.rb b/admin/app/components/solidus_admin/orders/index/component.rb index d3a79735290..f41756bb107 100644 --- a/admin/app/components/solidus_admin/orders/index/component.rb +++ b/admin/app/components/solidus_admin/orders/index/component.rb @@ -124,7 +124,7 @@ def state_column 'canceled' => :blue, 'cart' => :graphite_light, }[order.state] || :yellow - component('ui/badge').new(name: order.state.humanize, color:) + component('ui/badge').new(name: I18n.t("spree.order_state.#{order.state}"), color:) end } end @@ -171,7 +171,7 @@ def payment_column { header: :payment, data: ->(order) do - component('ui/badge').new(name: order.payment_state.humanize, color: order.paid? ? :green : :yellow) if order.payment_state? + component('ui/badge').new(name: I18n.t("spree.payment_states.#{order.payment_state}"), color: order.paid? ? :green : :yellow) if order.payment_state? end } end @@ -180,7 +180,7 @@ def shipment_column { header: :shipment, data: ->(order) do - component('ui/badge').new(name: order.shipment_state.humanize, color: order.shipped? ? :green : :yellow) if order.shipment_state? + component('ui/badge').new(name: I18n.t("spree.shipment_states.#{order.shipment_state}"), color: order.shipped? ? :green : :yellow) if order.shipment_state? end } end diff --git a/admin/app/components/solidus_admin/ui/pages/index/component.rb b/admin/app/components/solidus_admin/ui/pages/index/component.rb index 3acfdcc85a5..5d9d2b9149f 100644 --- a/admin/app/components/solidus_admin/ui/pages/index/component.rb +++ b/admin/app/components/solidus_admin/ui/pages/index/component.rb @@ -35,7 +35,7 @@ def renderable_tabs end def title - model_class.model_name.human.pluralize + I18n.t("activerecord.models.#{model_class.model_name.i18n_key}", count: 2) end def search_params