add missing i18n key for closed OC

This commit is contained in:
Lucas Hiago
2020-06-06 23:05:53 -03:00
parent 01e27dd68c
commit e9e43c985f
3 changed files with 3 additions and 2 deletions

View File

@@ -117,7 +117,7 @@ class ApplicationController < ActionController::Base
session[:expired_order_cycle_id] = current_order_cycle.id
current_order.empty!
current_order.set_order_cycle! nil
flash[:info] = "The order cycle you've selected has just closed. Please try again!"
flash[:info] = I18n.t('order_cycle_closed')
redirect_to main_app.root_url
end
end

View File

@@ -2435,6 +2435,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
order_cycles_email_to_producers_notice: 'Emails to be sent to producers have been queued for sending.'
order_cycles_no_permission_to_coordinate_error: "None of your enterprises have permission to coordinate an order cycle"
order_cycles_no_permission_to_create_error: "You don't have permission to create an order cycle coordinated by that enterprise"
order_cycle_closed: "The order cycle you've selected has just closed. Please try again!"
back_to_orders_list: "Back to order list"
no_orders_found: "No Orders Found"
order_information: "Order Information"

View File

@@ -20,6 +20,6 @@ describe BaseController, type: :controller do
expect(session[:expired_order_cycle_id]).to eq oc.id
expect(response).to redirect_to root_url
expect(flash[:info]).to eq "The order cycle you've selected has just closed. Please try again!"
expect(flash[:info]).to eq I18n.t('order_cycle_closed')
end
end