diff --git a/electrum/gui/kivy/uix/dialogs/lightning_channels.py b/electrum/gui/kivy/uix/dialogs/lightning_channels.py index e36cd7b6e..4fcbf120f 100644 --- a/electrum/gui/kivy/uix/dialogs/lightning_channels.py +++ b/electrum/gui/kivy/uix/dialogs/lightning_channels.py @@ -472,11 +472,7 @@ class ChannelDetailsPopup(Popup, Logger): closed = chan.get_closing_height() if closed: self.closing_txid, closing_height, closing_timestamp = closed - msg = ' '.join([ - _("Trampoline routing is enabled, but this channel is with a non-trampoline node."), - _("This channel may still be used for receiving, but it is frozen for sending."), - _("If you want to keep using this channel, you need to disable trampoline routing in your preferences."), - ]) + msg = messages.MSG_NON_TRAMPOLINE_CHANNEL_FROZEN_WITHOUT_GOSSIP self.warning = '' if self.app.wallet.lnworker.channel_db or self.app.wallet.lnworker.is_trampoline_peer(chan.node_id) else _('Warning') + ': ' + msg self.update_action_dropdown() diff --git a/electrum/gui/messages.py b/electrum/gui/messages.py index 01e43552c..eb1d58098 100644 --- a/electrum/gui/messages.py +++ b/electrum/gui/messages.py @@ -1,4 +1,5 @@ # note: qt and kivy use different i18n methods +# FIXME all these messages *cannot* be localized currently! def to_rtf(msg): return '\n'.join(['

' + x + '

' for x in msg.split('\n\n')]) @@ -48,3 +49,7 @@ Are you sure? MSG_CAPITAL_GAINS = """ This summary covers only on-chain transactions (no lightning!). Capital gains are computed by attaching an acquisition price to each UTXO in the wallet, and uses the order of blockchain events (not FIFO). """ + +MSG_NON_TRAMPOLINE_CHANNEL_FROZEN_WITHOUT_GOSSIP = """Trampoline routing is enabled, but this channel is with a non-trampoline node. +This channel may still be used for receiving, but it is frozen for sending. +If you want to keep using this channel, you need to disable trampoline routing in your preferences.""" diff --git a/electrum/gui/qt/channels_list.py b/electrum/gui/qt/channels_list.py index 2d14b73fc..12c9f7f9a 100644 --- a/electrum/gui/qt/channels_list.py +++ b/electrum/gui/qt/channels_list.py @@ -193,11 +193,7 @@ class ChannelsList(MyTreeView): if self.lnworker.channel_db or self.lnworker.is_trampoline_peer(chan.node_id): chan.set_frozen_for_sending(b) else: - msg = ' '.join([ - _("Trampoline routing is enabled, but this channel is with a non-trampoline node."), - _("This channel may still be used for receiving, but it is frozen for sending."), - _("If you want to keep using this channel, you need to disable trampoline routing in your preferences."), - ]) + msg = messages.MSG_NON_TRAMPOLINE_CHANNEL_FROZEN_WITHOUT_GOSSIP self.main_window.show_warning(msg, title=_('Channel is frozen for sending')) def create_menu(self, position): @@ -237,7 +233,7 @@ class ChannelsList(MyTreeView): channel_id.hex(), title=_("Long Channel ID"))) if not chan.is_closed(): if not chan.is_frozen_for_sending(): - menu.addAction(_("Freeze (for sending)"), lambda: self.freeze_channel_for_sending(chan, True)) + menu.addAction(_("Freeze (for sending)"), lambda: self.freeze_channel_for_sending(chan, True)) # else: menu.addAction(_("Unfreeze (for sending)"), lambda: self.freeze_channel_for_sending(chan, False)) if not chan.is_frozen_for_receiving():