Fixed angular translations
This commit is contained in:
parent
ffe0cf1070
commit
4ec25a1afe
2 changed files with 26 additions and 17 deletions
|
|
@ -5,18 +5,23 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
this.isCordova = isCordova;
|
||||
this.error = null;
|
||||
|
||||
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
||||
var ok_msg = gettextCatalog.getString('OK');
|
||||
var cancel_msg = gettextCatalog.getString('Cancel');
|
||||
var confirm_msg = gettextCatalog.getString('Confirm');
|
||||
|
||||
var _modalDeleteWallet = function() {
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance, gettext) {
|
||||
$scope.title = gettext('Are you sure you want to delete this wallet?');
|
||||
$scope.title = delete_msg;
|
||||
$scope.loading = false;
|
||||
|
||||
$scope.ok = function() {
|
||||
$scope.loading = true;
|
||||
$modalInstance.close('ok');
|
||||
$modalInstance.close(ok_msg);
|
||||
|
||||
};
|
||||
$scope.cancel = function() {
|
||||
$modalInstance.dismiss('cancel');
|
||||
$modalInstance.dismiss(cancel_msg);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -42,7 +47,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
if (err) {
|
||||
self.error = err.message || err;
|
||||
} else {
|
||||
notification.success(gettext('Success'), gettextCatalog.getString('The wallet "{{walletName}}" was deleted', {walletName: walletName}));
|
||||
notification.success(gettextCatalog.getString('Success'), gettextCatalog.getString('The wallet "{{walletName}}" was deleted', {walletName: walletName}));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -50,16 +55,16 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
this.deleteWallet = function() {
|
||||
if (isCordova) {
|
||||
navigator.notification.confirm(
|
||||
'Are you sure you want to delete this wallet?',
|
||||
delete_msg,
|
||||
function(buttonIndex) {
|
||||
if (buttonIndex == 2) {
|
||||
_deleteWallet();
|
||||
}
|
||||
},
|
||||
'Confirm', ['Cancel', 'OK']
|
||||
confirm_msg, [cancel_msg, ok_msg]
|
||||
);
|
||||
} else {
|
||||
_modalDeleteWallet();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue