From 27267e92f94ad13e0ffd7a97cc50ab816f6d010a Mon Sep 17 00:00:00 2001 From: Nils Steinger <git@n-st.de> Date: Sat, 7 Nov 2020 21:26:04 +0100 Subject: [PATCH] Don't try to load non-existent English locale file --- AKPlan/templates/AKPlan/plan_akslot.html | 5 ++++- AKPlan/templates/AKPlan/plan_base.html | 5 ++++- AKPlan/templates/AKPlan/plan_wall.html | 5 ++++- AKScheduling/templates/admin/AKScheduling/scheduling.html | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/AKPlan/templates/AKPlan/plan_akslot.html b/AKPlan/templates/AKPlan/plan_akslot.html index e519491f..fe86ad27 100644 --- a/AKPlan/templates/AKPlan/plan_akslot.html +++ b/AKPlan/templates/AKPlan/plan_akslot.html @@ -7,7 +7,10 @@ <link href='{% static 'AKPlan/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/> {% with 'AKPlan/vendor/fullcalendar-scheduler/locales/'|add:LANGUAGE_CODE|add:'.js' as locale_file %} - <script src="{% static locale_file %}"></script> + {% if LANGUAGE_CODE != "en" %} + {# Locale 'en' is included in main.js and does not exist separately #} + <script src="{% static locale_file %}"></script> + {% endif %} {% endwith %} <script> diff --git a/AKPlan/templates/AKPlan/plan_base.html b/AKPlan/templates/AKPlan/plan_base.html index 50cb2c07..320e3f83 100644 --- a/AKPlan/templates/AKPlan/plan_base.html +++ b/AKPlan/templates/AKPlan/plan_base.html @@ -16,7 +16,10 @@ <link href='{% static 'AKPlan/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/> {% with 'AKPlan/vendor/fullcalendar-scheduler/locales/'|add:LANGUAGE_CODE|add:'.js' as locale_file %} - <script src="{% static locale_file %}"></script> + {% if LANGUAGE_CODE != "en" %} + {# Locale 'en' is included in main.js and does not exist separately #} + <script src="{% static locale_file %}"></script> + {% endif %} {% endwith %} {% block fullcalendar %}{% endblock %} diff --git a/AKPlan/templates/AKPlan/plan_wall.html b/AKPlan/templates/AKPlan/plan_wall.html index a04e1e91..c8249558 100644 --- a/AKPlan/templates/AKPlan/plan_wall.html +++ b/AKPlan/templates/AKPlan/plan_wall.html @@ -25,7 +25,10 @@ <link href='{% static 'AKPlan/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/> {% with 'AKPlan/vendor/fullcalendar-scheduler/locales/'|add:LANGUAGE_CODE|add:'.js' as locale_file %} - <script src="{% static locale_file %}"></script> + {% if LANGUAGE_CODE != "en" %} + {# Locale 'en' is included in main.js and does not exist separately #} + <script src="{% static locale_file %}"></script> + {% endif %} {% endwith %} <script> diff --git a/AKScheduling/templates/admin/AKScheduling/scheduling.html b/AKScheduling/templates/admin/AKScheduling/scheduling.html index 6d5eb985..79480ee6 100644 --- a/AKScheduling/templates/admin/AKScheduling/scheduling.html +++ b/AKScheduling/templates/admin/AKScheduling/scheduling.html @@ -17,7 +17,10 @@ <link href='{% static 'AKPlan/vendor/fullcalendar-scheduler/main.css' %}' rel='stylesheet'/> {% with 'AKPlan/vendor/fullcalendar-scheduler/locales/'|add:LANGUAGE_CODE|add:'.js' as locale_file %} - <script src="{% static locale_file %}"></script> + {% if LANGUAGE_CODE != "en" %} + {# Locale 'en' is included in main.js and does not exist separately #} + <script src="{% static locale_file %}"></script> + {% endif %} {% endwith %} <style> -- GitLab