From 5fcb092151b2224407cd15741d68c39023d99fa3 Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Tue, 19 Oct 2021 11:50:42 +0200 Subject: [PATCH 1/2] use SITE_NAME constant as page title --- allianceauth/authentication/templates/public/base.html | 2 +- allianceauth/authentication/templates/public/login.html | 6 +++++- .../authentication/templates/public/middle_box.html | 2 +- allianceauth/authentication/templates/public/register.html | 6 +++++- allianceauth/templates/allianceauth/base.html | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/allianceauth/authentication/templates/public/base.html b/allianceauth/authentication/templates/public/base.html index 798c270f..9ca3fc9c 100644 --- a/allianceauth/authentication/templates/public/base.html +++ b/allianceauth/authentication/templates/public/base.html @@ -12,7 +12,7 @@ {% include 'allianceauth/icons.html' %} - {% block title %}{{ SITE_NAME }}{% endblock %} + {% block title %}{% block page_title %}{% endblock page_title %} - {{ SITE_NAME }}{% endblock title %} {% include 'bundles/bootstrap-css.html' %} {% include 'bundles/fontawesome.html' %} diff --git a/allianceauth/authentication/templates/public/login.html b/allianceauth/authentication/templates/public/login.html index 9a7921e7..5460b330 100644 --- a/allianceauth/authentication/templates/public/login.html +++ b/allianceauth/authentication/templates/public/login.html @@ -1,6 +1,10 @@ {% extends 'public/middle_box.html' %} + +{% load i18n %} {% load static %} -{% block page_title %}Login{% endblock %} + +{% block page_title %}{% translate "Login" %}{% endblock %} + {% block middle_box_content %} diff --git a/allianceauth/authentication/templates/public/middle_box.html b/allianceauth/authentication/templates/public/middle_box.html index 005e86bf..862eb747 100644 --- a/allianceauth/authentication/templates/public/middle_box.html +++ b/allianceauth/authentication/templates/public/middle_box.html @@ -1,6 +1,6 @@ {% extends 'public/base.html' %} {% load static %} -{% block title %}Login{% endblock %} + {% block content %}
{% if messages %} diff --git a/allianceauth/authentication/templates/public/register.html b/allianceauth/authentication/templates/public/register.html index 05bc685b..99572f3f 100644 --- a/allianceauth/authentication/templates/public/register.html +++ b/allianceauth/authentication/templates/public/register.html @@ -1,13 +1,17 @@ {% extends 'public/base.html' %} + {% load static %} {% load bootstrap %} {% load i18n %} -{% block page_title %}Registration{% endblock %} + +{% block page_title %}{% translate "Registration" %}{% endblock %} + {% block extra_include %} {% include 'bundles/bootstrap-css.html' %} {% include 'bundles/fontawesome.html' %} {% include 'bundles/bootstrap-js.html' %} {% endblock %} + {% block content %}
diff --git a/allianceauth/templates/allianceauth/base.html b/allianceauth/templates/allianceauth/base.html index 9d1798c9..277a0c26 100644 --- a/allianceauth/templates/allianceauth/base.html +++ b/allianceauth/templates/allianceauth/base.html @@ -12,7 +12,7 @@ {% include 'allianceauth/icons.html' %} - {% block title %}{% block page_title %}{% endblock page_title %} - Alliance Auth{% endblock title %} + {% block title %}{% block page_title %}{% endblock page_title %} - {{ SITE_NAME }}{% endblock title %} {% include 'bundles/bootstrap-css.html' %} {% include 'bundles/fontawesome.html' %} From cdcf65cb5268dc27d2d116d1a08262b4d4734bec Mon Sep 17 00:00:00 2001 From: Peter Pfeufer Date: Tue, 19 Oct 2021 12:05:45 +0200 Subject: [PATCH 2/2] fixed old Django 2 translation template tags --- .../templates/authentication/dashboard.html | 20 ++--- .../templates/public/register.html | 2 +- .../templates/registration/activate.html | 2 +- .../registration/password_reset_email.html | 6 +- .../registration/registration_form.html | 2 +- .../corputils/templates/corputils/base.html | 10 +-- .../templates/corputils/corpstats.html | 32 +++---- .../corputils/templates/corputils/search.html | 16 ++-- .../characternotexisting.html | 8 +- .../fatlinkformatter.html | 8 +- .../fleetactivitytracking/fatlinkmodify.html | 18 ++-- .../fatlinkpersonalmonthlystatisticsview.html | 20 ++--- .../fatlinkpersonalstatisticsview.html | 10 +-- .../fatlinkstatisticscorpview.html | 14 ++-- .../fatlinkstatisticsview.html | 16 ++-- .../fleetactivitytracking/fatlinkview.html | 40 ++++----- .../templates/groupmanagement/audit.html | 26 +++--- .../groupmanagement/groupmembers.html | 20 ++--- .../groupmanagement/groupmembership.html | 26 +++--- .../templates/groupmanagement/groups.html | 16 ++-- .../templates/groupmanagement/index.html | 34 ++++---- .../templates/groupmanagement/menu.html | 8 +- .../templates/hrapplications/corpchoice.html | 8 +- .../templates/hrapplications/create.html | 6 +- .../templates/hrapplications/management.html | 80 +++++++++--------- .../templates/hrapplications/searchview.html | 28 +++---- .../templates/hrapplications/view.html | 46 +++++----- .../templates/notifications/list.html | 28 +++---- .../templates/notifications/view.html | 4 +- .../optimer/templates/optimer/add.html | 6 +- .../templates/optimer/fleetoptable.html | 18 ++-- .../optimer/templates/optimer/management.html | 16 ++-- .../optimer/templates/optimer/update.html | 8 +- .../templates/permissions_tool/audit.html | 12 +-- .../templates/permissions_tool/overview.html | 22 ++--- .../discord/discord_service_ctrl.html | 8 +- .../services/openfire/broadcast.html | 8 +- .../services/teamspeak3/teamspeakjoin.html | 8 +- .../services/templates/public/menuitem.html | 2 +- .../services/fleetformattertool.html | 6 +- .../services/service_credentials.html | 2 +- .../templates/services/service_password.html | 2 +- .../services/templates/services/services.html | 12 +-- allianceauth/srp/templates/srp/add.html | 8 +- allianceauth/srp/templates/srp/data.html | 44 +++++----- .../srp/templates/srp/management.html | 42 +++++----- allianceauth/srp/templates/srp/request.html | 6 +- allianceauth/srp/templates/srp/update.html | 8 +- .../allianceauth/admin-status/overview.html | 22 ++--- .../templates/allianceauth/night-toggle.html | 2 +- .../templates/allianceauth/side-menu.html | 4 +- .../timerboard/timer_confirm_delete.html | 2 +- .../timerboard/timer_create_form.html | 6 +- .../timerboard/timer_update_form.html | 6 +- .../timerboard/templates/timerboard/view.html | 84 +++++++++---------- 55 files changed, 459 insertions(+), 459 deletions(-) diff --git a/allianceauth/authentication/templates/authentication/dashboard.html b/allianceauth/authentication/templates/authentication/dashboard.html index 49dfa762..7deb27f4 100644 --- a/allianceauth/authentication/templates/authentication/dashboard.html +++ b/allianceauth/authentication/templates/authentication/dashboard.html @@ -2,10 +2,10 @@ {% load static %} {% load i18n %} -{% block page_title %}{% trans "Dashboard" %}{% endblock %} +{% block page_title %}{% translate "Dashboard" %}{% endblock %} {% block content %} -

