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

@ -8,7 +8,7 @@
{% if sidebar_object_list %}
<section>
{% comment %}Translators: in page detail sidebar{% endcomment %}
<h4 class="title is-4">{% trans "Latest news" %}</h4>
<h4 class="title is-4">{% translate "Latest news" %}</h4>
{% for object in sidebar_object_list %}
{% include "aircox/widgets/page_item.html" %}
@ -19,8 +19,8 @@
<ul class="pagination-list">
<li>
<a href="{% url "article-list" %}" class="pagination-link"
aria-label="{% trans "Show all news" %}">
{% trans "More news" %}
aria-label="{% translate "Show all news" %}">
{% translate "More news" %}
</a>
</li>
</ul>

View File

@ -51,7 +51,7 @@ Usefull context:
<nav class="navbar has-shadow" role="navigation" aria-label="main navigation">
<div class="container">
<div class="navbar-brand">
<a href="/" title="{% trans "Home" %}" class="navbar-item">
<a href="/" title="{% translate "Home" %}" class="navbar-item">
<img src="{{ station.logo.url }}" class="logo"/>
</a>
</div>
@ -75,7 +75,7 @@ Usefull context:
<i class="fa fa-search"></i>
</span>
<input type="text" name="q" class="input"
placeholder="{% trans "Search" %}" />
placeholder="{% translate "Search" %}" />
</div>
</form>
</div>
@ -143,7 +143,7 @@ Usefull context:
{% with has_headline=False %}
<section>
<h4 class="title is-4">
{% block sidebar_title %}{% trans "Recently" %}{% endblock %}
{% block sidebar_title %}{% translate "Recently" %}{% endblock %}
</h4>
{% include "aircox/widgets/page_list.html" %}
{% endwith %}

View File

@ -11,7 +11,7 @@
{% with parent.title as title %}
{% with model|default:"Publications"|verbose_name:True|capfirst as model %}
{% comment %}Translators: title when pages are filtered for a specific parent page, e.g.: Articles of My Incredible Show{% endcomment %}
{% blocktrans %}{{ model }} of {{ title }}{% endblocktrans %}
{% blocktranslate %}{{ model }} of {{ title }}{% endblocktranslate %}
{% endwith %}
{% endwith %}
{% endif %}
@ -34,7 +34,7 @@
{% include object.item_template_name|default:item_template_name %}
{% endblock %}
{% empty %}
{% blocktrans %}There is nothing published here...{% endblocktrans %}
{% blocktranslate %}There is nothing published here...{% endblocktranslate %}
{% endfor %}
{% endwith %}
{% endblock %}
@ -44,7 +44,7 @@
<hr/>
{% update_query request.GET.copy page=None as GET %}
{% with GET.urlencode as GET %}
<nav class="pagination is-centered" role="pagination" aria-label="{% trans "pagination" %}">
<nav class="pagination is-centered" role="pagination" aria-label="{% translate "pagination" %}">
{% block pagination %}
{% if page_obj.has_previous %}
<a href="?{{ GET }}&page={{ page_obj.previous_page_number }}" class="pagination-previous">
@ -52,7 +52,7 @@
<a class="pagination-previous" disabled>
{% endif %}
{% comment %}Translators: Bottom of the list, "previous page"{% endcomment %}
{% trans "Previous" %}</a>
{% translate "Previous" %}</a>
{% if page_obj.has_next %}
<a href="?{{ GET }}&page={{ page_obj.next_page_number }}" class="pagination-next">
@ -60,7 +60,7 @@
<a class="pagination-next" disabled>
{% endif %}
{% comment %}Translators: Bottom of the list, "Nextpage"{% endcomment %}
{% trans "Next" %}</a>
{% translate "Next" %}</a>
<ul class="pagination-list">
{% for i in paginator.page_range %}

View File

