From d99f5858d83cc4daebb27996b9386c9fc664cef1 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Wed, 8 Jan 2025 23:04:29 +0100 Subject: [PATCH] [FIX] Moment.JS Localisation Load the right JS when our language code has 2 parts - fr_FR - it_IT - pl_PL And so on --- allianceauth/templates/bundles/moment-js.html | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/allianceauth/templates/bundles/moment-js.html b/allianceauth/templates/bundles/moment-js.html index a094b4be..802411b9 100644 --- a/allianceauth/templates/bundles/moment-js.html +++ b/allianceauth/templates/bundles/moment-js.html @@ -1,7 +1,19 @@ +{% load i18n %} + + {% if locale and LANGUAGE_CODE != 'en' %} - + {% get_current_language as LANGUAGE_CODE %} + {% get_language_info for LANGUAGE_CODE as lang %} + + {% if lang.code == 'zh-hans' %} + + + {% else %} + + + {% endif %} {% endif %}