[ADD] Locale mapping for DataTables and Moment.JS

This commit is contained in:
Peter Pfeufer
2025-01-20 04:35:10 +01:00
parent 1b6cf98885
commit 856e939c21
39 changed files with 4459 additions and 22 deletions

View File

@@ -1,5 +1,6 @@
{% extends "allianceauth/base-bs5.html" %}
{% load aa_i18n %}
{% load i18n %}
{% block page_title %}
@@ -82,6 +83,8 @@
{% include "bundles/chart-js.html" %}
{% include "bundles/moment-js.html" with locale=True %}
{% get_datatables_language_static LANGUAGE_CODE as DT_LANG_PATH %}
<script>
$(document).ready(function () {
const MUMBLESTATS_DATETIME_FORMAT = 'YYYY-MM-DD, HH:mm';
@@ -89,6 +92,7 @@
'use strict';
$("#table-mumble-connection-history").DataTable({
language: {url: '{{ DT_LANG_PATH }}'},
ajax: {
url: '{% url "mumble:connection_history_data" %}',
dataSrc: 'connection_history_data',
@@ -132,6 +136,7 @@
});
$("#table-mumble-connection-stats").DataTable({
language: {url: '{{ DT_LANG_PATH }}'},
ajax: {
url: '{% url "mumble:release_counts_data" %}',
dataSrc: 'release_counts_data',