@ -5,7 +5,7 @@
{% block title %}
{% if not page or not page.title %}
{% with station.name as station %}
{% blocktrans %}This week on {{ station }}{% endblocktrans %}
{% blocktranslate %}This week on {{ station }}{% endblocktranslate %}
{% endwith %}
{% else %}
{{ block.super }}

View File

@ -11,7 +11,7 @@
<div class="columns is-desktop">
<section class="column">
<h5 class="title is-5">{% trans "Diffusions" %}</h5>
<h5 class="title is-5">{% translate "Diffusions" %}</h5>
<ul>
{% for diffusion in object.diffusion_set.all %}
<li>
@ -26,8 +26,8 @@
<small>
{% if diffusion.initial %}
{% with diffusion.initial.date as date %}
<span title="{% blocktrans %}Rerun of {{ date }}{% endblocktrans %}">
({% trans "rerun" %})
<span title="{% blocktranslate %}Rerun of {{ date }}{% endblocktranslate %}">
({% translate "rerun" %})
</span>
{% endwith %}
{% endif %}
@ -45,7 +45,7 @@
:player="player" :actions="['play']"
@select="player.playItems('queue', $event.item)">
<template v-slot:header>
<h5 class="title is-5">{% trans "Podcasts" %}</h5>
<h5 class="title is-5">{% translate "Podcasts" %}</h5>
</template>
</a-playlist>
{% comment %}
@ -59,7 +59,7 @@
{% if tracks %}
<section class="column">
<h4 class="title is-4">{% trans "Playlist" %}</h4>
<h4 class="title is-4">{% translate "Playlist" %}</h4>
<ol>
{% for track in tracks %}
<li><span>{{ track.title }}</span>

View File

@ -5,7 +5,7 @@
{{ block.super }}
<div class="field is-horizontal">
<div class="field-label">
<label class="label">{% trans "Podcasts" %}</label>
<label class="label">{% translate "Podcasts" %}</label>
</div>
<div class="field-body">
<div class="checkbox">

View File

@ -24,7 +24,7 @@
{% if is_primary %}
<span class="fas fa-play"></span>
<time datetime="{{ object.start }}">
{% trans "Currently" %}
{% translate "Currently" %}
</time>
{% else %}
{{ object.start|date:"H:i" }}
@ -43,7 +43,7 @@
<hr>
{% endif %}
<h4 class="title is-4">{% trans "Last publications" %}</h4>
<h4 class="title is-4">{% translate "Last publications" %}</h4>
{% with has_headline=True %}
{{ block.super }}
{% endwith %}
@ -54,8 +54,8 @@
<ul class="pagination-list">
<li>
<a href="{% url "page-list" %}" class="pagination-link"
aria-label="{% trans "Show all publication" %}">
{% trans "More publications..." %}
aria-label="{% translate "Show all publication" %}">
{% translate "More publications..." %}
</a>
</li>
</ul>
@ -64,14 +64,14 @@
{% block sidebar %}
<section>
<h4 class="title is-4">{% trans "Previously on air" %}</h4>
<h4 class="title is-4">{% translate "Previously on air" %}</h4>
{% with logs as object_list %}
{% include "aircox/widgets/log_list.html" %}
{% endwith %}
</section>
<section>
<h4 class="title is-4">{% trans "Today" %}</h4>
<h4 class="title is-4">{% translate "Today" %}</h4>
{% with is_thin=True %}
{% with hide_schedule=True %}
{% with has_headline=False %}

View File

@ -5,7 +5,7 @@
{% block title %}
{% if not page or not page.title %}
{% with station.name as station %}
{% blocktrans %}That happened on {{ station }}{% endblocktrans %}
{% blocktranslate %}That happened on {{ station }}{% endblocktranslate %}
{% endwith %}
{% else %}
{{ block.super }}

View File

