From df9284a467e557bef29f7067cf75e3d58f8f5cf0 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 14 Jun 2020 13:41:27 -0700 Subject: [PATCH] closes #452 - modals missing i18n options --- gooey/gui/components/modals.py | 2 ++ gooey/languages/english.json | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gooey/gui/components/modals.py b/gooey/gui/components/modals.py index 19d91fd..015346f 100644 --- a/gooey/gui/components/modals.py +++ b/gooey/gui/components/modals.py @@ -14,6 +14,8 @@ DialogConstants = namedtuple('DialogConstants', 'YES NO')(5103, 5104) def showDialog(title, content, style): dlg = wx.MessageDialog(None, content, title, style) + dlg.SetYesNoLabels(_('dialog_button_yes'), _('dialog_button_no')) + dlg.SetOKLabel(_('dialog_button_ok')) result = dlg.ShowModal() dlg.Destroy() return result diff --git a/gooey/languages/english.json b/gooey/languages/english.json index ac72abd..e5e2304 100644 --- a/gooey/languages/english.json +++ b/gooey/languages/english.json @@ -42,5 +42,8 @@ "sure_you_want_to_exit": "Are you sure you want to exit?", "sure_you_want_to_stop": "Are you sure you want to stop the task? \nInterruption can corrupt your data!", "uh_oh": "\nUh oh! Looks like there was a problem. \nCopy the text from the status window to let your developer know what went wrong.\n", - "validation_failed": "One or more fields failed validation." + "validation_failed": "One or more fields failed validation.", + "dialog_button_yes": "Yes", + "dialog_button_no": "No", + "dialog_button_ok": "OK" }