Merge pull request #6395 from gabrielbazan7/feat/addTranslation

General fixes in confirm view
This commit is contained in:
Gustavo Maximiliano Cortez 2017-07-13 15:02:39 -03:00 committed by GitHub
commit 622e81b6fd
3 changed files with 10 additions and 10 deletions

View File

@ -60,7 +60,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
function setNoWallet(msg) { function setNoWallet(msg) {
$scope.wallet = null; $scope.wallet = null;
$scope.noWalletMessage = gettextCatalog.getString(msg); $scope.noWalletMessage = msg;
$log.warn('Not ready to make the payment:' + msg); $log.warn('Not ready to make the payment:' + msg);
$timeout(function() { $timeout(function() {
$scope.$apply(); $scope.$apply();
@ -80,7 +80,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
}); });
if (!$scope.wallets || !$scope.wallets.length) { if (!$scope.wallets || !$scope.wallets.length) {
setNoWallet('No wallets available'); setNoWallet(gettextCatalog.getString('No wallets available'));
return cb(); return cb();
} }
@ -109,7 +109,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
return cb('Could not update any wallet'); return cb('Could not update any wallet');
if (lodash.isEmpty(filteredWallets)) { if (lodash.isEmpty(filteredWallets)) {
setNoWallet('Insufficent funds'); setNoWallet(gettextCatalog.getString('Insufficient funds'));
} }
$scope.wallets = lodash.clone(filteredWallets); $scope.wallets = lodash.clone(filteredWallets);
return cb(); return cb();
@ -272,7 +272,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$log.debug('Send max info', sendMaxInfo); $log.debug('Send max info', sendMaxInfo);
if (tx.sendMax && sendMaxInfo.amount == 0) { if (tx.sendMax && sendMaxInfo.amount == 0) {
setNoWallet('Insufficent funds'); setNoWallet(gettextCatalog.getString('Insufficient funds'));
popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee')); popupService.showAlert(gettextCatalog.getString('Error'), gettextCatalog.getString('Not enough funds for fee'));
return cb('no_funds'); return cb('no_funds');
} }

View File

@ -61,7 +61,7 @@
<span ng-if="tx.toName && showAddress">{{tx.toAddress}}</span> <span ng-if="tx.toName && showAddress">{{tx.toAddress}}</span>
</div> </div>
</div> </div>
<a class="item item-icon-right" ng-hide="!wallets" ng-click="showWalletSelector()"> <a class="item item-icon-right" ng-hide="!wallet" ng-click="showWalletSelector()">
<span class="label" translate>From</span> <span class="label" translate>From</span>
<div class="wallet" ng-if="wallet"> <div class="wallet" ng-if="wallet">
<i class="icon big-icon-svg"> <i class="icon big-icon-svg">
@ -107,7 +107,7 @@
</ion-content> </ion-content>
<click-to-accept <click-to-accept
ng-click="approve(tx, wallet, statusChangeHandler)" ng-click="approve(tx, wallet, statusChangeHandler)"
ng-if="!isCordova || isWindowsPhoneApp" ng-if="(!isCordova || isWindowsPhoneApp) && wallet"
click-send-status="sendStatus" click-send-status="sendStatus"
is-disabled="!wallet"> is-disabled="!wallet">
{{buttonText}} {{buttonText}}

View File

@ -10,9 +10,9 @@
</ion-nav-title> </ion-nav-title>
<ion-nav-buttons side="secondary"> <ion-nav-buttons side="secondary">
<button class="button-share ng-hide" ng-show="showShareButton" ng-click="shareAddress()"> <button class="button-share ng-hide" ng-show="showShareButton" ng-click="shareAddress()">
<i class="icon" <i class="icon"
ng-class="{ ng-class="{
'ion-ios-upload-outline': showShareButton == 'iOS', 'ion-ios-upload-outline': showShareButton == 'iOS',
'ion-android-share-alt': showShareButton != 'iOS' 'ion-android-share-alt': showShareButton != 'iOS'
}"></i> }"></i>
</button> </button>
@ -23,7 +23,7 @@
<div class="qr-code" copy-to-clipboard="copyToClipboard()"> <div class="qr-code" copy-to-clipboard="copyToClipboard()">
<qrcode size="220" data="bitcoin:{{address + '?amount=' + amountBtc}}" color="#334"></qrcode> <qrcode size="220" data="bitcoin:{{address + '?amount=' + amountBtc}}" color="#334"></qrcode>
</div> </div>
<div class="info"> <div class="info">
<div class="item single-line" copy-to-clipboard="address"> <div class="item single-line" copy-to-clipboard="address">
<span class="label" translate>Address</span> <span class="label" translate>Address</span>
<span class="item-note ellipsis"> <span class="item-note ellipsis">
@ -43,7 +43,7 @@
</i> </i>
{{wallet.name}} {{wallet.name}}
</div> </div>
<div class="label">Receive in</div> <div class="label" translate>Receive in</div>
</div> </div>
</div> </div>
</div> </div>