diff options
author | panni <[email protected]> | 2019-12-24 00:25:02 +0100 |
---|---|---|
committer | panni <[email protected]> | 2019-12-24 00:25:02 +0100 |
commit | 64fa210688628e21c4c5fbc3b127d25cbe283b4c (patch) | |
tree | ee2ab3a832a5bcbeaba198f9f826b5a29616a601 /libs/subzero | |
parent | 5dc8facae7dfe5b50d8f35c92750f4c07e5d6e79 (diff) | |
download | bazarr-64fa210688628e21c4c5fbc3b127d25cbe283b4c.tar.gz bazarr-64fa210688628e21c4c5fbc3b127d25cbe283b4c.zip |
core: update to subliminal_patch:head; core: try and fix #703
Diffstat (limited to 'libs/subzero')
-rw-r--r-- | libs/subzero/language.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/subzero/language.py b/libs/subzero/language.py index d212a02f4..38cfb8113 100644 --- a/libs/subzero/language.py +++ b/libs/subzero/language.py @@ -4,7 +4,7 @@ import types import re from babelfish.exceptions import LanguageError -from babelfish import Language as Language_, basestr +from babelfish import Language as Language_, basestr, LANGUAGE_MATRIX from six.moves import zip repl_map = { @@ -33,6 +33,12 @@ repl_map = { } +ALPHA2_LIST = list(set(filter(lambda x: x, map(lambda x: x.alpha2, LANGUAGE_MATRIX)) + repl_map.values())) +ALPHA3b_LIST = list(set(filter(lambda x: x, map(lambda x: x.alpha3, LANGUAGE_MATRIX)) + + filter(lambda x: len(x) == 3, repl_map.keys()))) +FULL_LANGUAGE_LIST = ALPHA2_LIST + ALPHA3b_LIST + + def language_from_stream(l): if not l: raise LanguageError() |