mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-09 07:07:19 +02:00
fix: fallback to en_US when locale code is invalid
This commit is contained in:
@@ -297,10 +297,7 @@ def ensure_macos_locale() -> None:
|
||||
lang = cocoa_get_lang()
|
||||
if lang is not None:
|
||||
if not locale_is_valid(lang):
|
||||
if lang.startswith('en_'):
|
||||
lang = 'en_US'
|
||||
else:
|
||||
log_error(f'Could not set LANG Cocoa returns language as: {lang}')
|
||||
lang = 'en_US'
|
||||
os.environ['LANG'] = f'{lang}.UTF-8'
|
||||
set_LANG_in_default_env(os.environ['LANG'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user