From 91012ededf3f1693e76bede085ec93cf8d5892b9 Mon Sep 17 00:00:00 2001
From: Jean-Baptiste Pasquier <contact@jbpasquier.eu>
Date: Thu, 22 Oct 2020 16:38:16 +0000
Subject: [PATCH] i18n: handling 404

---
 src/scripts/intl.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/scripts/intl.js b/src/scripts/intl.js
index d4c84e46..9b098e7e 100644
--- a/src/scripts/intl.js
+++ b/src/scripts/intl.js
@@ -119,6 +119,13 @@ class JsI18n {
               console.error("Language not found");
             }
           });
+        } else {
+            if (locale != "fr") {
+              console.warn(`Locale not found: ${locale}, fallback to french`);
+              this.setLocale("fr");
+            } else {
+              console.error("Language not found");
+            }
         }
       });
       this.locale = locale;
-- 
GitLab