mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont fail to start up if there are errors in the translation file
This commit is contained in:
parent
18c97430bb
commit
bfedab34b8
@ -240,9 +240,19 @@ def translator_for_lang(lang):
|
||||
pass # No lcdata
|
||||
|
||||
if buf is not None:
|
||||
try:
|
||||
t = GNUTranslations(buf)
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
t = None
|
||||
if iso639 is not None:
|
||||
try:
|
||||
iso639 = GNUTranslations(iso639)
|
||||
except Exception:
|
||||
iso639 = None
|
||||
else:
|
||||
if t is not None:
|
||||
t.add_fallback(iso639)
|
||||
|
||||
if t is None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user