electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 49fb099bdc98fbf411631697002561c0a73662e5
parent a388b59bc2c765b5cfe82476bd5d2f79d77b40d5
Author: ThomasV <thomasv@electrum.org>
Date:   Thu,  4 Feb 2016 18:17:02 +0100

fix i18n for context menus

Diffstat:
Mgui/kivy/uix/context_menu.py | 4+++-
Mgui/kivy/uix/screens.py | 7+++----
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/gui/kivy/uix/context_menu.py b/gui/kivy/uix/context_menu.py @@ -8,6 +8,8 @@ from kivy.lang import Builder from kivy.factory import Factory from kivy.clock import Clock +from electrum_gui.kivy.i18n import _ + Builder.load_string(''' <MenuItem@Button> background_color: .2, .9, 1, 1 @@ -40,7 +42,7 @@ class ContextMenu(Bubble): self.obj = obj for k, v in action_list: l = MenuItem() - l.text = k + l.text = _(k) def func(f=v): Clock.schedule_once(lambda dt: self.hide(), 0.1) Clock.schedule_once(lambda dt: f(obj), 0.15) diff --git a/gui/kivy/uix/screens.py b/gui/kivy/uix/screens.py @@ -96,7 +96,7 @@ class HistoryScreen(CScreen): def __init__(self, **kwargs): self.ra_dialog = None super(HistoryScreen, self).__init__(**kwargs) - self.menu_actions = [ (_('Label'), self.label_dialog), (_('Details'), self.app.tx_details_dialog)] + self.menu_actions = [ ('Label', self.label_dialog), ('Details', self.app.tx_details_dialog)] def label_dialog(self, obj): from dialogs.label_dialog import LabelDialog @@ -309,7 +309,6 @@ class ReceiveScreen(CScreen): amount = self.app.get_amount(amount) else: amount = 0 - print "saving", amount, message req = self.app.wallet.make_payment_request(addr, amount, message, None) self.app.wallet.add_payment_request(req, self.app.electrum_config) self.app.show_info(_('Request saved')) @@ -355,7 +354,7 @@ class InvoicesScreen(CScreen): kvname = 'invoices' def update(self): - self.menu_actions = [(_('Pay'), self.do_pay), (_('Delete'), self.do_delete)] + self.menu_actions = [('Pay', self.do_pay), ('Delete', self.do_delete)] invoices_list = self.screen.ids.invoices_container invoices_list.clear_widgets() @@ -395,7 +394,7 @@ class RequestsScreen(CScreen): def update(self): - self.menu_actions = [(_('Show'), self.do_show), (_('Delete'), self.do_delete)] + self.menu_actions = [('Show', self.do_show), ('Delete', self.do_delete)] requests_list = self.screen.ids.requests_container requests_list.clear_widgets() _list = self.app.wallet.get_sorted_requests(self.app.electrum_config)