1
0

gui messages: mv one more message to messages.py

This commit is contained in:
SomberNight
2021-04-19 18:51:57 +02:00
parent 0ab9687734
commit 4e0a20ae46
3 changed files with 8 additions and 11 deletions

View File

@@ -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()

View File

@@ -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(['<p>' + x + '</p>' 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."""

View File

@@ -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():