aboutsummaryrefslogtreecommitdiffhomepage
path: root/custom_libs/subzero
diff options
context:
space:
mode:
Diffstat (limited to 'custom_libs/subzero')
-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,})?$")