How to use the gooey.gui.lang.i18n._ function in Gooey

To help you get started, we’ve selected a few Gooey examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chriskiehl / Gooey / gooey / gui / windows / footer.py View on Github external
def _init_components(self):
    self.cancel_button      = self.button(i18n._('cancel'),  wx.ID_CANCEL,  event_id=int(events.WINDOW_CANCEL))
    self.stop_button        = self.button(i18n._('stop'),    wx.ID_OK,      event_id=int(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.progress_bar  = wx.Gauge(self, range=100)

    self.buttons = [self.cancel_button, self.start_button,
                    self.stop_button, self.close_button,
                    self.restart_button, self.edit_button]
github chriskiehl / Gooey / gooey / gui / components / widgets / checkbox.py View on Github external
if self._options.get('show_label', True):
            layout.Add(self.label, 0, wx.EXPAND)
        else:
            layout.AddStretchSpacer(1)

        layout.AddSpacer(2)
        if self.help_text and self._options.get('show_help', True):
            layout.Add(self.help_text, 1, wx.EXPAND)
            layout.AddSpacer(2)
        else:
            layout.AddStretchSpacer(1)

        layout.AddSpacer(2)

        block_label = self._options.get('checkbox_label', _('checkbox_label'))
        hsizer = wx.BoxSizer(wx.HORIZONTAL)
        hsizer.Add(self.widget, 0)
        hsizer.Add(wx.StaticText(self, label=block_label), 1)
        layout.Add(hsizer, 1, wx.EXPAND)
        layout.AddSpacer(2)

        return layout
github chriskiehl / Gooey / gooey / gui / model.py View on Github external
self.stop_button_disabled = self.build_spec['disable_stop_button']

    self.argument_groups = self.wrap(self.build_spec.get('widgets', {}))
    self.active_group = next(iter(self.argument_groups))

    self.num_required_cols = self.build_spec['num_required_cols']
    self.num_optional_cols = self.build_spec['num_optional_cols']

    self.text_states = {
      States.CONFIGURING: {
        'title': _("settings_title"),
        'subtitle': self.build_spec['program_description'] or ''
      },
      States.RUNNNING: {
        'title': _("running_title"),
        'subtitle': _('running_msg')
      },
      States.SUCCESS: {
        'title': _('finished_title'),
        'subtitle': _('finished_msg')
      },
      States.ERROR: {
        'title': _('finished_title'),
        'subtitle': _('finished_error')
      }
github chriskiehl / Gooey / gooey / gui / windows / footer.py View on Github external
def _init_components(self):
    self.cancel_button      = self.button(i18n._('cancel'),  wx.ID_CANCEL,  event_id=int(events.WINDOW_CANCEL))
    self.stop_button        = self.button(i18n._('stop'),    wx.ID_OK,      event_id=int(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.progress_bar  = wx.Gauge(self, range=100)

    self.buttons = [self.cancel_button, self.start_button,
                    self.stop_button, self.close_button,
                    self.restart_button, self.edit_button]
github chriskiehl / Gooey / gooey / gui / containers / application.py View on Github external
def showForceStopped(self):
        self.showComplete()
        if self.buildSpec.get('force_stop_is_error', True):
            self.showError()
        else:
            self.showSuccess()
        self.header.setSubtitle(_('finished_forced_quit'))
github chriskiehl / Gooey / gooey / gui / components / widgets / radio_group.py View on Github external
def arrange(self, *args, **kwargs):
        title = getin(self.widgetInfo, ['options', 'title'], _('choose_one'))
        if getin(self.widgetInfo, ['options', 'show_border'], False):
            boxDetails = wx.StaticBox(self, -1, title)
            boxSizer = wx.StaticBoxSizer(boxDetails, wx.VERTICAL)
        else:
            boxSizer = wx.BoxSizer(wx.VERTICAL)
            boxSizer.AddSpacer(10)
            boxSizer.Add(wx_util.h1(self, title), 0)

        for btn, widget in zip(self.radioButtons, self.widgets):
            sizer = wx.BoxSizer(wx.HORIZONTAL)
            sizer.Add(btn,0, wx.RIGHT, 4)
            sizer.Add(widget, 1, wx.EXPAND)
            boxSizer.Add(sizer, 1, wx.ALL | wx.EXPAND, 5)
        self.SetSizer(boxSizer)
github lrq3000 / pyFileFixity / pyFileFixity / lib / gooey / gui / windows / base_window.py View on Github external
def _init_components(self):
    # init gui
    _desc = self.build_spec['program_description']
    self.head_panel = header.FrameHeader(
        heading=i18n._("settings_title"),
        subheading=_desc or '',
        parent=self)

    self.runtime_display = RuntimeDisplay(self, self.build_spec)
    self.foot_panel = footer.Footer(self)
    self.panels = [self.head_panel, self.config_panel, self.foot_panel]
github chriskiehl / Gooey / gooey / gui / windows / footer.py View on Github external
def _init_components(self):
    self.cancel_button      = self.button(i18n._('cancel'),  wx.ID_CANCEL,  event_id=int(events.WINDOW_CANCEL))
    self.stop_button        = self.button(i18n._('stop'),    wx.ID_OK,      event_id=int(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.progress_bar  = wx.Gauge(self, range=100)

    self.buttons = [self.cancel_button, self.start_button,
                    self.stop_button, self.close_button,
                    self.restart_button, self.edit_button]