Merge pull request #3046 from dabura667/deletewallet

Fixed angular translations
This commit is contained in:
Gustavo Maximiliano Cortez 2015-07-29 10:50:41 -03:00
commit ce2f0a08db
3 changed files with 70 additions and 38 deletions

View file

@ -46,6 +46,10 @@ msgstr ""
msgid "Advanced" msgid "Advanced"
msgstr "" msgstr ""
#: public/views/modals/advancedSend.html
msgid "Advanced Send"
msgstr ""
#: public/views/disclaimer.html #: public/views/disclaimer.html
msgid "Agree" msgid "Agree"
msgstr "" msgstr ""
@ -87,6 +91,11 @@ msgstr ""
msgid "Available Balance" msgid "Available Balance"
msgstr "" msgstr ""
#: public/views/preferencesFee.html
#: public/views/modals/advancedSend.html
msgid "Average confirmation time: {{fee.nbBlocks * 10}} minutes"
msgstr ""
#: public/views/create.html #: public/views/create.html
#: public/views/join.html #: public/views/join.html
msgid "BIP32 master extended private key" msgid "BIP32 master extended private key"
@ -131,7 +140,7 @@ msgid "Bitcoin address"
msgstr "" msgstr ""
#: public/views/preferencesFee.html #: public/views/preferencesFee.html
msgid "Bitcoin transactions may include a fee collected by miners on the network. The higher the fee, the greater the incentive a miner has to include that transaction in a block. The Emergency level should only be used when there is a network congestion." msgid "Bitcoin transactions may include a fee collected by miners on the network. The higher the fee, the greater the incentive a miner has to include that transaction in a block. Actual fees are determined based on network load and the selected policy."
msgstr "" msgstr ""
#: public/views/modals/txp-details.html #: public/views/modals/txp-details.html
@ -160,6 +169,8 @@ msgstr ""
#: public/views/copayers.html #: public/views/copayers.html
#: public/views/walletHome.html #: public/views/walletHome.html
#: src/js/controllers/copayers.js
#: src/js/controllers/preferencesDelete.js
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
@ -184,6 +195,7 @@ msgid "Choose a wallet to send funds"
msgstr "" msgstr ""
#: public/views/includes/topbar.html #: public/views/includes/topbar.html
#: public/views/modals/advancedSend.html
#: public/views/modals/copayers.html #: public/views/modals/copayers.html
#: public/views/modals/customized-amount.html #: public/views/modals/customized-amount.html
#: public/views/modals/paypro.html #: public/views/modals/paypro.html
@ -200,6 +212,11 @@ msgstr ""
msgid "Commit hash" msgid "Commit hash"
msgstr "" msgstr ""
#: src/js/controllers/copayers.js
#: src/js/controllers/preferencesDelete.js
msgid "Confirm"
msgstr ""
#: public/views/modals/tx-details.html #: public/views/modals/tx-details.html
msgid "Confirmations" msgid "Confirmations"
msgstr "" msgstr ""
@ -208,6 +225,10 @@ msgstr ""
msgid "Copayers" msgid "Copayers"
msgstr "" msgstr ""
#: src/js/controllers/copayers.js
msgid "Copied to clipboard"
msgstr ""
#: public/views/backup.html #: public/views/backup.html
msgid "Copy backup to a safe place" msgid "Copy backup to a safe place"
msgstr "" msgstr ""
@ -321,6 +342,11 @@ msgstr ""
msgid "Creating transaction" msgid "Creating transaction"
msgstr "" msgstr ""
#: public/views/preferencesFee.html
#: public/views/modals/advancedSend.html
msgid "Current fee rate for this policy: {{fee.feePerKBUnit}}/kiB"
msgstr ""
#: public/views/modals/tx-details.html #: public/views/modals/tx-details.html
msgid "Date" msgid "Date"
msgstr "" msgstr ""
@ -372,18 +398,10 @@ msgstr ""
msgid "ENTER" msgid "ENTER"
msgstr "" msgstr ""
#: src/js/controllers/preferencesFee.js
msgid "Economy"
msgstr ""
#: public/views/preferences.html #: public/views/preferences.html
msgid "Email Notifications" msgid "Email Notifications"
msgstr "" msgstr ""
#: src/js/controllers/preferencesFee.js
msgid "Emergency"
msgstr ""
#: public/views/preferences.html #: public/views/preferences.html
msgid "Encrypt Private Key" msgid "Encrypt Private Key"
msgstr "" msgstr ""
@ -434,6 +452,10 @@ msgstr ""
msgid "Fee" msgid "Fee"
msgstr "" msgstr ""
#: public/views/modals/advancedSend.html
msgid "Fee Policy"
msgstr ""
#. Get information of payment if using Payment Protocol #. Get information of payment if using Payment Protocol
#: src/js/controllers/walletHome.js #: src/js/controllers/walletHome.js
msgid "Fetching Payment Information" msgid "Fetching Payment Information"
@ -543,6 +565,10 @@ msgstr ""
msgid "Invalid" msgid "Invalid"
msgstr "" msgstr ""
#: src/js/controllers/copayers.js
msgid "Invitation to share a Copay Wallet"
msgstr ""
#: src/js/controllers/index.js #: src/js/controllers/index.js
msgid "Italian" msgid "Italian"
msgstr "" msgstr ""
@ -560,6 +586,10 @@ msgstr ""
msgid "Join" msgid "Join"
msgstr "" msgstr ""
#: src/js/controllers/copayers.js
msgid "Join my Copay wallet. Here is the invitation code: {{secret}} You can download Copay for your phone or desktop at https://copay.io"
msgstr ""
#: public/views/add.html #: public/views/add.html
msgid "Join shared wallet" msgid "Join shared wallet"
msgstr "" msgstr ""
@ -640,10 +670,6 @@ msgstr ""
msgid "No transactions yet" msgid "No transactions yet"
msgstr "" msgstr ""
#: src/js/controllers/preferencesFee.js
msgid "Normal"
msgstr ""
#: public/views/walletHome.html #: public/views/walletHome.html
#: public/views/modals/customized-amount.html #: public/views/modals/customized-amount.html
msgid "Not valid" msgid "Not valid"
@ -655,6 +681,11 @@ msgstr ""
msgid "Note" msgid "Note"
msgstr "" msgstr ""
#: src/js/controllers/copayers.js
#: src/js/controllers/preferencesDelete.js
msgid "OK"
msgstr ""
#: public/views/modals/tx-status.html #: public/views/modals/tx-status.html
msgid "OKAY" msgid "OKAY"
msgstr "" msgstr ""
@ -783,10 +814,6 @@ msgstr ""
msgid "Preferences" msgid "Preferences"
msgstr "" msgstr ""
#: src/js/controllers/preferencesFee.js
msgid "Priority"
msgstr ""
#: public/views/modals/customized-amount.html #: public/views/modals/customized-amount.html
msgid "QR Code" msgid "QR Code"
msgstr "" msgstr ""
@ -1209,10 +1236,6 @@ msgstr ""
msgid "too long!" msgid "too long!"
msgstr "" msgstr ""
#: public/views/preferencesFee.html
msgid "{{fee.value}} bits per kB"
msgstr ""
#: src/js/controllers/walletHome.js #: src/js/controllers/walletHome.js
msgid "{{fee}} will be discounted for bitcoin networking fees" msgid "{{fee}} will be discounted for bitcoin networking fees"
msgstr "" msgstr ""

