Merge pull request #3049 from cmgustavo/bug/fix-alerts

Bug/fixes translation source
This commit is contained in:
Matias Alejo Garcia 2015-07-29 13:04:36 -03:00
commit 69852fe0ed
5 changed files with 27 additions and 22 deletions

View file

@ -1,16 +1,16 @@
<div class="m20tp text-center"> <div class="m20tp text-center">
<div class="row"> <div class="row">
<h1 class="text-center m20b">{{title|translate}}</h1> <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"> <div class="large-6 medium-6 small-6 columns">
<button class="button warning expand round" ng-disabled="loading" ng-click="ok()"> <button class="button warning expand round" ng-disabled="loading" ng-click="ok()">
<i class="fi-trash"></i> <span translate>Yes</span> <i class="fi-trash"></i> <span translate>Yes</span>
</button> </button>
</div> </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>
</div> </div>

View file

@ -1,7 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('backupController', 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.isSafari = isMobile.Safari();
this.isCordova = isCordova; this.isCordova = isCordova;
this.error = null; this.error = null;
@ -54,7 +54,7 @@ angular.module('copayApp.controllers').controller('backupController',
var ew = this.getBackup(); var ew = this.getBackup();
if (!ew) return; if (!ew) return;
window.cordova.plugins.clipboard.copy(ew); 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'); $rootScope.$emit('Local/BackupDone');
}; };
@ -63,7 +63,7 @@ angular.module('copayApp.controllers').controller('backupController',
if (isMobile.Android() || isMobile.Windows()) { if (isMobile.Android() || isMobile.Windows()) {
window.ignoreMobilePause = true; 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); var name = (fc.credentials.walletName || fc.credentials.walletId);
if (fc.alias) { if (fc.alias) {
name = fc.alias + ' [' + name + ']'; name = fc.alias + ' [' + name + ']';

View file

@ -5,7 +5,7 @@ angular.module('copayApp.controllers').controller('copayersController',
var self = this; var self = this;
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?'); 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 cancel_msg = gettextCatalog.getString('Cancel');
var confirm_msg = gettextCatalog.getString('Confirm'); var confirm_msg = gettextCatalog.getString('Confirm');
@ -27,7 +27,7 @@ angular.module('copayApp.controllers').controller('copayersController',
$scope.ok = function() { $scope.ok = function() {
$scope.loading = true; $scope.loading = true;
$modalInstance.close(ok_msg); $modalInstance.close(accept_msg);
}; };
$scope.cancel = function() { $scope.cancel = function() {
@ -76,11 +76,11 @@ angular.module('copayApp.controllers').controller('copayersController',
navigator.notification.confirm( navigator.notification.confirm(
delete_msg, delete_msg,
function(buttonIndex) { function(buttonIndex) {
if (buttonIndex == 2) { if (buttonIndex == 1) {
_deleteWallet(); _deleteWallet();
} }
}, },
confirm_msg, [cancel_msg, ok_msg] confirm_msg, [accept_msg, cancel_msg]
); );
} else { } else {
_modalDeleteWallet(); _modalDeleteWallet();
@ -104,4 +104,4 @@ angular.module('copayApp.controllers').controller('copayersController',
} }
}; };
}); });

View file

@ -6,7 +6,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
this.error = null; this.error = null;
var delete_msg = gettextCatalog.getString('Are you sure you want to delete this wallet?'); 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 cancel_msg = gettextCatalog.getString('Cancel');
var confirm_msg = gettextCatalog.getString('Confirm'); var confirm_msg = gettextCatalog.getString('Confirm');
@ -17,7 +17,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
$scope.ok = function() { $scope.ok = function() {
$scope.loading = true; $scope.loading = true;
$modalInstance.close(ok_msg); $modalInstance.close(accept_msg);
}; };
$scope.cancel = function() { $scope.cancel = function() {
@ -57,14 +57,14 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
navigator.notification.confirm( navigator.notification.confirm(
delete_msg, delete_msg,
function(buttonIndex) { function(buttonIndex) {
if (buttonIndex == 2) { if (buttonIndex == 1) {
_deleteWallet(); _deleteWallet();
} }
}, },
confirm_msg, [cancel_msg, ok_msg] confirm_msg, [accept_msg, cancel_msg]
); );
} else { } else {
_modalDeleteWallet(); _modalDeleteWallet();
} }
}; };
}); });

View file

@ -89,6 +89,10 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
$rootScope.$digest(); $rootScope.$digest();
}); });
var accept_msg = gettextCatalog.getString('Accept');
var cancel_msg = gettextCatalog.getString('Cancel');
var confirm_msg = gettextCatalog.getString('Confirm');
// walletHome // walletHome
@ -431,7 +435,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
this.copyAddress = function(addr) { this.copyAddress = function(addr) {
if (isCordova) { if (isCordova) {
window.cordova.plugins.clipboard.copy(addr); 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()) { } else if (nodeWebkit.isDefined()) {
nodeWebkit.writeToClipboard(addr); nodeWebkit.writeToClipboard(addr);
} }
@ -1080,7 +1084,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
}; };
this.confirmDialog = function(msg, cb) { this.confirmDialog = function(msg, cb) {
if (isCordova) { if (isCordova) {
navigator.notification.confirm( navigator.notification.confirm(
msg, msg,
function(buttonIndex) { function(buttonIndex) {
@ -1091,7 +1095,8 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
} else { } else {
return cb(false); return cb(false);
} }
} },
confirm_msg, [accept_msg, cancel_msg]
); );
} else if (isChromeApp) { } else if (isChromeApp) {
// No feedback, alert/confirm not supported. // No feedback, alert/confirm not supported.