mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-29 00:40:00 +02:00
Added translation
Requires {% load i18n %} within this scope as per docs: https://docs.djangoproject.com/en/4.1/topics/i18n/translation/#internationalization-in-template-code
This commit is contained in:
parent
94ab136058
commit
3a6acd9c29
1 changed files with 10 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
{% extends "admin/base.html" %}
|
{% extends "admin/base.html" %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
{% block title %}{% if subtitle %}{{ subtitle }} | {% endif %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}
|
{% block title %}{% if subtitle %}{{ subtitle }} | {% endif %}{{ title }} | {{ site_title|default:_('Django site admin') }}{% endblock %}
|
||||||
|
|
||||||
|
@ -13,20 +14,25 @@
|
||||||
{% include "admin/color_theme_toggle.html" %}
|
{% include "admin/color_theme_toggle.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
{% comment %}
|
||||||
|
This was copied from the 'userlinks' template, with a few minor changes.
|
||||||
|
You can find that here:
|
||||||
|
https://github.com/django/django/blob/d25f3892114466d689fd6936f79f3bd9a9acc30e/django/contrib/admin/templates/admin/base.html#L59
|
||||||
|
{% endcomment %}
|
||||||
{% block userlinks %}
|
{% block userlinks %}
|
||||||
{% if site_url %}
|
{% if site_url %}
|
||||||
<a href="{{ site_url }}">View site</a> /
|
<a href="{{ site_url }}">{% translate 'View site' %}</a> /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.is_active and user.is_staff %}
|
{% if user.is_active and user.is_staff %}
|
||||||
{% url 'django-admindocs-docroot' as docsroot %}
|
{% url 'django-admindocs-docroot' as docsroot %}
|
||||||
{% if docsroot %}
|
{% if docsroot %}
|
||||||
<a href="{{ docsroot }}">Documentation</a> /
|
<a href="{{ docsroot }}">{% translate 'Documentation' %}</a> /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if user.has_usable_password %}
|
{% if user.has_usable_password %}
|
||||||
<a href="{% url 'admin:password_change' %}">Change password</a> /
|
<a href="{% url 'admin:password_change' %}">{% translate 'Change password' %}</a> /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="{% url 'admin:logout' %}" id="admin-logout-button">Log out</a>
|
<a href="{% url 'admin:logout' %}" id="admin-logout-button">{% translate 'Log out' %}</a>
|
||||||
{% include "admin/color_theme_toggle.html" %}
|
{% include "admin/color_theme_toggle.html" %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block nav-global %}{% endblock %}
|
{% block nav-global %}{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue