diff --git a/assets/js/controllers/settings/changePassword.controller.js b/assets/js/controllers/settings/changePassword.controller.js index 6272dce5d8..90513cba15 100644 --- a/assets/js/controllers/settings/changePassword.controller.js +++ b/assets/js/controllers/settings/changePassword.controller.js @@ -32,7 +32,7 @@ function ChangePasswordCtrl($scope, $log, Wallet, Alerts, $uibModalInstance, $tr const error = (err) => { $scope.status.waiting = false; - $scope.errors.unsuccessful = err; + $translate(err).then(msg => $scope.errors.unsuccessful = msg); }; $scope.status.waiting = true; diff --git a/assets/js/services/wallet.service.js b/assets/js/services/wallet.service.js index 031631d6a8..7066fb4db5 100644 --- a/assets/js/services/wallet.service.js +++ b/assets/js/services/wallet.service.js @@ -460,11 +460,13 @@ function Wallet( $http, $window, $timeout, $location, Alerts, MyWallet wallet.changePassword = (newPassword, successCallback, errorCallback) => { wallet.store.changePassword(newPassword, (() => { - Alerts.displaySuccess('CHANGE_PASSWORD_SUCCESS'); - successCallback(translation); + let msg = 'CHANGE_PASSWORD_SUCCESS'; + Alerts.displaySuccess(msg); + successCallback(msg); }), () => { - Alerts.displayError('CHANGE_PASSWORD_FAILED'); - errorCallback(translation); + let err = 'CHANGE_PASSWORD_FAILED'; + Alerts.displayError(err); + errorCallback(err); }); };