summaryrefslogtreecommitdiffhomepage
path: root/custom_libs/subzero/language.py
diff options
context:
space:
mode:
authorJayZed <[email protected]>2024-09-29 21:05:46 -0400
committerJayZed <[email protected]>2024-09-29 21:05:46 -0400
commitc2a1e4d62c1bbb372127a78e4419a96d3c00e81c (patch)
treeaf19b97bbb71b514ef39928e55769fa85064e23a /custom_libs/subzero/language.py
parent4cc6806193127f9d6d3f2dab26969471d9bbf159 (diff)
parent0200bb96d98127ee32b6b66f8d6b9e21d4571a4d (diff)
downloadbazarr-1.4.5-beta.7.tar.gz
bazarr-1.4.5-beta.7.zip
Merge branch 'development' of https://github.com/morpheus65535/bazarr into developmentv1.4.5-beta.7
Diffstat (limited to 'custom_libs/subzero/language.py')
-rw-r--r--custom_libs/subzero/language.py12
1 files changed, 1 insertions, 11 deletions
diff --git a/custom_libs/subzero/language.py b/custom_libs/subzero/language.py
index 3d556c0e1..99b64211c 100644
--- a/custom_libs/subzero/language.py
+++ b/custom_libs/subzero/language.py
@@ -162,14 +162,4 @@ class Language(Language_):
return Language(*Language_.fromalpha3b(s).__getstate__())
-IETF_MATCH = ".+\.([^-.]+)(?:-[A-Za-z]+)?$"
-ENDSWITH_LANGUAGECODE_RE = re.compile("\.([^-.]{2,3})(?:-[A-Za-z]{2,})?$")
-
-
-def match_ietf_language(s, ietf=False):
- language_match = re.match(".+\.([^\.]+)$" if not ietf
- else IETF_MATCH, s)
- if language_match and len(language_match.groups()) == 1:
- language = language_match.groups()[0]
- return language
- return s
+ENDSWITH_LANGUAGECODE_RE = re.compile(r"\.([^-.]{2,3})(?:-[A-Za-z]{2,})?$")