Merge pull request #3049 from cmgustavo/bug/fix-alerts
Bug/fixes translation source
This commit is contained in:
commit
69852fe0ed
5 changed files with 27 additions and 22 deletions
|
|
@ -1,16 +1,16 @@
|
|||
<div class="m20tp text-center">
|
||||
<div class="row">
|
||||
<h1 class="text-center m20b">{{title|translate}}</h1>
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="button light-gray expand outline round" ng-disabled="loading"
|
||||
ng-click="cancel()">
|
||||
<i class="fi-x"></i> <span class="tu" translate>No</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="button warning expand round" ng-disabled="loading" ng-click="ok()">
|
||||
<i class="fi-trash"></i> <span translate>Yes</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
<button class="button light-gray expand outline round" ng-disabled="loading"
|
||||
ng-click="cancel()">
|
||||
<i class="fi-x"></i> <span class="tu" translate>Cancel</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('backupController',
|
||||
function($rootScope, $scope, $timeout, backupService, profileService, isMobile, isCordova, notification, go, gettext) {
|
||||
function($rootScope, $scope, $timeout, backupService, profileService, isMobile, isCordova, notification, go, gettext, gettextCatalog) {
|
||||
this.isSafari = isMobile.Safari();
|
||||
this.isCordova = isCordova;
|
||||
this.error = null;
|
||||
|
|
@ -54,7 +54,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
|||
var ew = this.getBackup();
|
||||
if (!ew) return;
|
||||
window.cordova.plugins.clipboard.copy(ew);
|
||||
window.plugins.toast.showShortCenter('Copied to clipboard');
|
||||
window.plugins.toast.showShortCenter(gettextCatalog.getString('Copied to clipboard'));
|
||||
$rootScope.$emit('Local/BackupDone');
|
||||
};
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ angular.module('copayApp.controllers').controller('backupController',
|
|||
if (isMobile.Android() || isMobile.Windows()) {
|
||||
window.ignoreMobilePause = true;
|
||||
}
|
||||
window.plugins.toast.showShortCenter('Preparing backup...');
|
||||
window.plugins.toast.showShortCenter(gettextCatalog.getString('Preparing backup...'));
|
||||
var name = (fc.credentials.walletName || fc.credentials.walletId);
|
||||
if (fc.alias) {
|
||||
name = fc.alias + ' [' + name + ']';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
var self = this;
|
||||
|
||||
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
||||
var ok_msg = gettextCatalog.getString('OK');
|
||||
var accept_msg = gettextCatalog.getString('Accept');
|
||||
var cancel_msg = gettextCatalog.getString('Cancel');
|
||||
var confirm_msg = gettextCatalog.getString('Confirm');
|
||||
|
||||
|
|
@ -27,7 +27,7 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
|
||||
$scope.ok = function() {
|
||||
$scope.loading = true;
|
||||
$modalInstance.close(ok_msg);
|
||||
$modalInstance.close(accept_msg);
|
||||
|
||||
};
|
||||
$scope.cancel = function() {
|
||||
|
|
@ -76,11 +76,11 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
navigator.notification.confirm(
|
||||
delete_msg,
|
||||
function(buttonIndex) {
|
||||
if (buttonIndex == 2) {
|
||||
if (buttonIndex == 1) {
|
||||
_deleteWallet();
|
||||
}
|
||||
},
|
||||
confirm_msg, [cancel_msg, ok_msg]
|
||||
confirm_msg, [accept_msg, cancel_msg]
|
||||
);
|
||||
} else {
|
||||
_modalDeleteWallet();
|
||||
|
|
@ -104,4 +104,4 @@ angular.module('copayApp.controllers').controller('copayersController',
|
|||
}
|
||||
};
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
this.error = null;
|
||||
|
||||
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?');
|
||||
var ok_msg = gettextCatalog.getString('OK');
|
||||
var accept_msg = gettextCatalog.getString('Accept');
|
||||
var cancel_msg = gettextCatalog.getString('Cancel');
|
||||
var confirm_msg = gettextCatalog.getString('Confirm');
|
||||
|
||||
|
|
@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
|
||||
$scope.ok = function() {
|
||||
$scope.loading = true;
|
||||
$modalInstance.close(ok_msg);
|
||||
$modalInstance.close(accept_msg);
|
||||
|
||||
};
|
||||
$scope.cancel = function() {
|
||||
|
|
@ -57,14 +57,14 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
|
|||
navigator.notification.confirm(
|
||||
delete_msg,
|
||||
function(buttonIndex) {
|
||||
if (buttonIndex == 2) {
|
||||
if (buttonIndex == 1) {
|
||||
_deleteWallet();
|
||||
}
|
||||
},
|
||||
confirm_msg, [cancel_msg, ok_msg]
|
||||
confirm_msg, [accept_msg, cancel_msg]
|
||||
);
|
||||
} else {
|
||||
_modalDeleteWallet();
|
||||
}
|
||||
};
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -89,6 +89,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
$rootScope.$digest();
|
||||
});
|
||||
|
||||
var accept_msg = gettextCatalog.getString('Accept');
|
||||
var cancel_msg = gettextCatalog.getString('Cancel');
|
||||
var confirm_msg = gettextCatalog.getString('Confirm');
|
||||
|
||||
// walletHome
|
||||
|
||||
|
||||
|
|
@ -431,7 +435,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
this.copyAddress = function(addr) {
|
||||
if (isCordova) {
|
||||
window.cordova.plugins.clipboard.copy(addr);
|
||||
window.plugins.toast.showShortCenter('Copied to clipboard');
|
||||
window.plugins.toast.showShortCenter(gettextCatalog.getString('Copied to clipboard'));
|
||||
} else if (nodeWebkit.isDefined()) {
|
||||
nodeWebkit.writeToClipboard(addr);
|
||||
}
|
||||
|
|
@ -1080,7 +1084,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
};
|
||||
|
||||
this.confirmDialog = function(msg, cb) {
|
||||
if (isCordova) {
|
||||
if (isCordova) {
|
||||
navigator.notification.confirm(
|
||||
msg,
|
||||
function(buttonIndex) {
|
||||
|
|
@ -1091,7 +1095,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
} else {
|
||||
return cb(false);
|
||||
}
|
||||
}
|
||||
},
|
||||
confirm_msg, [accept_msg, cancel_msg]
|
||||
);
|
||||
} else if (isChromeApp) {
|
||||
// No feedback, alert/confirm not supported.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue