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">

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>

View File

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

View File

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

View File

@ -1,16 +1,16 @@
Django~=3.0
Django~=4.1
djangorestframework~=3.13
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-taggit~=2.1
django-admin-sortable2~=1.0
django-ckeditor~=6.2
bleach~=4.1
django-taggit~=3.0
django-admin-sortable2~=2.2
django-ckeditor~=6.4
bleach~=5.0
easy-thumbnails~=2.8
tzlocal~=4.1
tzlocal~=4.2
mutagen~=1.45
Pillow~=9.0