Fix translations bp card

This commit is contained in:
Gustavo Maximiliano Cortez 2017-06-23 14:51:27 -03:00
parent 44efc77481
commit fd1bc9a823
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
2 changed files with 23 additions and 17 deletions

View File

@ -14,18 +14,18 @@ angular.module('copayApp.services').factory('bitpayAccountService', function($lo
* email: email address associated with bitpay account
* otp: two-factor one-time use password
* }
*
*
* pairingReason - text string to be embedded into popup message. If `null` then the reason
* message is not shown to the UI.
* "To {{reason}} you must pair this app with your BitPay account ({{email}})."
*
*
* cb - callback after completion
* callback(err, paired, apiContext)
*
* err - something unexpected happened which prevented the pairing
*
*
* paired - boolean indicating whether the pairing was compledted by the user
*
*
* apiContext - the context needed for making future api calls
* {
* token: api token for use in future calls
@ -33,6 +33,7 @@ angular.module('copayApp.services').factory('bitpayAccountService', function($lo
* appIdentity: the identity of this app
* }
*/
root.pair = function(pairData, pairingReason, cb) {
checkOtp(pairData, function(otp) {
pairData.otp = otp;
@ -66,14 +67,19 @@ angular.module('copayApp.services').factory('bitpayAccountService', function($lo
fetchBasicInfo(apiContext, function(err, basicInfo) {
if (err) return cb(err);
var title = gettextCatalog.getString('Add BitPay Account?');
var msgDetail = 'Add this BitPay account ({{email}})?';
var msg;
if (pairingReason) {
msgDetail = 'To {{reason}} you must first add your BitPay account - {{email}}';
}
var msg = gettextCatalog.getString(msgDetail, {
reason: pairingReason,
email: pairData.email
});
msg = gettextCatalog.getString('To {{reason}} you must first add your BitPay account - {{email}}', {
reason: pairingReason,
email: pairData.email
});
} else {
msg = gettextCatalog.getString('Add this BitPay account ({{email}})?', {
email: pairData.email
});
}
var ok = gettextCatalog.getString('Add Account');
var cancel = gettextCatalog.getString('Go back');
popupService.showConfirm(title, msg, ok, cancel, function(res) {
@ -182,5 +188,5 @@ angular.module('copayApp.services').factory('bitpayAccountService', function($lo
};
return root;
});

View File

@ -64,8 +64,8 @@
</label>
<div ng-if="bitpayCard.bitpayCardTransactionHistoryConfirming[0]">
<label class="item status-label" ng-click="bitpayCard.openExternalLink('https://help.bitpay.com/bitpay-card/why-do-you-require-one-blockchain-confirmation-for-bitpay-card-loads')">
<div translate>
Confirming
<div>
<span translate>Confirming</span>
<i class="icon">
<img src="img/icon-help-support.svg" class="bg"/>
</i>
@ -77,8 +77,8 @@
</div>
<div ng-if="bitpayCard.bitpayCardTransactionHistoryPreAuth[0]">
<label class="item status-label" ng-click="bitpayCard.openExternalLink('https://help.bitpay.com/bitpay-card/why-was-i-overcharged-on-my-bitpay-card-account-why-is-there-a-hold-on-my-account')">
<div translate>
Pre-Auth Holds
<div>
<span translate>Pre-Auth Holds</span>
<i class="icon">
<img src="img/icon-help-support.svg" class="bg"/>
</i>
@ -89,7 +89,7 @@
</div>
</div>
<div ng-if="bitpayCard.bitpayCardTransactionHistoryCompleted[0]">
<label class="item status-label">
<label class="item status-label" ng-if="bitpayCard.bitpayCardTransactionHistoryPreAuth[0] || bitpayCard.bitpayCardTransactionHistoryConfirming[0]">
<div translate>
Completed
</div>