update dependencies to Django 4.1 + rename blocktrans/trans templates

This commit is contained in:
bkfox
2022-08-07 09:56:29 +02:00
parent 9c147b2a6d
commit fbc61614d7
25 changed files with 120 additions and 120 deletions

View File

@ -5,7 +5,7 @@
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
&rsaquo; {% if has_view_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}
@ -13,7 +13,7 @@
&rsaquo; <a href="{% url opts|admin_urlname:"changelist" %}?parent={{parent.id}}">{{ parent.title }}</a>
{% endif %}
&rsaquo; {% if add %}{% blocktrans with name=opts.verbose_name %}Add {{ name }}{% endblocktrans %}{% else %}{{ original|truncatewords:"18" }}{% endif %}
&rsaquo; {% if add %}{% blocktranslate with name=opts.verbose_name %}Add {{ name }}{% endblocktranslate %}{% else %}{{ original|truncatewords:"18" }}{% endif %}
</div>
{% endblock %}
{% endif %}
@ -24,18 +24,18 @@
<div class="columns is-size-5">
<div class="column has-text-left">
{% if original and not original.is_trash %}
<button type="submit" name="status" value="32" class="button is-danger is-size-6">{% trans "Move to trash" %}</button>
<button type="submit" name="status" value="32" class="button is-danger is-size-6">{% translate "Move to trash" %}</button>
{% endif %}
{% if original and not original.is_draft %}
<button type="submit" name="status" value="0" class="button is-warning is-size-6">{% trans "Mark as draft" %}</button>
<button type="submit" name="status" value="0" class="button is-warning is-size-6">{% translate "Mark as draft" %}</button>
{% endif %}
</div>
<div class="column has-text-right">
<button type="submit" class="button is-secondary is-size-6">{% trans "Save" %}</button>
<button type="submit" name="_continue" class="button is-secondary is-size-6">{% trans "Save and continue" %}</button>
<button type="submit" class="button is-secondary is-size-6">{% translate "Save" %}</button>
<button type="submit" name="_continue" class="button is-secondary is-size-6">{% translate "Save and continue" %}</button>
{% if not original.is_published %}
<button type="submit" name="status" value="16" class="button is-primary is-size-6">{% trans "Publish" %}</button>
<button type="submit" name="status" value="16" class="button is-primary is-size-6">{% translate "Publish" %}</button>
{% endif %}
</div>

View File

@ -4,7 +4,7 @@
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{{ cl.opts.app_config.verbose_name }}</a>
{% if parent %}
&rsaquo; <a href="{% url cl.opts|admin_urlname:'changelist' %}">{{ cl.opts.verbose_name_plural|capfirst }}</a>

View File

@ -18,10 +18,10 @@
<table class="table is-hoverable is-fullwidth">
<thead>
<tr>
<th>{% trans "time" %}</th>
<th>{% trans "episode" %}</th>
<th>{% trans "track" %}</th>
<th>{% trans "tags" %}</th>
<th>{% translate "time" %}</th>
<th>{% translate "episode" %}</th>
<th>{% translate "track" %}</th>
<th>{% translate "tags" %}</th>
</tr>
</thead>
<tbody>
@ -63,7 +63,7 @@
</tbody>
<tfoot>
<tr>
<td class="is-size-6">{% trans "Total" %}</td>
<td class="is-size-6">{% translate "Total" %}</td>
<td colspan="100">
<div class="columns is-size-6">
<span v-for="(count, tag) in counts" class="column">

View File

