diff --git a/gooey/gui/components/footer.py b/gooey/gui/components/footer.py index 6058b51..9351b2f 100644 --- a/gooey/gui/components/footer.py +++ b/gooey/gui/components/footer.py @@ -123,7 +123,7 @@ class Footer(wx.Panel): parent=self, id=event_id, size=(90, 24), - label=i18n._(label), + label=label, style=style) def dispatch_click(self, event): diff --git a/gooey/gui/components/widgets/core/chooser.py b/gooey/gui/components/widgets/core/chooser.py index b0a4e56..9448226 100644 --- a/gooey/gui/components/widgets/core/chooser.py +++ b/gooey/gui/components/widgets/core/chooser.py @@ -63,13 +63,13 @@ class Chooser(wx.Panel): class FileChooser(Chooser): """ Retrieve an existing file from the system """ def getDialog(self): - return wx.FileDialog(self, style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST) + return wx.FileDialog(self, _('open_file'), style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST) class MultiFileChooser(Chooser): """ Retrieve an multiple files from the system """ def getDialog(self): - return wx.FileDialog(self, "Open Files" ,style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST | wx.FD_MULTIPLE) + return wx.FileDialog(self, _('open_files'), style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST | wx.FD_MULTIPLE) def getResult(self, dialog): return os.pathsep.join(dialog.GetPaths()) diff --git a/gooey/gui/components/widgets/dialogs/calender_dialog.py b/gooey/gui/components/widgets/dialogs/calender_dialog.py index 4e70cef..c565833 100644 --- a/gooey/gui/components/widgets/dialogs/calender_dialog.py +++ b/gooey/gui/components/widgets/dialogs/calender_dialog.py @@ -15,12 +15,12 @@ class CalendarDlg(wx.Dialog): self.SetBackgroundColour('#ffffff') - self.ok_button = wx.Button(self, wx.ID_OK, label=_('Ok')) + self.ok_button = wx.Button(self, wx.ID_OK, label=_('ok')) self.datepicker = Classes.DatePickerCtrl(self, style=Constants.WX_DP_DROPDOWN) vertical_container = wx.BoxSizer(wx.VERTICAL) vertical_container.AddSpacer(10) - vertical_container.Add(wx_util.h1(self, label=_('Select a Date')), 0, wx.LEFT | wx.RIGHT, 15) + vertical_container.Add(wx_util.h1(self, label=_('select_date')), 0, wx.LEFT | wx.RIGHT, 15) vertical_container.AddSpacer(10) vertical_container.Add(self.datepicker, 0, wx.EXPAND | wx.LEFT | wx.RIGHT, 15) diff --git a/gooey/gui/lang/i18n.py b/gooey/gui/lang/i18n.py index 02f360a..3d6df19 100644 --- a/gooey/gui/lang/i18n.py +++ b/gooey/gui/lang/i18n.py @@ -28,7 +28,7 @@ def load(language_dir, filename, encoding): 'listed language directory'.format(filename.title(), language_dir)) def translate(key): - return _DICTIONARY.get(key, key) + return _DICTIONARY.get(key, '(Translate me!) {}'.format(key)) def _(key): return translate(key) diff --git a/gooey/languages/english.json b/gooey/languages/english.json index 114a131..c49ba4f 100644 --- a/gooey/languages/english.json +++ b/gooey/languages/english.json @@ -16,12 +16,15 @@ "finished_forced_quit": "Terminated by user", "finished_msg": "All done! You may now safely close the program.", "finished_title": "Finished", + "ok": "Ok", "open_file": "Open File", + "open_files": "Open Files", "optional_args_msg": "Optional Arguments", "required_args_msg": "Required Arguments", "restart": "Restart", "running_msg": "Please wait while the application performs its tasks. \nThis may take a few moments", "running_title": "Running", + "select_date": "Select a Date", "select_option": "Select Option", "settings_title": "Settings", "simple_config": "Enter Command Line Arguments",