summaryrefslogtreecommitdiffhomepage
path: root/libs/subzero
diff options
context:
space:
mode:
authorVitiko <[email protected]>2021-06-06 09:57:29 -0400
committerGitHub <[email protected]>2021-06-06 09:57:29 -0400
commit4ebcd49546ed7772cb6f3a9c83079e5aea08e15a (patch)
tree4435f84f40e8c3a3b98618ab7beb92a8ccd97783 /libs/subzero
parent0ef9729f9d7804844c897630ca80f32f839380d8 (diff)
downloadbazarr-4ebcd49546ed7772cb6f3a9c83079e5aea08e15a.tar.gz
bazarr-4ebcd49546ed7772cb6f3a9c83079e5aea08e15a.zip
Added custom language class to make it easier to implement non-standard/regional languagesv0.9.6-beta.19
Diffstat (limited to 'libs/subzero')
-rw-r--r--libs/subzero/language.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/libs/subzero/language.py b/libs/subzero/language.py
index 43dc29754..199856704 100644
--- a/libs/subzero/language.py
+++ b/libs/subzero/language.py
@@ -32,10 +32,15 @@ repl_map = {
"tib": "bo",
}
+CUSTOM_LIST = ["chs", "sc", "zhs", "hans", "gb", u"简", u"双语",
+ "cht", "tc", "zht", "hant", "big5", u"繁", u"雙語",
+ "spl", "ea", "pob", "pb"]
+
ALPHA2_LIST = list(set(filter(lambda x: x, map(lambda x: x.alpha2, LANGUAGE_MATRIX)))) + list(repl_map.values())
ALPHA3b_LIST = list(set(filter(lambda x: x, map(lambda x: x.alpha3, LANGUAGE_MATRIX)))) + \
list(set(filter(lambda x: len(x) == 3, list(repl_map.keys()))))
FULL_LANGUAGE_LIST = ALPHA2_LIST + ALPHA3b_LIST
+FULL_LANGUAGE_LIST.extend(CUSTOM_LIST)
def language_from_stream(l):