Options also translatable

This commit is contained in:
Sebastiaan Pasma 2018-07-19 09:59:56 +02:00
commit 4f4bee27f1
No known key found for this signature in database
GPG key ID: 9A2B0C8B95A1D26F
3 changed files with 14 additions and 4 deletions

View file

@ -201,6 +201,16 @@ msgstr ""
msgid "Price Display"
msgstr ""
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:12
msgid "Fiat"
msgstr ""
#: src/js/controllers/tab-settings.js:19
#: www/views/preferencesPriceDisplay.html:15
msgid "Cryptocurrency"
msgstr ""
#: src/js/controllers/buyAmazon.js:98
msgid "Amazon.com is not available at this moment. Please try back later."
msgstr ""

View file

@ -16,7 +16,7 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
isoCode: config.wallet.settings.alternativeIsoCode
};
$scope.selectedPriceDisplay = config.wallet.settings.priceDisplay;
$scope.selectedPriceDisplay = config.wallet.settings.priceDisplay === 'crypto' ? gettextCatalog.getString('Cryptocurrency') : gettextCatalog.getString('Fiat');
// TODO move this to a generic service
bitpayAccountService.getAccounts(function(err, data) {

View file

@ -1,7 +1,7 @@
<ion-view id="settings-pricedisplay" class="settings" show-tabs>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Price display'|translate}}
{{'Price Display'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
@ -9,10 +9,10 @@
<ion-content>
<div class="price-display">
<ion-radio class="capitalize" ng-value="'fiat'" ng-model="selectedPriceDisplay" ng-click="save(selectedPriceDisplay)">
fiat
<span translate>Fiat</span>
</ion-radio>
<ion-radio class="capitalize" ng-value="'crypto'" ng-model="selectedPriceDisplay" ng-click="save(selectedPriceDisplay)">
cryptocurrency
<span translate>Cryptocurrency</span>
</ion-radio>
</div>
</ion-content>