MeLi: Update translations. Fix icon
This commit is contained in:
parent
e486568708
commit
39f7d96f9a
4 changed files with 17 additions and 16 deletions
|
|
@ -54,7 +54,7 @@ angular.module('copayApp.controllers').controller('buyMercadoLibreController', f
|
||||||
|
|
||||||
var statusChangeHandler = function(processName, showName, isOn) {
|
var statusChangeHandler = function(processName, showName, isOn) {
|
||||||
$log.debug('statusChangeHandler: ', processName, showName, isOn);
|
$log.debug('statusChangeHandler: ', processName, showName, isOn);
|
||||||
if (processName == 'buyingGiftCard' && !isOn) {
|
if (processName == 'Comprando Vale-presente' && !isOn) {
|
||||||
$scope.sendStatus = 'success';
|
$scope.sendStatus = 'success';
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
|
|
@ -174,14 +174,14 @@ angular.module('copayApp.controllers').controller('buyMercadoLibreController', f
|
||||||
$log.debug("creating gift card " + count);
|
$log.debug("creating gift card " + count);
|
||||||
if (err) {
|
if (err) {
|
||||||
$scope.sendStatus = '';
|
$scope.sendStatus = '';
|
||||||
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
|
ongoingProcess.set('Comprando Vale-presente', false, statusChangeHandler);
|
||||||
giftCard = {};
|
giftCard = {};
|
||||||
giftCard.status = 'FAILURE';
|
giftCard.status = 'FAILURE';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (giftCard && giftCard.cardStatus && (giftCard.cardStatus != 'active' && giftCard.cardStatus != 'inactive' && giftCard.cardStatus != 'expired')) {
|
if (giftCard && giftCard.cardStatus && (giftCard.cardStatus != 'active' && giftCard.cardStatus != 'inactive' && giftCard.cardStatus != 'expired')) {
|
||||||
$scope.sendStatus = '';
|
$scope.sendStatus = '';
|
||||||
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
|
ongoingProcess.set('Comprando Vale-presente', false, statusChangeHandler);
|
||||||
giftCard = {};
|
giftCard = {};
|
||||||
giftCard.status = 'FAILURE';
|
giftCard.status = 'FAILURE';
|
||||||
}
|
}
|
||||||
|
|
@ -205,7 +205,7 @@ angular.module('copayApp.controllers').controller('buyMercadoLibreController', f
|
||||||
newData['uuid'] = dataSrc.uuid;
|
newData['uuid'] = dataSrc.uuid;
|
||||||
|
|
||||||
mercadoLibreService.savePendingGiftCard(newData, null, function(err) {
|
mercadoLibreService.savePendingGiftCard(newData, null, function(err) {
|
||||||
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
|
ongoingProcess.set('Comprando Vale-presente', false, statusChangeHandler);
|
||||||
$log.debug("Saving new gift card with status: " + newData.status);
|
$log.debug("Saving new gift card with status: " + newData.status);
|
||||||
$scope.mlGiftCard = newData;
|
$scope.mlGiftCard = newData;
|
||||||
});
|
});
|
||||||
|
|
@ -311,10 +311,10 @@ angular.module('copayApp.controllers').controller('buyMercadoLibreController', f
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ongoingProcess.set('buyingGiftCard', true, statusChangeHandler);
|
ongoingProcess.set('Comprando Vale-presente', true, statusChangeHandler);
|
||||||
publishAndSign($scope.wallet, createdTx, function() {}, function(err, txSent) {
|
publishAndSign($scope.wallet, createdTx, function() {}, function(err, txSent) {
|
||||||
if (err) {
|
if (err) {
|
||||||
ongoingProcess.set('buyingGiftCard', false, statusChangeHandler);
|
ongoingProcess.set('Comprando Vale-presente', false, statusChangeHandler);
|
||||||
showError(gettextCatalog.getString('Could not send transaction'), err);
|
showError(gettextCatalog.getString('Could not send transaction'), err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,14 +26,14 @@ angular.module('copayApp.services').factory('mercadoLibreService', function($htt
|
||||||
|
|
||||||
var homeItem = {
|
var homeItem = {
|
||||||
name: 'mercadoLibre',
|
name: 'mercadoLibre',
|
||||||
title: 'Mercado Livre Brazil Gift Cards',
|
title: 'Vales-presente do Mercado Livre Brasil',
|
||||||
icon: 'icon-ml',
|
icon: 'icon-ml',
|
||||||
sref: 'tabs.giftcards.mercadoLibre',
|
sref: 'tabs.giftcards.mercadoLibre',
|
||||||
};
|
};
|
||||||
|
|
||||||
var nextStepItem = {
|
var nextStepItem = {
|
||||||
name: 'mercadoLibre',
|
name: 'mercadoLibre',
|
||||||
title: 'Buy Mercado Livre Brazil Gift Cards',
|
title: 'Vales-presente do Mercado Livre Brasil',
|
||||||
icon: 'icon-ml',
|
icon: 'icon-ml',
|
||||||
sref: 'tabs.giftcards.mercadoLibre',
|
sref: 'tabs.giftcards.mercadoLibre',
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
}
|
}
|
||||||
.icon-ml {
|
.icon-ml {
|
||||||
background-image: url("../img/mercado-libre/icon-ml.svg");
|
background-image: url("../img/mercado-libre/icon-ml.svg");
|
||||||
height: 27px;
|
background-position: center;
|
||||||
|
background-size: 85%;
|
||||||
}
|
}
|
||||||
.bg {
|
.bg {
|
||||||
&.wallet {
|
&.wallet {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
<i class="icon big-icon-svg">
|
<i class="icon big-icon-svg">
|
||||||
<div class="bg icon-amazon"></div>
|
<div class="bg icon-amazon"></div>
|
||||||
</i>
|
</i>
|
||||||
<span>Mercado Livre Brazil Gift Cards</span>
|
<span>Vales-presente do Mercado Livre Brasil</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="amount-label">
|
<div class="amount-label">
|
||||||
<div class="amount">{{amountUnitStr}}</div>
|
<div class="amount">{{amountUnitStr}}</div>
|
||||||
|
|
@ -74,29 +74,29 @@
|
||||||
ng-click="buyConfirm()"
|
ng-click="buyConfirm()"
|
||||||
ng-if="!isCordova"
|
ng-if="!isCordova"
|
||||||
click-send-status="sendStatus">
|
click-send-status="sendStatus">
|
||||||
{{'Confirm purchase'|translate}}
|
Confirmar compra
|
||||||
</click-to-accept>
|
</click-to-accept>
|
||||||
<slide-to-accept
|
<slide-to-accept
|
||||||
ng-if="isCordova && wallet && totalAmountStr"
|
ng-if="isCordova && wallet && totalAmountStr"
|
||||||
slide-on-confirm="buyConfirm()"
|
slide-on-confirm="buyConfirm()"
|
||||||
slide-send-status="sendStatus">
|
slide-send-status="sendStatus">
|
||||||
{{'Slide to buy'|translate}}
|
Deslize para comprar
|
||||||
</slide-to-accept>
|
</slide-to-accept>
|
||||||
<slide-to-accept-success
|
<slide-to-accept-success
|
||||||
slide-success-show="sendStatus === 'success'"
|
slide-success-show="sendStatus === 'success'"
|
||||||
slide-success-on-confirm="goBackHome()"
|
slide-success-on-confirm="goBackHome()"
|
||||||
slide-success-hide-on-confirm="true">
|
slide-success-hide-on-confirm="true">
|
||||||
<span ng-show="mlGiftCard.status == 'FAILURE'">
|
<span ng-show="mlGiftCard.status == 'FAILURE'">
|
||||||
Your purchase could not be completed
|
Sua compra não pôde ser completada
|
||||||
</span>
|
</span>
|
||||||
<span ng-show="mlGiftCard.status == 'PENDING'">
|
<span ng-show="mlGiftCard.status == 'PENDING'">
|
||||||
Your purchase was added to the list of pending
|
Sua compra foi adicionada à lista de pendentes
|
||||||
</span>
|
</span>
|
||||||
<span ng-show="mlGiftCard.status == 'SUCCESS' || mlGiftCard.status == 'active'">
|
<span ng-show="mlGiftCard.status == 'SUCCESS' || mlGiftCard.status == 'active'">
|
||||||
Bought {{mlGiftCard.amount}} {{mlGiftCard.currency}}
|
Comprou {{mlGiftCard.amount}} {{mlGiftCard.currency}}
|
||||||
</span>
|
</span>
|
||||||
<div class="m10 size-14" ng-show="mlGiftCard.status == 'SUCCESS' || mlGiftCard.cardStatus == 'active'">
|
<div class="m10 size-14" ng-show="mlGiftCard.status == 'SUCCESS' || mlGiftCard.cardStatus == 'active'">
|
||||||
Gift card generated and ready to use.
|
Vale-presente gerado e pronto para usar
|
||||||
</div>
|
</div>
|
||||||
</slide-to-accept-success>
|
</slide-to-accept-success>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue