Skip to content
This repository has been archived by the owner on Nov 29, 2019. It is now read-only.

I18n path changed for Spree 2.0 #157

Open
wants to merge 1 commit into
base: 2-0-stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions app/controllers/spree/checkout_controller_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def paypal_checkout

redirect_to(@gateway.redirect_url_for(response.token, :review => payment_method.preferred_review))
rescue ActiveMerchant::ConnectionError => e
gateway_error I18n.t(:unable_to_connect_to_gateway)
gateway_error Spree.t(:unable_to_connect_to_gateway)
redirect_to :back
end

Expand Down Expand Up @@ -52,7 +52,7 @@ def paypal_payment

redirect_to(@gateway.redirect_url_for(@ppx_response.token, :review => payment_method.preferred_review))
rescue ActiveMerchant::ConnectionError => e
gateway_error I18n.t(:unable_to_connect_to_gateway)
gateway_error Spree.t(:unable_to_connect_to_gateway)
redirect_to :back
end

Expand Down Expand Up @@ -123,7 +123,7 @@ def paypal_confirm
redirect_to edit_order_checkout_url(@order, :state => "payment")
end
rescue ActiveMerchant::ConnectionError => e
gateway_error I18n.t(:unable_to_connect_to_gateway)
gateway_error Spree.t(:unable_to_connect_to_gateway)
redirect_to edit_order_url(@order)
end

Expand Down Expand Up @@ -174,7 +174,7 @@ def paypal_finish
end

@order.finalize!
flash[:notice] = I18n.t(:order_processed_successfully)
flash[:notice] = Spree.t(:order_processed_successfully)
flash[:commerce_tracking] = "true"
redirect_to completion_route
else
Expand All @@ -186,7 +186,7 @@ def paypal_finish
redirect_to edit_order_checkout_url(@order, :state => "payment")
end
rescue ActiveMerchant::ConnectionError => e
gateway_error I18n.t(:unable_to_connect_to_gateway)
gateway_error Spree.t(:unable_to_connect_to_gateway)
redirect_to edit_order_url(@order)
end

Expand Down Expand Up @@ -447,7 +447,7 @@ def gateway_error(response)

# Parameterize text for i18n key
text = text.parameterize(sep = '_')
msg = "#{I18n.t('gateway_error')}: #{I18n.t(text)}"
msg = "#{Spree.t('gateway_error')}: #{Spree.t(text)}"
logger.error(msg)
flash[:error] = msg
end
Expand Down