Extract translations from javascript

This commit is contained in:
Julius Pabrinkis
2017-05-11 18:38:28 +01:00
committed by Maikel Linke
parent 9fa7a30c7e
commit 739d06cf03
23 changed files with 120 additions and 63 deletions

View File

@@ -51,13 +51,13 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
$scope.$watch 'bulk_order_form.$dirty', (newVal, oldVal) ->
if newVal == true
StatusMessage.display 'notice', "You have unsaved changes"
StatusMessage.display 'notice', t('js.unsaved_changes')
$scope.submit = ->
if $scope.bulk_order_form.$valid
StatusMessage.display 'progress', "Saving..."
StatusMessage.display 'progress', t('js.saving')
$q.all(LineItems.saveAll()).then(->
StatusMessage.display 'success', "All changes saved"
StatusMessage.display 'success', t('js.all_changes_saved')
$scope.bulk_order_form.$setPristine()
).catch ->
StatusMessage.display 'failure', t "unsaved_changes_error"