mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ignore weird failure when building website translation on Travis on macOS
This commit is contained in:
parent
0f3b2e2329
commit
3139dff9eb
@ -11,7 +11,7 @@ from collections import defaultdict
|
|||||||
from locale import normalize as normalize_locale
|
from locale import normalize as normalize_locale
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from setup import Command, __appname__, __version__, require_git_master, build_cache_dir, edit_file, dump_json, ispy3
|
from setup import Command, __appname__, __version__, require_git_master, build_cache_dir, edit_file, dump_json, ispy3, isosx
|
||||||
from setup.parallel_build import parallel_check_output
|
from setup.parallel_build import parallel_check_output
|
||||||
from polyglot.builtins import codepoint_to_chr, iteritems, range
|
from polyglot.builtins import codepoint_to_chr, iteritems, range
|
||||||
is_ci = os.environ.get('CI', '').lower() == 'true'
|
is_ci = os.environ.get('CI', '').lower() == 'true'
|
||||||
@ -508,8 +508,14 @@ class Translations(POT): # {{{
|
|||||||
if l == 'en':
|
if l == 'en':
|
||||||
t = get_language
|
t = get_language
|
||||||
else:
|
else:
|
||||||
t = getattr(get_iso639_translator(l), 'gettext' if ispy3 else 'ugettext')
|
try:
|
||||||
t = partial(get_iso_language, t)
|
t = getattr(get_iso639_translator(l), 'gettext' if ispy3 else 'ugettext')
|
||||||
|
t = partial(get_iso_language, t)
|
||||||
|
except IndexError:
|
||||||
|
if is_ci and isosx:
|
||||||
|
t = get_language
|
||||||
|
else:
|
||||||
|
raise
|
||||||
lang_names[l] = {x: t(x) for x in dl}
|
lang_names[l] = {x: t(x) for x in dl}
|
||||||
zi = ZipInfo('lang-names.json')
|
zi = ZipInfo('lang-names.json')
|
||||||
zi.compress_type = ZIP_STORED
|
zi.compress_type = ZIP_STORED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user