From 44390b850d677b41150a6fe7e3d44ffbec9a561f Mon Sep 17 00:00:00 2001 From: Alessandro Desantis Date: Thu, 19 Sep 2019 11:20:05 +0200 Subject: [PATCH] Use I18n.t instead of deprecated Spree.t --- .../orders/_shipment/add_remove_shipment_button.html.erb.deface | 2 +- spec/features/admin/order/return_authorization_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/overrides/spree/admin/orders/_shipment/add_remove_shipment_button.html.erb.deface b/app/overrides/spree/admin/orders/_shipment/add_remove_shipment_button.html.erb.deface index 8bf3377..8e772e3 100644 --- a/app/overrides/spree/admin/orders/_shipment/add_remove_shipment_button.html.erb.deface +++ b/app/overrides/spree/admin/orders/_shipment/add_remove_shipment_button.html.erb.deface @@ -3,7 +3,7 @@ <% if SolidusQuietLogistics.configuration.enabled&.call(@order) %> <% if !shipment.shipped? && !shipment.canceled? && shipment.pushed? %> <% if shipment.ql_cancellation_sent.blank? && shipment.ql_cancellation_date.blank? %> - <%= button_to "#{Spree.t('actions.delete')} #{Spree.t(:shipment)}", admin_shipment_path(shipment), + <%= button_to "#{I18n.t('spree.actions.delete')} #{I18n.t('spree.shipment')}", admin_shipment_path(shipment), method: :delete, remote: true, class: 'btn btn-primary delete-shipment js-delete-shipment-hook' %> <% end %> <% end %> diff --git a/spec/features/admin/order/return_authorization_spec.rb b/spec/features/admin/order/return_authorization_spec.rb index 81e61e3..6e3d328 100644 --- a/spec/features/admin/order/return_authorization_spec.rb +++ b/spec/features/admin/order/return_authorization_spec.rb @@ -79,7 +79,7 @@ def fill_in_rma(_stock_location) context 'when quiet_logistics is enabled' do it 'redirects to admin_order_return_authorizations_path and shows error message' do expect(page).not_to have_selector('.return-items-table') - expect(page).to have_content(Spree.t('cannot_perform_operation')) + expect(page).to have_content(I18n.t('spree.cannot_perform_operation')) end end