View file

@ -4,6 +4,10 @@ angular.module('copayApp.controllers').controller('copayersController',
function($scope, $rootScope, $timeout, $log, $modal, profileService, go, notification, isCordova, gettext, gettextCatalog) { function($scope, $rootScope, $timeout, $log, $modal, profileService, go, notification, isCordova, gettext, gettextCatalog) {
var self = this; var self = this;
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');
self.init = function() { self.init = function() {
var fc = profileService.focusedClient; var fc = profileService.focusedClient;
@ -18,16 +22,16 @@ angular.module('copayApp.controllers').controller('copayersController',
var _modalDeleteWallet = function() { var _modalDeleteWallet = function() {
var ModalInstanceCtrl = function($scope, $modalInstance, gettext) { 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.loading = false;
$scope.ok = function() { $scope.ok = function() {
$scope.loading = true; $scope.loading = true;
$modalInstance.close('ok'); $modalInstance.close(ok_msg);
}; };
$scope.cancel = function() { $scope.cancel = function() {
$modalInstance.dismiss('cancel'); $modalInstance.dismiss(cancel_msg);
}; };
}; };
@ -59,7 +63,7 @@ angular.module('copayApp.controllers').controller('copayersController',
} else { } else {
go.walletHome(); go.walletHome();
$timeout(function() { $timeout(function() {
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}));
}); });
} }
}); });
@ -70,13 +74,13 @@ angular.module('copayApp.controllers').controller('copayersController',
var fc = profileService.focusedClient; var fc = profileService.focusedClient;
if (isCordova) { if (isCordova) {
navigator.notification.confirm( navigator.notification.confirm(
'Are you sure you want to delete this wallet?', delete_msg,
function(buttonIndex) { function(buttonIndex) {
if (buttonIndex == 2) { if (buttonIndex == 2) {
_deleteWallet(); _deleteWallet();
} }
}, },
'Confirm', ['Cancel', 'OK'] confirm_msg, [cancel_msg, ok_msg]
); );
} else { } else {
_modalDeleteWallet(); _modalDeleteWallet();
@ -86,7 +90,7 @@ angular.module('copayApp.controllers').controller('copayersController',
self.copySecret = function(secret) { self.copySecret = function(secret) {
if (isCordova) { if (isCordova) {
window.cordova.plugins.clipboard.copy(secret); window.cordova.plugins.clipboard.copy(secret);
window.plugins.toast.showShortCenter('Copied to clipboard'); window.plugins.toast.showShortCenter(gettextCatalog.getString('Copied to clipboard'));
} }
}; };
@ -95,8 +99,8 @@ angular.module('copayApp.controllers').controller('copayersController',
if (isMobile.Android() || isMobile.Windows()) { if (isMobile.Android() || isMobile.Windows()) {
window.ignoreMobilePause = true; window.ignoreMobilePause = true;
} }
var message = 'Join my Copay wallet. Here is the invitation code: ' + secret + ' You can download Copay for your phone or desktop at https://copay.io'; var message = gettextCatalog.getString('Join my Copay wallet. Here is the invitation code: {{secret}} You can download Copay for your phone or desktop at https://copay.io', {secret: secret});
window.plugins.socialsharing.share(message, 'Invitation to share a Copay Wallet', null, null); window.plugins.socialsharing.share(message, gettextCatalog.getString('Invitation to share a Copay Wallet'), null, null);
} }
}; };

View file

@ -5,18 +5,23 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
this.isCordova = isCordova; this.isCordova = isCordova;
this.error = null; 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 _modalDeleteWallet = function() {
var ModalInstanceCtrl = function($scope, $modalInstance, gettext) { 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.loading = false;
$scope.ok = function() { $scope.ok = function() {
$scope.loading = true; $scope.loading = true;
$modalInstance.close('ok'); $modalInstance.close(ok_msg);
}; };
$scope.cancel = function() { $scope.cancel = function() {
$modalInstance.dismiss('cancel'); $modalInstance.dismiss(cancel_msg);
}; };
}; };
@ -42,7 +47,7 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
if (err) { if (err) {
self.error = err.message || err; self.error = err.message || err;
} else { } 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,13 +55,13 @@ angular.module('copayApp.controllers').controller('preferencesDeleteWalletContro
this.deleteWallet = function() { this.deleteWallet = function() {
if (isCordova) { if (isCordova) {
navigator.notification.confirm( navigator.notification.confirm(
'Are you sure you want to delete this wallet?', delete_msg,
function(buttonIndex) { function(buttonIndex) {
if (buttonIndex == 2) { if (buttonIndex == 2) {
_deleteWallet(); _deleteWallet();
} }
}, },
'Confirm', ['Cancel', 'OK'] confirm_msg, [cancel_msg, ok_msg]
); );
} else { } else {
_modalDeleteWallet(); _modalDeleteWallet();