Translated toast cordova plugin

This commit is contained in:
Gustavo Maximiliano Cortez 2015-07-29 12:42:05 -03:00
commit e5e1e34fde
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
2 changed files with 4 additions and 4 deletions

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

@ -431,7 +431,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);
} }