Browse Source

fix i18n for context menus

283
ThomasV 9 years ago
parent
commit
49fb099bdc
  1. 4
      gui/kivy/uix/context_menu.py
  2. 7
      gui/kivy/uix/screens.py

4
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)

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

Loading…
Cancel
Save