From 829c8f958e68d89f81fa2c41921a69c53fe1ef84 Mon Sep 17 00:00:00 2001 From: Sebastiaan Pasma Date: Thu, 13 Sep 2018 15:21:29 +0200 Subject: [PATCH] buy.bitcoin.com service translatable --- i18n/po/template.pot | 16 ++++++++++++ src/js/routes.js | 2 +- src/js/services/buy-bitcoin-com.service.js | 25 +++++++++++++++++++ src/js/services/buydotbitcoindotcomService.js | 24 ------------------ www/views/buyandsell.html | 6 ++--- 5 files changed, 45 insertions(+), 28 deletions(-) create mode 100644 src/js/services/buy-bitcoin-com.service.js delete mode 100644 src/js/services/buydotbitcoindotcomService.js diff --git a/i18n/po/template.pot b/i18n/po/template.pot index 2158c4afd..a24369a16 100644 --- a/i18n/po/template.pot +++ b/i18n/po/template.pot @@ -476,6 +476,22 @@ msgstr "" msgid "Buy Bitcoin" msgstr "" +#: www/views/buyandsell.html:5 +msgid "Buy or Sell Bitcoin" +msgstr "" + +#: www/views/buyandsell.html:13 +msgid "Connect an Exchange" +msgstr "" + +#: www/views/buyandsell.html:14 +msgid "Buy or sell bitcoin directly from your wallet by connecting your exchange accounts." +msgstr "" + +#: src/js/services/buy-bitcoin-com.service.js:14 +msgid "Buy Bitcoin With Credit Card" +msgstr "" + #: www/views/mercadoLibre.html:22 #: www/views/mercadoLibre.html:50 msgid "Buy a Gift Card" diff --git a/src/js/routes.js b/src/js/routes.js index d2b78aac3..a712a01c1 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -1207,7 +1207,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }); }) - .run(function($rootScope, $state, $location, $log, $timeout, startupService, ionicToast, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ buydotbitcoindotcomService, pushNotificationsService, glideraService, amazonService, bitpayCardService, applicationService, mercadoLibreService, rateService) { + .run(function($rootScope, $state, $location, $log, $timeout, startupService, ionicToast, fingerprintService, $ionicHistory, $ionicPlatform, $window, appConfigService, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService, configService, emailService, /* plugins START HERE => */ buyBitcoinComService, pushNotificationsService, glideraService, amazonService, bitpayCardService, applicationService, mercadoLibreService, rateService) { $ionicPlatform.ready(function() { diff --git a/src/js/services/buy-bitcoin-com.service.js b/src/js/services/buy-bitcoin-com.service.js new file mode 100644 index 000000000..06b1e73c6 --- /dev/null +++ b/src/js/services/buy-bitcoin-com.service.js @@ -0,0 +1,25 @@ +'use strict'; + +(function() { + + angular + .module('bitcoincom.services') + .factory('buyBitcoinComService', buyBitcoinComService); + + function buyBitcoinComService($http, $log, $window, $filter, platformInfo, storageService, buyAndSellService, gettextCatalog) { + var service = {}; + + service.register = function() { + buyAndSellService.register({ + name: 'buydotbitcoindotcom', + logo: 'img/bitcoin-com-logo-grey.png', + location: gettextCatalog.getString('Buy Bitcoin With Credit Card'), + sref: 'tabs.buyandsell.bitcoindotcom' + }); + }; + + service.register(); + + return service; + } +})(); diff --git a/src/js/services/buydotbitcoindotcomService.js b/src/js/services/buydotbitcoindotcomService.js deleted file mode 100644 index 085c61285..000000000 --- a/src/js/services/buydotbitcoindotcomService.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -angular.module('copayApp.services').factory('buydotbitcoindotcomService', function($http, $log, $window, $filter, platformInfo, storageService, buyAndSellService, lodash, configService, txFormatService) { - var root = {}; - var credentials = {}; - var isCordova = platformInfo.isCordova; - - root.init = function(cb) { - - }; - - var register = function() { - - buyAndSellService.register({ - name: 'buydotbitcoindotcom', - logo: 'img/bitcoin-com-logo-grey.png', - location: 'Buy Bitcoin With Credit Card', - sref: 'tabs.buyandsell.bitcoindotcom' - }); - }; - - register(); - return root; -}); diff --git a/www/views/buyandsell.html b/www/views/buyandsell.html index f18866aa5..9a1fb5538 100644 --- a/www/views/buyandsell.html +++ b/www/views/buyandsell.html @@ -2,7 +2,7 @@ - Buy or Sell Bitcoin + Buy or Sell Bitcoin
@@ -10,8 +10,8 @@ -
Connect an Exchange
-
Buy or sell bitcoin directly from your wallet by connecting your exchange accounts.
+
Connect an Exchange
+
Buy or sell bitcoin directly from your wallet by connecting your exchange accounts.