diff --git a/kicost/kicost_gui.py b/kicost/kicost_gui.py index a73da0cf..012d6d61 100644 --- a/kicost/kicost_gui.py +++ b/kicost/kicost_gui.py @@ -1165,8 +1165,18 @@ def kicost_gui(files=None): ''' app = wx.App(redirect=False) loc = wx.Locale(wx.LANGUAGE_DEFAULT) + locale_retry = False if not loc.IsOk(): - logger.warning(W_LOCFAIL+"Failed to set the locale") + logger.warning(W_LOCFAIL+"Failed to set the default locale") + locale_retry = True + elif not loc.GetLocale() and not loc.GetName(): + logger.warning(W_LOCFAIL+"Unsupported locale") + locale_retry = True + if locale_retry: + loc = wx.Locale(wx.LANGUAGE_ENGLISH_US) + logger.warning(W_LOCFAIL+"Trying with US english locale") + if not loc.IsOk(): + logger.warning(W_LOCFAIL+"Failed to set the en_US locale") else: logger.debug('wxWidgets locale {} ({}) system: {}'.format(loc.GetLocale(), loc.GetName(), locale.getlocale())) frame = formKiCost(None) diff --git a/kicost/version.py b/kicost/version.py index 68bb1265..14da88a3 100644 --- a/kicost/version.py +++ b/kicost/version.py @@ -1,2 +1,2 @@ __version__ = '1.1.5' -__build__ = 'afec1c0-2021-05-24' +__build__ = '838de14-2021-05-24'