From 34e84858c80880dcb18bb0701b2daf64d7a0ec84 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Thu, 22 Nov 2018 11:03:15 +0530 Subject: [PATCH] Changed naming from BTC -> FLO --- electrum/address_synchronizer.py | 2 +- electrum/gui/kivy/uix/screens.py | 8 ++++---- electrum/gui/qt/history_list.py | 4 ++-- electrum/gui/qt/main_window.py | 20 ++++++++++---------- electrum/gui/text.py | 2 +- electrum/plot.py | 2 +- electrum/plugin.py | 4 ++-- electrum/simple_config.py | 2 +- electrum/util.py | 14 +++++++------- 9 files changed, 29 insertions(+), 29 deletions(-) diff --git a/electrum/address_synchronizer.py b/electrum/address_synchronizer.py index ae088319..d0a38fa0 100644 --- a/electrum/address_synchronizer.py +++ b/electrum/address_synchronizer.py @@ -791,7 +791,7 @@ class AddressSynchronizer(PrintError): @with_local_height_cached def get_addr_balance(self, address): - """Return the balance of a bitcoin address: + """Return the balance of a FLO address: confirmed and matured, unconfirmed, unmatured """ received, sent = self.get_addr_io(address) diff --git a/electrum/gui/kivy/uix/screens.py b/electrum/gui/kivy/uix/screens.py index 984fa2f3..7879aae8 100644 --- a/electrum/gui/kivy/uix/screens.py +++ b/electrum/gui/kivy/uix/screens.py @@ -176,7 +176,7 @@ class SendScreen(CScreen): try: uri = electrum.util.parse_URI(text, self.app.on_pr) except: - self.app.show_info(_("Not a Bitcoin URI")) + self.app.show_info(_("Not a FLO URI")) return amount = uri.get('amount') self.screen.address = uri.get('address', '') @@ -249,10 +249,10 @@ class SendScreen(CScreen): else: address = str(self.screen.address) if not address: - self.app.show_error(_('Recipient not specified.') + ' ' + _('Please scan a Bitcoin address or a payment request')) + self.app.show_error(_('Recipient not specified.') + ' ' + _('Please scan a FLO address or a payment request')) return if not bitcoin.is_address(address): - self.app.show_error(_('Invalid Bitcoin Address') + ':\n' + address) + self.app.show_error(_('Invalid FLO Address') + ':\n' + address) return try: amount = self.app.get_amount(self.screen.amount) @@ -375,7 +375,7 @@ class ReceiveScreen(CScreen): def do_share(self): uri = self.get_URI() - self.app.do_share(uri, _("Share Bitcoin Request")) + self.app.do_share(uri, _("Share FLO Request")) def do_copy(self): uri = self.get_URI() diff --git a/electrum/gui/qt/history_list.py b/electrum/gui/qt/history_list.py index 6a88985a..a22723ea 100644 --- a/electrum/gui/qt/history_list.py +++ b/electrum/gui/qt/history_list.py @@ -177,13 +177,13 @@ class HistoryList(MyTreeWidget, AcceptFileDragDrop): grid = QGridLayout() grid.addWidget(QLabel(_("Start")), 0, 0) grid.addWidget(QLabel(self.format_date(start_date)), 0, 1) - grid.addWidget(QLabel(str(h.get('start_fiat_value')) + '/BTC'), 0, 2) + grid.addWidget(QLabel(str(h.get('start_fiat_value')) + '/FLO'), 0, 2) grid.addWidget(QLabel(_("Initial balance")), 1, 0) grid.addWidget(QLabel(format_amount(h['start_balance'])), 1, 1) grid.addWidget(QLabel(str(h.get('start_fiat_balance'))), 1, 2) grid.addWidget(QLabel(_("End")), 2, 0) grid.addWidget(QLabel(self.format_date(end_date)), 2, 1) - grid.addWidget(QLabel(str(h.get('end_fiat_value')) + '/BTC'), 2, 2) + grid.addWidget(QLabel(str(h.get('end_fiat_value')) + '/FLO'), 2, 2) grid.addWidget(QLabel(_("Final balance")), 4, 0) grid.addWidget(QLabel(format_amount(h['end_balance'])), 4, 1) grid.addWidget(QLabel(str(h.get('end_fiat_balance'))), 4, 2) diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py index 9824bf10..bed2c0ec 100644 --- a/electrum/gui/qt/main_window.py +++ b/electrum/gui/qt/main_window.py @@ -415,8 +415,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): if self.wallet.is_watching_only(): msg = ' '.join([ _("This wallet is watching-only."), - _("This means you will not be able to spend Bitcoins with it."), - _("Make sure you own the seed phrase or the private keys, before you request Bitcoins to be sent to this wallet.") + _("This means you will not be able to spend FLO with it."), + _("Make sure you own the seed phrase or the private keys, before you request FLO to be sent to this wallet.") ]) self.show_warning(msg, title=_('Information')) @@ -584,11 +584,11 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): def show_about(self): QMessageBox.about(self, "Electrum", (_("Version")+" %s" % self.wallet.electrum_version + "\n\n" + - _("Electrum's focus is speed, with low resource usage and simplifying Bitcoin.") + " " + + _("Electrum's focus is speed, with low resource usage and simplifying FLO.") + " " + _("You do not need to perform regular backups, because your wallet can be " "recovered from a secret phrase that you can memorize or write on paper.") + " " + _("Startup times are instant because it operates in conjunction with high-performance " - "servers that handle the most complicated parts of the Bitcoin system.") + "\n\n" + + "servers that handle the most complicated parts of the FLO system.") + "\n\n" + _("Uses icons from the Icons8 icon pack (icons8.com)."))) def show_report_bug(self): @@ -820,7 +820,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.receive_address_e = ButtonsLineEdit() self.receive_address_e.addCopyButton(self.app) self.receive_address_e.setReadOnly(True) - msg = _('Bitcoin address where the payment should be received. Note that each payment request uses a different Bitcoin address.') + msg = _('FLO address where the payment should be received. Note that each payment request uses a different Bitcoin address.') self.receive_address_label = HelpLabel(_('Receiving address'), msg) self.receive_address_e.textChanged.connect(self.update_receive_qr) self.receive_address_e.setFocusPolicy(Qt.ClickFocus) @@ -850,8 +850,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): msg = ' '.join([ _('Expiration date of your request.'), _('This information is seen by the recipient if you send them a signed payment request.'), - _('Expired requests have to be deleted manually from your list, in order to free the corresponding Bitcoin addresses.'), - _('The bitcoin address never expires and will always be part of this electrum wallet.'), + _('Expired requests have to be deleted manually from your list, in order to free the corresponding FLO addresses.'), + _('The FLO address never expires and will always be part of this electrum wallet.'), ]) grid.addWidget(HelpLabel(_('Request expires'), msg), 3, 0) grid.addWidget(self.expires_combo, 3, 1) @@ -1077,7 +1077,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): self.amount_e = BTCAmountEdit(self.get_decimal_point) self.payto_e = PayToEdit(self) msg = _('Recipient of the funds.') + '\n\n'\ - + _('You may enter a Bitcoin address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a Bitcoin address)') + + _('You may enter a FLO address, a label from your list of contacts (a list of completions will be proposed), or an alias (email-like address that forwards to a Bitcoin address)') payto_label = HelpLabel(_('Pay to'), msg) grid.addWidget(payto_label, 1, 0) grid.addWidget(self.payto_e, 1, 1, 1, -1) @@ -1130,7 +1130,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): hbox.addStretch(1) grid.addLayout(hbox, 5, 4) - msg = _('Bitcoin transactions are in general not free. A transaction fee is paid by the sender of the funds.') + '\n\n'\ + msg = _('FLO transactions are in general not free. A transaction fee is paid by the sender of the funds.') + '\n\n'\ + _('The amount of fee can be decided freely by the sender. However, transactions with low fees take more time to be processed.') + '\n\n'\ + _('A suggested fee is automatically added to this field. You may override it. The suggested fee increases with the size of the transaction.') self.fee_e_label = HelpLabel(_('Fee'), msg) @@ -1521,7 +1521,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): for o in outputs: if o.address is None: - self.show_error(_('Bitcoin Address is None')) + self.show_error(_('FLO Address is None')) return if o.type == TYPE_ADDRESS and not bitcoin.is_address(o.address): self.show_error(_('Invalid Bitcoin Address')) diff --git a/electrum/gui/text.py b/electrum/gui/text.py index ed3faa0b..1de32440 100644 --- a/electrum/gui/text.py +++ b/electrum/gui/text.py @@ -337,7 +337,7 @@ class ElectrumGui: def do_send(self): if not is_address(self.str_recipient): - self.show_message(_('Invalid Bitcoin address')) + self.show_message(_('Invalid FLO address')) return try: amount = int(Decimal(self.str_amount) * COIN) diff --git a/electrum/plot.py b/electrum/plot.py index 3174d1b2..ba2d4f95 100644 --- a/electrum/plot.py +++ b/electrum/plot.py @@ -37,7 +37,7 @@ def plot_history(history): plt.subplots_adjust(bottom=0.2) plt.xticks( rotation=25 ) ax = plt.gca() - plt.ylabel('BTC') + plt.ylabel('FLO') plt.xlabel('Month') xfmt = md.DateFormatter('%Y-%m-%d') ax.xaxis.set_major_formatter(xfmt) diff --git a/electrum/plugin.py b/electrum/plugin.py index a69082a0..c042fcc4 100644 --- a/electrum/plugin.py +++ b/electrum/plugin.py @@ -449,9 +449,9 @@ class DeviceMgr(ThreadJob, PrintError): # or it is not pairable raise DeviceUnpairableError( _('Electrum cannot pair with your {}.\n\n' - 'Before you request bitcoins to be sent to addresses in this ' + 'Before you request FLO to be sent to addresses in this ' 'wallet, ensure you can pair with your device, or that you have ' - 'its seed (and passphrase, if any). Otherwise all bitcoins you ' + 'its seed (and passphrase, if any). Otherwise all FLO you ' 'receive will be unspendable.').format(plugin.device)) def unpaired_device_infos(self, handler, plugin, devices=None): diff --git a/electrum/simple_config.py b/electrum/simple_config.py index 4bfd56f5..406efcb6 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -195,7 +195,7 @@ class SimpleConfig(PrintError): base_unit = self.user_config.get('base_unit') if isinstance(base_unit, str): self._set_key_in_user_config('base_unit', None) - map_ = {'btc':8, 'mbtc':5, 'ubtc':2, 'bits':2, 'sat':0} + map_ = {'flo':8, 'mflo':5, 'uflo':2, 'bits':2, 'sat':0} decimal_point = map_.get(base_unit.lower()) self._set_key_in_user_config('decimal_point', decimal_point) diff --git a/electrum/util.py b/electrum/util.py index 5178a3b2..93ab49c3 100644 --- a/electrum/util.py +++ b/electrum/util.py @@ -51,11 +51,11 @@ def inv_dict(d): return {v: k for k, v in d.items()} -base_units = {'BTC':8, 'mBTC':5, 'bits':2, 'sat':0} +base_units = {'FLO':8, 'mFLO':5, 'bits':2, 'sat':0} base_units_inverse = inv_dict(base_units) -base_units_list = ['BTC', 'mBTC', 'bits', 'sat'] # list(dict) does not guarantee order +base_units_list = ['FLO', 'mFLO', 'bits', 'sat'] # list(dict) does not guarantee order -DECIMAL_POINT_DEFAULT = 5 # mBTC +DECIMAL_POINT_DEFAULT = 5 # mFLO class UnknownBaseUnit(Exception): pass @@ -140,7 +140,7 @@ class Satoshis(object): return 'Satoshis(%d)'%self.value def __str__(self): - return format_satoshis(self.value) + " BTC" + return format_satoshis(self.value) + " FLO" class Fiat(object): __slots__ = ('value', 'ccy') @@ -674,12 +674,12 @@ def parse_URI(uri, on_pr=None): if ':' not in uri: if not bitcoin.is_address(uri): - raise Exception("Not a bitcoin address") + raise Exception("Not a FLO address") return {'address': uri} u = urllib.parse.urlparse(uri) if u.scheme != 'bitcoin': - raise Exception("Not a bitcoin URI") + raise Exception("Not a FLO URI") address = u.path # python for android fails to parse query @@ -696,7 +696,7 @@ def parse_URI(uri, on_pr=None): out = {k: v[0] for k, v in pq.items()} if address: if not bitcoin.is_address(address): - raise Exception("Invalid bitcoin address:" + address) + raise Exception("Invalid FLO address:" + address) out['address'] = address if 'amount' in out: am = out['amount']