aboutsummaryrefslogtreecommitdiffhomepage
path: root/custom_libs/subzero/language.py
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2024-10-02 01:15:25 +0000
committerGitHub <[email protected]>2024-10-02 01:15:25 +0000
commit5c56866d561e9f63d9e9527a14ac648dca4a5511 (patch)
treefb41e1223e751556a4c172b64070aaa6c1661693 /custom_libs/subzero/language.py
parentad80ac44537ead820808af481cd549104047b111 (diff)
parent7000d2ac2c7a52fd0c429c17f5e826e9e3633bfc (diff)
downloadbazarr-5c56866d561e9f63d9e9527a14ac648dca4a5511.tar.gz
bazarr-5c56866d561e9f63d9e9527a14ac648dca4a5511.zip
Merge development into master
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,})?$")