{% trans "Dashboard" %}

+

{% translate "Dashboard" %}

{% if user.is_staff %} {% include 'allianceauth/admin-status/include.html' %} {% endif %} @@ -78,18 +78,18 @@ {% endwith %} {% else %} {% endif %}
{% trans 'Add Character' %} + title="Add Character">{% translate 'Add Character' %}
{% trans "Change Main" %} + title="Change Main Character">{% translate "Change Main" %}
@@ -98,7 +98,7 @@
-

{% trans "Group Memberships" %}

+

{% translate "Group Memberships" %}

@@ -118,7 +118,7 @@

- {% trans 'Characters' %} + {% translate 'Characters' %}

@@ -126,9 +126,9 @@ - {% trans 'Name' %} - {% trans 'Corp' %} - {% trans 'Alliance' %} + {% translate 'Name' %} + {% translate 'Corp' %} + {% translate 'Alliance' %} diff --git a/allianceauth/authentication/templates/public/register.html b/allianceauth/authentication/templates/public/register.html index 99572f3f..685e37e3 100644 --- a/allianceauth/authentication/templates/public/register.html +++ b/allianceauth/authentication/templates/public/register.html @@ -19,7 +19,7 @@
{% csrf_token %} {{ form|bootstrap }} - +
diff --git a/allianceauth/authentication/templates/registration/activate.html b/allianceauth/authentication/templates/registration/activate.html index c5635df5..b5b9bfc1 100644 --- a/allianceauth/authentication/templates/registration/activate.html +++ b/allianceauth/authentication/templates/registration/activate.html @@ -1,5 +1,5 @@ {% extends 'public/middle_box.html' %} {% load i18n %} {% block middle_box_content %} -
{% trans 'Invalid or expired activation link.' %}
+
{% translate 'Invalid or expired activation link.' %}
{% endblock %} diff --git a/allianceauth/authentication/templates/registration/password_reset_email.html b/allianceauth/authentication/templates/registration/password_reset_email.html index 6d66e74f..79d19b0e 100644 --- a/allianceauth/authentication/templates/registration/password_reset_email.html +++ b/allianceauth/authentication/templates/registration/password_reset_email.html @@ -2,13 +2,13 @@ {% blocktrans trimmed %}You're receiving this email because you requested a password reset for your user account.{% endblocktrans %} - {% trans "Please go to the following page and choose a new password:" %} + {% translate "Please go to the following page and choose a new password:" %} {% block reset_link %} {{domain}}{% url 'password_reset_confirm' uidb64=uid token=token %} {% endblock %} - {% trans "Your username, in case you've forgotten:" %} {{ user.get_username }} + {% translate "Your username, in case you've forgotten:" %} {{ user.get_username }} - {% trans "Thanks for using our site!" %} + {% translate "Thanks for using our site!" %} {% blocktrans %}Your IT Team{% endblocktrans %} diff --git a/allianceauth/authentication/templates/registration/registration_form.html b/allianceauth/authentication/templates/registration/registration_form.html index 12dbe6d2..4ff43e41 100644 --- a/allianceauth/authentication/templates/registration/registration_form.html +++ b/allianceauth/authentication/templates/registration/registration_form.html @@ -8,7 +8,7 @@ {% csrf_token %} {{ form|bootstrap }}
- +
{% endblock %} diff --git a/allianceauth/corputils/templates/corputils/base.html b/allianceauth/corputils/templates/corputils/base.html index d23bd86e..17300d94 100644 --- a/allianceauth/corputils/templates/corputils/base.html +++ b/allianceauth/corputils/templates/corputils/base.html @@ -1,15 +1,15 @@ {% extends 'allianceauth/base.html' %} {% load i18n %} -{% block page_title %}{% trans "Corporation Member Data" %}{% endblock %} +{% block page_title %}{% translate "Corporation Member Data" %}{% endblock %} {% block content %}
-

{% trans "Corporation Member Data" %}

+

{% translate "Corporation Member Data" %}