@ -62,7 +62,7 @@
<div class="navbar-start">
{# Today's diffusions #}
<div class="navbar-item has-dropdown is-hoverable">
<span class="navbar-link">{% trans "Today" %}</span>
<span class="navbar-link">{% translate "Today" %}</span>
<div class="navbar-dropdown is-boxed">
{% for diffusion in diffusions %}
<a class="navbar-item {% if diffusion.is_now %}has-background-primary{% endif %}" href="{% url "admin:aircox_episode_change" diffusion.episode.pk %}">
@ -75,10 +75,10 @@
{# Programs #}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="{% url "admin:aircox_program_changelist" %}">{% trans "Programs" %}</a>
<a class="navbar-link" href="{% url "admin:aircox_program_changelist" %}">{% translate "Programs" %}</a>
<div class="navbar-dropdown is-boxed">
<input type="text" onkeyup="aircox.filter_menu(event)"
placeholder="{% trans "Search" %}" class="navbar-item input" />
placeholder="{% translate "Search" %}" class="navbar-item input" />
<hr class="navbar-divider"/>
{% for program in programs %}
<a class="navbar-item" href="{% url "admin:aircox_program_change" program.pk %}">
@ -89,10 +89,10 @@
{# Articles #}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="{% url "admin:aircox_article_changelist" %}">{% trans "Articles" %}</a>
<a class="navbar-link" href="{% url "admin:aircox_article_changelist" %}">{% translate "Articles" %}</a>
<div class="navbar-dropdown is-boxed">
<input type="text" onkeyup="aircox.filter_menu(event)"
placeholder="{% trans "Search" %}" class="navbar-item input" />
placeholder="{% translate "Search" %}" class="navbar-item input" />
<hr class="navbar-divider"/>
{% for program in programs %}
<a class="navbar-item" href="{% url "admin:aircox_article_changelist" %}?parent={{ program.pk }}">
@ -103,10 +103,10 @@
{# Episodes #}
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link" href="{% url "admin:aircox_episode_changelist" %}">{% trans "Episodes" %}</a>
<a class="navbar-link" href="{% url "admin:aircox_episode_changelist" %}">{% translate "Episodes" %}</a>
<div class="navbar-dropdown is-boxed">
<input type="text" onkeyup="aircox.filter_menu(event)"
placeholder="{% trans "Search" %}" class="navbar-item input" />
placeholder="{% translate "Search" %}" class="navbar-item input" />
<hr class="navbar-divider"/>
{% for program in programs %}
<a class="navbar-item" href="{% url "admin:aircox_episode_changelist" %}?parent={{ program.pk }}">
@ -118,7 +118,7 @@
<div class="navbar-end">
<div class="navbar-item has-dropdown is-hoverable">
<a href="#" class="navbar-link">{% trans "Tools" %}</a>
<a href="#" class="navbar-link">{% translate "Tools" %}</a>
<div class="navbar-dropdown is-boxed is-right">
{% get_admin_tools as admin_tools %}
{% for label, url in admin_tools %}
@ -134,19 +134,19 @@
<div class="navbar-dropdown is-boxed is-right">
{% block userlinks %}
{% if site_url %}
<a href="{{ site_url }}" class="navbar-item">{% trans 'View site' %}</a>
<a href="{{ site_url }}" class="navbar-item">{% translate 'View site' %}</a>
{% endif %}
{% if user.is_active and user.is_staff %}
{% url 'django-admindocs-docroot' as docsroot %}
{% if docsroot %}
<a href="{{ docsroot }}" class="navbar-item">{% trans 'Documentation' %}</a>
<a href="{{ docsroot }}" class="navbar-item">{% translate 'Documentation' %}</a>
{% endif %}
{% endif %}
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}" class="navbar-item">{% trans 'Change password' %}</a>
<a href="{% url 'admin:password_change' %}" class="navbar-item">{% translate 'Change password' %}</a>
{% endif %}
<hr class="navbar-divider" />
<a href="{% url 'admin:logout' %}" class="navbar-item">{% trans 'Log out' %}</a>
<a href="{% url 'admin:logout' %}" class="navbar-item">{% translate 'Log out' %}</a>
{% endblock %}
</div>
@ -160,7 +160,7 @@
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
{% if title %} &rsaquo; {{ title }}{% endif %}
</div>
{% endblock %}

View File

@ -27,7 +27,7 @@
{% if not is_popup %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
<a href="{% url 'admin:index' %}">{% translate 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{{ cl.opts.app_config.verbose_name }}</a>
&rsaquo; {{ cl.opts.verbose_name_plural|capfirst }}
</div>
@ -47,7 +47,7 @@
{% endblock %}
{% if cl.formset and cl.formset.errors %}
<p class="errornote">
{% if cl.formset.total_error_count == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
{% if cl.formset.total_error_count == 1 %}{% translate "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
</p>
{{ cl.formset.non_form_errors }}
{% endif %}
@ -76,7 +76,7 @@
{% block filters %}
{% if cl.has_filters %}
<div id="changelist-filter">
<h2>{% trans 'Filter' %}</h2>
<h2>{% translate 'Filter' %}</h2>
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
</div>
{% endif %}

View File

@ -8,7 +8,7 @@
<div class="section">
<div class="columns">
<div class="column">
<h1 class="title is-4">{% trans "Today" %}</h1>
<h1 class="title is-4">{% translate "Today" %}</h1>
<table class="table is-fullwidth is-striped">
<tbody>
{% for diffusion in diffusions %}
@ -24,10 +24,10 @@
<span class="icon is-small">
{% if diffusion.is_live %}
<i class="fa fa-microphone"
title="{% trans "Live diffusion" %}"></i>
title="{% translate "Live diffusion" %}"></i>
{% else %}
<i class="fa fa-music"
title="{% trans "Differed diffusion" %}"></i>
title="{% translate "Differed diffusion" %}"></i>
{% endif %}
</span>
&nbsp;
@ -48,7 +48,7 @@
</table>
</div>
<div class="column">
<h1 class="title is-4">{% trans "Latest comments" %}</h1>
<h1 class="title is-4">{% translate "Latest comments" %}</h1>
<table class="table is-fullwidth is-striped">
{% for comment in comments %}
{% with page=comment.page %}
@ -62,13 +62,13 @@
<span>{{ comment.date }}</span>
<span class="float-right">
<a href="{% url "admin:aircox_comment_change" comment.pk %}"
title="{% trans "Edit comment" %}"
aria-label="{% trans "Edit comment" %}">
title="{% translate "Edit comment" %}"
aria-label="{% translate "Edit comment" %}">
<span class="fa fa-edit"></span>
</a>
<a class="has-text-danger"
title="{% trans "Delete comment" %}"
aria-label="{% trans "Delete comment" %}"
title="{% translate "Delete comment" %}"
aria-label="{% translate "Delete comment" %}"
href="{% url "admin:aircox_comment_delete" comment.pk %}">
<span class="fa fa-trash-alt"></span>
</a>
@ -84,7 +84,7 @@
</tbody>
</table>
<div class="has-text-centered">
<a href="{% url "admin:aircox_comment_changelist" %}" class="float-center">{% trans "All comments" %}</a>
<a href="{% url "admin:aircox_comment_changelist" %}" class="float-center">{% translate "All comments" %}</a>
</div>
</div>
<div class="column">