Merge pull request '#57 - Django 4.1 + blocktrans/trans templates rename' (#58) from fix-1.0-57 into develop-1.0

Reviewed-on: rc/aircox#58
This commit is contained in:
Thomas Kairos 2022-08-07 10:57:19 +02:00
commit 6a44022afb
25 changed files with 120 additions and 120 deletions

View File

@ -5,7 +5,7 @@
{% if not is_popup %} {% if not is_popup %}
{% block breadcrumbs %} {% block breadcrumbs %}
<div class="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; <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 %} &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> &rsaquo; <a href="{% url opts|admin_urlname:"changelist" %}?parent={{parent.id}}">{{ parent.title }}</a>
{% endif %} {% 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> </div>
{% endblock %} {% endblock %}
{% endif %} {% endif %}
@ -24,18 +24,18 @@
<div class="columns is-size-5"> <div class="columns is-size-5">
<div class="column has-text-left"> <div class="column has-text-left">
{% if original and not original.is_trash %} {% 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 %} {% endif %}
{% if original and not original.is_draft %} {% 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 %} {% endif %}
</div> </div>
<div class="column has-text-right"> <div class="column has-text-right">
<button type="submit" class="button is-secondary is-size-6">{% trans "Save" %}</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">{% trans "Save and continue" %}</button> <button type="submit" name="_continue" class="button is-secondary is-size-6">{% translate "Save and continue" %}</button>
{% if not original.is_published %} {% 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 %} {% endif %}
</div> </div>

View File

@ -4,7 +4,7 @@
{% if not is_popup %} {% if not is_popup %}
{% block breadcrumbs %} {% block breadcrumbs %}
<div class="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; <a href="{% url 'admin:app_list' app_label=cl.opts.app_label %}">{{ cl.opts.app_config.verbose_name }}</a>
{% if parent %} {% if parent %}
&rsaquo; <a href="{% url cl.opts|admin_urlname:'changelist' %}">{{ cl.opts.verbose_name_plural|capfirst }}</a> &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"> <table class="table is-hoverable is-fullwidth">
<thead> <thead>
<tr> <tr>
<th>{% trans "time" %}</th> <th>{% translate "time" %}</th>
<th>{% trans "episode" %}</th> <th>{% translate "episode" %}</th>
<th>{% trans "track" %}</th> <th>{% translate "track" %}</th>
<th>{% trans "tags" %}</th> <th>{% translate "tags" %}</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -63,7 +63,7 @@
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr>
<td class="is-size-6">{% trans "Total" %}</td> <td class="is-size-6">{% translate "Total" %}</td>
<td colspan="100"> <td colspan="100">
<div class="columns is-size-6"> <div class="columns is-size-6">
<span v-for="(count, tag) in counts" class="column"> <span v-for="(count, tag) in counts" class="column">

View File

@ -62,7 +62,7 @@
<div class="navbar-start"> <div class="navbar-start">
{# Today's diffusions #} {# Today's diffusions #}
<div class="navbar-item has-dropdown is-hoverable"> <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"> <div class="navbar-dropdown is-boxed">
{% for diffusion in diffusions %} {% 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 %}"> <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 #} {# Programs #}
<div class="navbar-item has-dropdown is-hoverable"> <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"> <div class="navbar-dropdown is-boxed">
<input type="text" onkeyup="aircox.filter_menu(event)" <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"/> <hr class="navbar-divider"/>
{% for program in programs %} {% for program in programs %}
<a class="navbar-item" href="{% url "admin:aircox_program_change" program.pk %}"> <a class="navbar-item" href="{% url "admin:aircox_program_change" program.pk %}">
@ -89,10 +89,10 @@
{# Articles #} {# Articles #}
<div class="navbar-item has-dropdown is-hoverable"> <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"> <div class="navbar-dropdown is-boxed">
<input type="text" onkeyup="aircox.filter_menu(event)" <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"/> <hr class="navbar-divider"/>
{% for program in programs %} {% for program in programs %}
<a class="navbar-item" href="{% url "admin:aircox_article_changelist" %}?parent={{ program.pk }}"> <a class="navbar-item" href="{% url "admin:aircox_article_changelist" %}?parent={{ program.pk }}">
@ -103,10 +103,10 @@
{# Episodes #} {# Episodes #}
<div class="navbar-item has-dropdown is-hoverable"> <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"> <div class="navbar-dropdown is-boxed">
<input type="text" onkeyup="aircox.filter_menu(event)" <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"/> <hr class="navbar-divider"/>
{% for program in programs %} {% for program in programs %}
<a class="navbar-item" href="{% url "admin:aircox_episode_changelist" %}?parent={{ program.pk }}"> <a class="navbar-item" href="{% url "admin:aircox_episode_changelist" %}?parent={{ program.pk }}">
@ -118,7 +118,7 @@
<div class="navbar-end"> <div class="navbar-end">
<div class="navbar-item has-dropdown is-hoverable"> <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"> <div class="navbar-dropdown is-boxed is-right">
{% get_admin_tools as admin_tools %} {% get_admin_tools as admin_tools %}
{% for label, url in admin_tools %} {% for label, url in admin_tools %}
@ -134,19 +134,19 @@
<div class="navbar-dropdown is-boxed is-right"> <div class="navbar-dropdown is-boxed is-right">
{% block userlinks %} {% block userlinks %}
{% if site_url %} {% 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 %} {% 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 }}" class="navbar-item">{% trans 'Documentation' %}</a> <a href="{{ docsroot }}" class="navbar-item">{% translate 'Documentation' %}</a>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if user.has_usable_password %} {% 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 %} {% endif %}
<hr class="navbar-divider" /> <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 %} {% endblock %}
</div> </div>
@ -160,7 +160,7 @@
{% block breadcrumbs %} {% block breadcrumbs %}
<div class="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 %} {% if title %} &rsaquo; {{ title }}{% endif %}
</div> </div>
{% endblock %} {% endblock %}

View File

@ -27,7 +27,7 @@
{% if not is_popup %} {% if not is_popup %}
{% block breadcrumbs %} {% block breadcrumbs %}
<div class="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; <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 }} &rsaquo; {{ cl.opts.verbose_name_plural|capfirst }}
</div> </div>
@ -47,7 +47,7 @@
{% endblock %} {% endblock %}
{% if cl.formset and cl.formset.errors %} {% if cl.formset and cl.formset.errors %}
<p class="errornote"> <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> </p>
{{ cl.formset.non_form_errors }} {{ cl.formset.non_form_errors }}
{% endif %} {% endif %}
@ -76,7 +76,7 @@
{% block filters %} {% block filters %}
{% if cl.has_filters %} {% if cl.has_filters %}
<div id="changelist-filter"> <div id="changelist-filter">
<h2>{% trans 'Filter' %}</h2> <h2>{% translate 'Filter' %}</h2>
{% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %} {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
</div> </div>
{% endif %} {% endif %}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -14,7 +14,7 @@
<a v-if="source.data.program !== undefined" <a v-if="source.data.program !== undefined"
:href="'{% url 'admin:aircox_program_change' "$$" %}'.replace('$$', source.data.program)" :href="'{% url 'admin:aircox_program_change' "$$" %}'.replace('$$', source.data.program)"
title="{% trans "Edit related program" %}"> title="{% translate "Edit related program" %}">
<span class="icon"> <span class="icon">
<span class="fas fa-edit"></span> <span class="fas fa-edit"></span>
</span> </span>
@ -23,22 +23,22 @@
<div> <div>
<button class="button" @click="source.sync()" <button class="button" @click="source.sync()"
title="{% trans "Synchronize source with Liquidsoap" %}"> title="{% translate "Synchronize source with Liquidsoap" %}">
<span class="icon is-small"> <span class="icon is-small">
<span class="fas fa-sync"></span> <span class="fas fa-sync"></span>
</span> </span>
<span>{% trans "Synchronise" %}</span> <span>{% translate "Synchronise" %}</span>
</button> </button>
<button class="button" @click="source.restart()" <button class="button" @click="source.restart()"
title="{% trans "Restart current track" %}"> title="{% translate "Restart current track" %}">
<span class="icon is-small"> <span class="icon is-small">
<span class="fas fa-step-backward"></span> <span class="fas fa-step-backward"></span>
</span> </span>
<span>{% trans "Restart" %}</span> <span>{% translate "Restart" %}</span>
</button> </button>
<button class="button" @click="source.skip()" <button class="button" @click="source.skip()"
title="{% trans "Skip current file" %}"> title="{% translate "Skip current file" %}">
<span>{% trans "Skip" %}</span> <span>{% translate "Skip" %}</span>
<span class="icon is-small"> <span class="icon is-small">
<span class="fas fa-step-forward"></span> <span class="fas fa-step-forward"></span>
</span> </span>
@ -47,14 +47,14 @@
<div v-if="source.isQueue"> <div v-if="source.isQueue">
<hr> <hr>
<h6 class="title is-6">{% trans "Add sound" %}</h6> <h6 class="title is-6">{% translate "Add sound" %}</h6>
<form @submit.prevent="source.push($event.target.elements['sound_id'].value); $event.target.reset()"> <form @submit.prevent="source.push($event.target.elements['sound_id'].value); $event.target.reset()">
<div class="field is-grouped"> <div class="field is-grouped">
{# TODO: select station => change the shit #} {# TODO: select station => change the shit #}
<a-autocomplete class="control is-expanded" <a-autocomplete class="control is-expanded"
url="{% url "aircox:sound-list" %}?station={{ station.pk }}&search=${query}" url="{% url "aircox:sound-list" %}?station={{ station.pk }}&search=${query}"
name="sound_id" :model="Sound" label-field="name" name="sound_id" :model="Sound" label-field="name"
placeholder="{% trans "Select a sound" %}"> placeholder="{% translate "Select a sound" %}">
<template v-slot:item="{item}"> <template v-slot:item="{item}">
[[ item.data.name ]] [[ item.data.name ]]
<span class="is-size-7 is-italic has-text-info">[[ item.data.file ]]</span> <span class="is-size-7 is-italic has-text-info">[[ item.data.file ]]</span>
@ -65,18 +65,18 @@
<span class="icon"> <span class="icon">
<span class="fas fa-plus"></span> <span class="fas fa-plus"></span>
</span> </span>
<span>{% trans "Add" %}</span> <span>{% translate "Add" %}</span>
</button> </button>
</div> </div>
</div> </div>
<p class="help"> <p class="help">
{% trans "Add a sound to the queue (queue may start playing)" %} {% translate "Add a sound to the queue (queue may start playing)" %}
</p> </p>
{# TODO: help text about how it works #} {# TODO: help text about how it works #}
</form> </form>
<div v-if="source.queue.length"> <div v-if="source.queue.length">
<h6 class="title is-6 is-marginless">{% trans "Sounds in queue" %}</h6> <h6 class="title is-6 is-marginless">{% translate "Sounds in queue" %}</h6>
<table class="table is-fullwidth"><tbody> <table class="table is-fullwidth"><tbody>
<tr v-for="[index, request] in source.queue.entries()"> <tr v-for="[index, request] in source.queue.entries()">
<td :class="{'has-text-weight-semibold': index==0 }"> <td :class="{'has-text-weight-semibold': index==0 }">
@ -94,7 +94,7 @@
<table class="table has-background-transparent"> <table class="table has-background-transparent">
<tbody> <tbody>
<tr><th class="has-text-right has-text-nowrap"> <tr><th class="has-text-right has-text-nowrap">
{% trans "Status" %} {% translate "Status" %}
</th> </th>
<td :class="{'has-text-danger': source.isPlaying, 'has-text-warning': source.isPaused}"> <td :class="{'has-text-danger': source.isPlaying, 'has-text-warning': source.isPaused}">
<span v-if="source.isPlaying" class="fas fa-play"></span> <span v-if="source.isPlaying" class="fas fa-play"></span>
@ -104,7 +104,7 @@
</tr> </tr>
<tr v-if="source.data.air_time"> <tr v-if="source.data.air_time">
<th class="has-text-right has-text-nowrap"> <th class="has-text-right has-text-nowrap">
{% trans "Air time" %} {% translate "Air time" %}
</th><td> </th><td>
<span class="far fa-clock"></span> <span class="far fa-clock"></span>
<time :datetime="source.date"> <time :datetime="source.date">
@ -114,7 +114,7 @@
</td> </td>
<tr v-if="source.remaining"> <tr v-if="source.remaining">
<th class="has-text-right has-text-nowrap"> <th class="has-text-right has-text-nowrap">
{% trans "Time left" %} {% translate "Time left" %}
</th><td> </th><td>
<span class="far fa-hourglass"></span> <span class="far fa-hourglass"></span>
[[ source.remainingString ]] [[ source.remainingString ]]
@ -122,7 +122,7 @@
</tr> </tr>
<tr v-if="source.data.uri"> <tr v-if="source.data.uri">
<th class="has-text-right has-text-nowrap"> <th class="has-text-right has-text-nowrap">
{% trans "Data source" %} {% translate "Data source" %}
</th><td> </th><td>
<span class="far fa-play-circle"></span> <span class="far fa-play-circle"></span>
<template v-if="source.data.uri.length > 64">...</template>[[ (source.data.uri && source.data.uri.slice(-64)) || '&mdash;' ]] <template v-if="source.data.uri.length > 64">...</template>[[ (source.data.uri && source.data.uri.slice(-64)) || '&mdash;' ]]

View File

@ -19,15 +19,15 @@ aircox.init({apiUrl: "{% url "admin:api:streamer-list" %}"},
<span class="icon is-small"> <span class="icon is-small">
<span class="fas fa-sync"></span> <span class="fas fa-sync"></span>
</span> </span>
<span>{% trans "Reload" %}</span> <span>{% translate "Reload" %}</span>
</button> </button>
</span> </span>
</div> </div>
<div class="navbar-end"> <div class="navbar-end">
<div class="control navbar-item"> <div class="control navbar-item">
<select onchange="selectStreamer" class="select" <select onchange="selectStreamer" class="select"
title="{% trans "Select a station" %}" title="{% translate "Select a station" %}"
aria-label="{% trans "Select a station" %}"> aria-label="{% translate "Select a station" %}">
<option v-for="streamer of streamers" :value="streamer.id">[[ streamer.data.name ]]</option> <option v-for="streamer of streamers" :value="streamer.id">[[ streamer.data.name ]]</option>
</select> </select>
</div> </div>

View File

@ -1,16 +1,16 @@
Django~=3.0 Django~=4.1
djangorestframework~=3.13 djangorestframework~=3.13
django-model-utils>=4.2 django-model-utils>=4.2
django-filter~=21.1 django-filter~=22.1
django-filer~=2.1 django-filer~=2.2
django-honeypot~=1.0 django-honeypot~=1.0
django-taggit~=2.1 django-taggit~=3.0
django-admin-sortable2~=1.0 django-admin-sortable2~=2.2
django-ckeditor~=6.2 django-ckeditor~=6.4
bleach~=4.1 bleach~=5.0
easy-thumbnails~=2.8 easy-thumbnails~=2.8
tzlocal~=4.1 tzlocal~=4.2
mutagen~=1.45 mutagen~=1.45
Pillow~=9.0 Pillow~=9.0