i18nize the global error message

This commit is contained in:
Jean-Baptiste Bellet
2021-08-26 09:08:35 +02:00
parent bee1b1a097
commit 44ab87961a
2 changed files with 2 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ class SplitCheckoutController < ::BaseController
if @shipping_method_id.blank?
@order.errors.add(:base, "no_shipping_method_selected")
end
flash.now[:error] = "Saving failed, please update the highlighted fields: #{@order.errors.full_messages}"
flash.now[:error] = "#{I18n.t('split_checkout.errors.global')}"
render :edit
end
end

View File

@@ -1692,6 +1692,7 @@ en:
submit: Complete order
cancel: Back to Payment method
errors:
global: "Saving failed, please update the highlighted fields."
required: Field cannot be blank
invalid_number: "Please enter a valid phone number"
invalid_email: "Please enter a valid email address"