From ed23152a75ab2847e9fabef15ea24b87302ce590 Mon Sep 17 00:00:00 2001 From: Dirk Uys Date: Thu, 5 Sep 2024 15:19:20 +0200 Subject: [PATCH] Redirect all language codes to /en --- lernanta/apps/l10n/urlresolvers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lernanta/apps/l10n/urlresolvers.py b/lernanta/apps/l10n/urlresolvers.py index bbbb37fe..dec55c35 100644 --- a/lernanta/apps/l10n/urlresolvers.py +++ b/lernanta/apps/l10n/urlresolvers.py @@ -63,11 +63,13 @@ def split_path(self, path_): lang = first.lower() if lang in l10n.locales.LANGUAGE_URL_MAP: - return l10n.locales.LANGUAGE_URL_MAP[lang], rest + #return l10n.locales.LANGUAGE_URL_MAP[lang], rest + return 'en', rest else: supported = find_supported(first) if len(supported): - return supported[0], rest + #return supported[0], rest + return 'en', rest else: return '', path