Browse Source

use i18n in a less verbose way

pull/473/head
eladeyal 5 years ago
committed by Chris
parent
commit
99a1ea7822
2 changed files with 9 additions and 9 deletions
  1. 4
      gooey/gui/components/console.py
  2. 14
      gooey/gui/components/footer.py

4
gooey/gui/components/console.py

@ -2,7 +2,7 @@ import webbrowser
import wx
from gooey.gui.lang import i18n
from gooey.gui.lang.i18n import _
from .widgets.basictextconsole import BasicTextConsole
@ -15,7 +15,7 @@ class Console(wx.Panel):
wx.Panel.__init__(self, parent, **kwargs)
self.buildSpec = buildSpec
self.text = wx.StaticText(self, label=i18n._("status"))
self.text = wx.StaticText(self, label=_("status"))
if buildSpec["richtext_controls"]:
from .widgets.richtextconsole import RichTextConsole
self.textbox = RichTextConsole(self)

14
gooey/gui/components/footer.py

@ -2,7 +2,7 @@ import sys
import wx
from gooey.gui import events
from gooey.gui.lang import i18n
from gooey.gui.lang.i18n import _
from gooey.gui.pubsub import pub
@ -72,12 +72,12 @@ class Footer(wx.Panel):
def _init_components(self):
self.cancel_button = self.button(i18n._('cancel'), wx.ID_CANCEL, event_id=events.WINDOW_CANCEL)
self.stop_button = self.button(i18n._('stop'), wx.ID_OK, event_id=events.WINDOW_STOP)
self.start_button = self.button(i18n._('start'), wx.ID_OK, event_id=int(events.WINDOW_START))
self.close_button = self.button(i18n._("close"), wx.ID_OK, event_id=int(events.WINDOW_CLOSE))
self.restart_button = self.button(i18n._('restart'), wx.ID_OK, event_id=int(events.WINDOW_RESTART))
self.edit_button = self.button(i18n._('edit'), wx.ID_OK, event_id=int(events.WINDOW_EDIT))
self.cancel_button = self.button(_('cancel'), wx.ID_CANCEL, event_id=events.WINDOW_CANCEL)
self.stop_button = self.button(_('stop'), wx.ID_OK, event_id=events.WINDOW_STOP)
self.start_button = self.button(_('start'), wx.ID_OK, event_id=int(events.WINDOW_START))
self.close_button = self.button(_("close"), wx.ID_OK, event_id=int(events.WINDOW_CLOSE))
self.restart_button = self.button(_('restart'), wx.ID_OK, event_id=int(events.WINDOW_RESTART))
self.edit_button = self.button(_('edit'), wx.ID_OK, event_id=int(events.WINDOW_EDIT))
self.progress_bar = wx.Gauge(self, range=100)

Loading…
Cancel
Save