mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Merge branch 'fix-moment.js-language-code' into 'master'
[FIX] Moment.JS Localisation See merge request allianceauth/allianceauth!1675
This commit is contained in:
commit
a93e510895
@ -1,7 +1,19 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
|
||||||
<!-- Start Moment.js from cdnjs -->
|
<!-- Start Moment.js from cdnjs -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js" integrity="sha512-+H4iLjY3JsKiF2V6N366in5IQHj2uEsGV7Pp/GRcm0fn76aPAk5V8xB6n8fQhhSonTqTXs/klFz4D0GIn6Br9g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/moment.min.js" integrity="sha512-+H4iLjY3JsKiF2V6N366in5IQHj2uEsGV7Pp/GRcm0fn76aPAk5V8xB6n8fQhhSonTqTXs/klFz4D0GIn6Br9g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||||
|
|
||||||
{% if locale and LANGUAGE_CODE != 'en' %}
|
{% if locale and LANGUAGE_CODE != 'en' %}
|
||||||
<!-- Moment.JS Not EN-en -->
|
<!-- Moment.JS Not EN-en -->
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/locale/{{ LANGUAGE_CODE }}.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
{% get_current_language as LANGUAGE_CODE %}
|
||||||
|
{% get_language_info for LANGUAGE_CODE as lang %}
|
||||||
|
|
||||||
|
{% if lang.code == 'zh-hans' %}
|
||||||
|
<!-- Moment.JS Localisation ({{ lang.code }}) -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/locale/zh-cn.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||||
|
{% else %}
|
||||||
|
<!-- Moment.JS Localisation ({{ lang.code }}) -->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.4/locale/{{ lang.code }}.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- End Moment JS from cdnjs -->
|
<!-- End Moment JS from cdnjs -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user