Skip to content

Commit

Permalink
Translate error when failing to create order cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
kristinalim committed Sep 7, 2018
1 parent 3e0c744 commit 003e65f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ angular.module('admin.orderCycles').factory 'OrderCycle', ($resource, $window, S
if response.data.errors?
StatusMessage.display('failure', response.data.errors[0])
else
StatusMessage.display('failure', 'Failed to create order cycle')
StatusMessage.display('failure', t('js.order_cycles.create_failure'))

update: (destination, form) ->
return unless @confirmNoDistributors()
Expand All @@ -171,7 +171,7 @@ angular.module('admin.orderCycles').factory 'OrderCycle', ($resource, $window, S
if response.data.errors?
StatusMessage.display('failure', response.data.errors[0])
else
StatusMessage.display('failure', 'Failed to create order cycle')
StatusMessage.display('failure', t('js.order_cycles.update_failure'))


confirmNoDistributors: ->
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,9 @@ See the %{link} to find out more about %{sitename}'s features and to start using
This will set stock level to zero on all products for this
enterprise that are not present in the uploaded file.
order_cycles:
create_failure: "Failed to create order cycle"
update_success: 'Your order cycle has been updated.'
update_failure: "Failed to update order cycle"
no_distributors: There are no distributors in this order cycle. This order cycle will not be visible to customers until you add one. Would you like to continue saving this order cycle?'
enterprises:
producer: "Producer"
Expand Down

0 comments on commit 003e65f

Please sign in to comment.