mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-03-06 15:24:49 +01:00
Do not fail on system where get_system_locale() is None (OS X)
This commit is contained in:
parent
7bb35f9ffd
commit
14fa4e5972
1 changed files with 1 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ def custom_dictionaries(reread=False):
|
|||
return _custom
|
||||
|
||||
default_en_locale = 'en-US'
|
||||
ul = parse_lang_code(get_system_locale())
|
||||
ul = parse_lang_code(get_system_locale() or 'en-US')
|
||||
if ul is not None and ul.langcode == 'eng' and ul.countrycode in 'GB BS BZ GH IE IN JM NZ TT'.split():
|
||||
default_en_locale = 'en-' + ul.countrycode
|
||||
default_preferred_locales = {'eng':default_en_locale, 'deu':'de-DE', 'spa':'es-ES', 'fra':'fr-FR'}
|
||||
|
|
|
|||
Loading…
Reference in a new issue