Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate and fix fallback errors when creating or updating OC #2660

Merged
Merged
Show file tree
Hide file tree
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
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'))
luisramos0 marked this conversation as resolved.
Show resolved Hide resolved

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