File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1165,8 +1165,18 @@ def kicost_gui(files=None):
1165
1165
'''
1166
1166
app = wx .App (redirect = False )
1167
1167
loc = wx .Locale (wx .LANGUAGE_DEFAULT )
1168
+ locale_retry = False
1168
1169
if not loc .IsOk ():
1169
- logger .warning (W_LOCFAIL + "Failed to set the locale" )
1170
+ logger .warning (W_LOCFAIL + "Failed to set the default locale" )
1171
+ locale_retry = True
1172
+ elif not loc .GetLocale () and not loc .GetName ():
1173
+ logger .warning (W_LOCFAIL + "Unsupported locale" )
1174
+ locale_retry = True
1175
+ if locale_retry :
1176
+ loc = wx .Locale (wx .LANGUAGE_ENGLISH_US )
1177
+ logger .warning (W_LOCFAIL + "Trying with US english locale" )
1178
+ if not loc .IsOk ():
1179
+ logger .warning (W_LOCFAIL + "Failed to set the en_US locale" )
1170
1180
else :
1171
1181
logger .debug ('wxWidgets locale {} ({}) system: {}' .format (loc .GetLocale (), loc .GetName (), locale .getlocale ()))
1172
1182
frame = formKiCost (None )
Original file line number Diff line number Diff line change 1
1
__version__ = '1.1.5'
2
- __build__ = 'afec1c0 -2021-05-24'
2
+ __build__ = '838de14 -2021-05-24'
You can’t perform that action at this time.
0 commit comments