Skip to content

Commit 121e2e6

Browse files
committed
Localization and missing strings
1 parent b2b3f2e commit 121e2e6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

admin/app/components/solidus_admin/orders/index/component.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def state_column
124124
'canceled' => :blue,
125125
'cart' => :graphite_light,
126126
}[order.state] || :yellow
127-
component('ui/badge').new(name: order.state.humanize, color:)
127+
component('ui/badge').new(name: I18n.t("spree.order_state.#{order.state}").humanize, color:)
128128
end
129129
}
130130
end
@@ -171,7 +171,7 @@ def payment_column
171171
{
172172
header: :payment,
173173
data: ->(order) do
174-
component('ui/badge').new(name: order.payment_state.humanize, color: order.paid? ? :green : :yellow) if order.payment_state?
174+
component('ui/badge').new(name: I18n.t("spree.payment_states.#{order.payment_state}").humanize, color: order.paid? ? :green : :yellow) if order.payment_state?
175175
end
176176
}
177177
end
@@ -180,7 +180,7 @@ def shipment_column
180180
{
181181
header: :shipment,
182182
data: ->(order) do
183-
component('ui/badge').new(name: order.shipment_state.humanize, color: order.shipped? ? :green : :yellow) if order.shipment_state?
183+
component('ui/badge').new(name: I18n.t("spree.shipment_states.#{order.shipment_state}").humanize, color: order.shipped? ? :green : :yellow) if order.shipment_state?
184184
end
185185
}
186186
end

admin/app/components/solidus_admin/ui/pages/index/component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def renderable_tabs
3535
end
3636

3737
def title
38-
model_class.model_name.human.pluralize
38+
I18n.t("activerecord.models.#{model_class.model_name.i18n_key}", count: 2)
3939
end
4040

4141
def search_params

0 commit comments

Comments
 (0)