@ -22,7 +22,7 @@ Context:
<span class="icon is-small">
<i class="fa fa-pen"></i>
</span>&nbsp;
<span>{% trans "Edit" %}</span>
<span>{% translate "Edit" %}</span>
</a>
{% endif %}
{% endblock %}
@ -34,7 +34,7 @@ Context:
{% if comments or comment_form %}
<hr>
<section class="mt-6">
<h4 class="title is-4">{% trans "Comments" %}</h4>
<h4 class="title is-4">{% translate "Comments" %}</h4>
{% for comment in comments %}
<div class="media box">
@ -55,7 +55,7 @@ Context:
{% if comment_form %}
<form method="POST">
<h5 class="title is-5">{% trans "Post a comment" %}</h5>
<h5 class="title is-5">{% translate "Post a comment" %}</h5>
{% csrf_token %}
{% render_honeypot_field "website" %}
@ -80,8 +80,8 @@ Context:
</div>
{% endfor %}
<div class="has-text-right">
<button type="reset" class="button is-danger">{% trans "Reset" %}</button>
<button type="submit" class="button is-success">{% trans "Post comment" %}</button>
<button type="reset" class="button is-danger">{% translate "Reset" %}</button>
<button type="submit" class="button is-success">{% translate "Post comment" %}</button>
</div>
</form>
{% endif %}

View File

@ -11,7 +11,7 @@
{% block filters %}
<div class="field is-horizontal">
<div class="field-label">
<label class="label">{% trans "Search" %}</label>
<label class="label">{% translate "Search" %}</label>
</div>
<div class="field-body">
<div class="field">
@ -21,14 +21,14 @@
</span>
<input class="input" type="text" name="q"
value="{{ filterset_data.q }}"
placeholder="{% trans "Search content" %}">
placeholder="{% translate "Search content" %}">
</div>
</div>
</div>
</div>
<div class="field is-horizontal">
<div class="field-label">
<label class="label">{% trans "Categories" %}</label>
<label class="label">{% translate "Categories" %}</label>
</div>
<div class="field-body">
<div class="field is-narrow">
@ -50,10 +50,10 @@
<div class="media-right">
<div class="field is-grouped is-grouped-right">
<div class="control">
<button class="button is-primary"/>{% trans "Apply" %}</button>
<button class="button is-primary"/>{% translate "Apply" %}</button>
</div>
<div class="control">
<a href="?" class="button is-secondary">{% trans "Reset" %}</a>
<a href="?" class="button is-secondary">{% translate "Reset" %}</a>
</div>
</div>
</div>

View File

@ -15,7 +15,7 @@
{% with has_headline=False %}
<div class="columns is-desktop">
<section class="column">
<h5 class="title is-5">{% trans "Diffusions" %}</h5>
<h5 class="title is-5">{% translate "Diffusions" %}</h5>
{% for schedule in program.schedule_set.all %}
{{ schedule.get_frequency_verbose }}
{% with schedule.start|date:"H:i" as start %}
@ -28,8 +28,8 @@
<small>
{% if schedule.initial %}
{% with schedule.initial.date as date %}
<span title="{% blocktrans %}Rerun of {{ date }}{% endblocktrans %}">
({% trans "Rerun" %})
<span title="{% blocktranslate %}Rerun of {{ date }}{% endblocktranslate %}">
({% translate "Rerun" %})
</span>
{% endwith %}
{% endif %}
@ -40,7 +40,7 @@
{% if articles %}
<section class="column">
<h4 class="title is-5">{% trans "Articles" %}</h4>
<h4 class="title is-5">{% translate "Articles" %}</h4>
{% for object in articles %}
{% include "aircox/widgets/page_item.html" %}
@ -52,8 +52,8 @@
<li>
<a href="{% url "article-list" parent_slug=program.slug %}"
class="pagination-link"
aria-label="{% trans "Show all program's articles" %}">
{% trans "More articles" %}
aria-label="{% translate "Show all program's articles" %}">
{% translate "More articles" %}
</a>
</li>
</ul>

View File

