From 0954b141698d5bd44b7fda9536ef0a0e8fb1a40c Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Thu, 14 Oct 2021 22:36:21 +0200 Subject: [PATCH] fix link for plotly --- web/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/app.py b/web/app.py index fdc1f46..1c9ef6d 100644 --- a/web/app.py +++ b/web/app.py @@ -53,7 +53,10 @@ def config_flask(title, base_path, debug: bool, host, port, reloader=False, # p try: lang = locale.getlocale()[0].split("_")[0] locale.setlocale(locale.LC_TIME, ".".join(locale.getlocale())) # make sure LC_TIME is set - locale_url = [f"https://cdn.plot.ly/plotly-locale-{lang}-latest.js"] + if lang != "en": + locale_url = [f"https://cdn.plot.ly/plotly-locale-{lang}-latest.js"] + else: + locale_url = None except (IndexError, locale.Error): locale_url = None logger.warning("Can't get language")