From 8cec44a35d8f38284f2ea52f2f338a7154d86afb Mon Sep 17 00:00:00 2001 From: Anshul Zilpe Date: Mon, 8 Dec 2025 23:09:21 +0530 Subject: Add djade linter and format templates. --- docs/templates/base_docs.html | 8 ++-- docs/templates/docs/doc.html | 68 +++++++++++++++--------------- docs/templates/docs/genindex.html | 12 +++--- docs/templates/docs/py-modindex.html | 10 +++-- docs/templates/docs/search_description.xml | 6 +-- docs/templates/docs/search_results.html | 9 +++- 6 files changed, 61 insertions(+), 52 deletions(-) (limited to 'docs') diff --git a/docs/templates/base_docs.html b/docs/templates/base_docs.html index 82d6a3a7..d4484cb2 100644 --- a/docs/templates/base_docs.html +++ b/docs/templates/base_docs.html @@ -3,14 +3,14 @@ {% block html_language_code %}{{ lang|default:"en" }}{% endblock %} -{% block title %}{% trans 'Django Documentation' %}{% endblock %} +{% block title %}{% translate 'Django Documentation' %}{% endblock %} {% block header-classes %} container--flex container--flex--wrap--mobile -{% endblock %} +{% endblock header-classes %} {% block header %} -

{% trans 'Documentation' %}

-{% endblock %} +

{% translate 'Documentation' %}

+{% endblock header %} {% block layout_class %}sidebar-right{% endblock %} diff --git a/docs/templates/docs/doc.html b/docs/templates/docs/doc.html index 8bce6c2f..73655fd4 100644 --- a/docs/templates/docs/doc.html +++ b/docs/templates/docs/doc.html @@ -1,8 +1,9 @@ {% extends "base_docs.html" %} -{% load i18n fundraising_extras docs %} +{% load docs fundraising_extras i18n %} -{% block title %}{{ doc.title|striptags|safe }} | {% trans "Django documentation" %}{% endblock %} -{% block og_title %}{{ doc.title|striptags }} | {% trans "Django documentation" %}{% endblock %} +{% block title %}{{ doc.title|striptags|safe }} | {% translate "Django documentation" %}{% endblock %} + +{% block og_title %}{{ doc.title|striptags }} | {% translate "Django documentation" %}{% endblock %} {% block doc_url %}{% url 'document-index' lang=lang version=version host 'docs' %}{% endblock %} @@ -31,23 +32,23 @@ + title="{% translate "Django documentation" %}"> {% endblock link_rel_tags %} {% block before_header %} {% if release.is_dev %} {% if "internals" not in docurl %}{# The dev version is canonical for internals/. #}
- {% trans "This document is for Django's development version, which can be significantly different from previous releases. For older releases, use the version selector floating in the bottom right corner of this page." %} + {% translate "This document is for Django's development version, which can be significantly different from previous releases. For older releases, use the version selector floating in the bottom right corner of this page." %}
{% endif %} {% elif release.is_preview %}
- {% trans "This document is for a preview release of Django, which can be significantly different from previous releases. For older releases, use the version selector floating in the bottom right corner of this page." %} + {% translate "This document is for a preview release of Django, which can be significantly different from previous releases. For older releases, use the version selector floating in the bottom right corner of this page." %}
{% elif not release.is_supported %}
- {% trans "This document is for an insecure version of Django that is no longer supported. Please upgrade to a newer release!" %} + {% translate "This document is for an insecure version of Django that is no longer supported. Please upgrade to a newer release!" %}
{% endif %} {% endblock before_header %} @@ -57,13 +58,13 @@