mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1315064 [locale 'C' prevents linux installation from completing](https://bugs.launchpad.net/calibre/+bug/1315064)
This commit is contained in:
parent
cfc4f6d718
commit
6ac0b0d715
@ -101,7 +101,10 @@ def custom_dictionaries(reread=False):
|
|||||||
return _custom
|
return _custom
|
||||||
|
|
||||||
default_en_locale = 'en-US'
|
default_en_locale = 'en-US'
|
||||||
ul = parse_lang_code(get_system_locale() or 'en-US')
|
try:
|
||||||
|
ul = parse_lang_code(get_system_locale() or 'en-US')
|
||||||
|
except ValueError:
|
||||||
|
ul = None
|
||||||
if ul is not None and ul.langcode == 'eng' and ul.countrycode in 'GB BS BZ GH IE IN JM NZ TT'.split():
|
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_en_locale = 'en-' + ul.countrycode
|
||||||
default_preferred_locales = {'eng':default_en_locale, 'deu':'de-DE', 'spa':'es-ES', 'fra':'fr-FR'}
|
default_preferred_locales = {'eng':default_en_locale, 'deu':'de-DE', 'spa':'es-ES', 'fra':'fr-FR'}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user