@ -1,7 +1,7 @@
{% block sidebar_title %}
{% with program.title as program %}
{% blocktrans %}Recently on {{ program }}{% endblocktrans %}
{% blocktranslate %}Recently on {{ program }}{% endblocktranslate %}
{% endwith %}
{% endblock %}

View File

@ -12,7 +12,7 @@ An empty date results to a title or a separator
{% load i18n %}
<div class="media" role="menu"
aria-label="{% trans "pick a date" %}">
aria-label="{% translate "pick a date" %}">
<div class="media-content">
<div class="tabs is-toggle">
<ul>
@ -29,7 +29,7 @@ An empty date results to a title or a separator
<div class="media-right">
<form action="{% url url_name %}" method="GET" class="navbar-body"
aria-label="{% trans "Jump to date" %}">
aria-label="{% translate "Jump to date" %}">
<div class="field has-addons">
<div class="control has-icons-left">
<span class="icon is-small is-left"><span class="far fa-calendar"></span></span>
@ -38,7 +38,7 @@ An empty date results to a title or a separator
</div>
<div class="control">
{% comment %}Translators: form button to select a date{% endcomment %}
<button class="button is-primary">{% trans "Go" %}</button>
<button class="button is-primary">{% translate "Go" %}</button>
</div>
</div>
</form>

View File

@ -37,8 +37,8 @@ Context variables:
{% if diffusion.initial %}
{% with diffusion.initial.date as date %}
<span title="{% blocktrans %}Rerun of {{ date }}{% endblocktrans %}">
{% trans "(rerun)" %}
<span title="{% blocktranslate %}Rerun of {{ date }}{% endblocktranslate %}">
{% translate "(rerun)" %}
</span>
{% endwith %}
{% endif %}

View File

@ -17,8 +17,8 @@ Context:
<ul class="pagination-list">
<li>
<a href="{{ list_url }}" class="pagination-link"
aria-label="{% trans "Show all publications" %}">
{% trans "Show more" %}
aria-label="{% translate "Show all publications" %}">
{% translate "Show more" %}
</a>
</li>
</ul>

View File

@ -6,8 +6,8 @@ The audio player
<br>
<div class="box is-fullwidth is-fixed-bottom is-paddingless player"
role="{% trans "player" %}"
aria-description="{% trans "Audio player used to listen to the radio and podcasts" %}">
role="{% translate "player" %}"
aria-description="{% translate "Audio player used to listen to the radio and podcasts" %}">
<noscript>
<audio src="{{ audio_streams.0 }}" controls>
{% for stream in audio_streams %}
@ -19,13 +19,13 @@ The audio player
<a-player ref="player"
:live-args="{url: '{% url "api:live" %}', timeout:10, src: {{ audio_streams|json }} || []}"
button-title="{% trans "Play or pause audio" %}">
button-title="{% translate "Play or pause audio" %}">
<template v-slot:content="{ loaded, live, current }">
<h4 v-if="loaded" class="title is-4">
[[ loaded.name ]]
</h4>
<h4 v-else-if="current && current.data.type == 'track'"
class="title is-4" aria-description="{% trans "Track currently on air" %}">
class="title is-4" aria-description="{% translate "Track currently on air" %}">
<span class="has-text-info is-size-3">&#9836;</span>
<span>[[ current.data.title ]]</span>
<span class="has-text-grey-dark has-text-weight-light">
@ -34,12 +34,12 @@ The audio player
</span>
</h4>
<div v-else-if="live && current && current.data.type == 'diffusion'">
<h4 class="title is-4" aria-description="{% trans "Diffusion currently on air" %}">
<h4 class="title is-4" aria-description="{% translate "Diffusion currently on air" %}">
<a :href="current.data.url">[[ current.data.title ]]</a>
</h4>
<div class="">[[ current.data.info ]]</div>
</div>
<h4 v-else class="title is-4" aria-description="{% trans "Currently playing" %}">
<h4 v-else class="title is-4" aria-description="{% translate "Currently playing" %}">
{{ request.station.name }}
</h4>
</template>