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

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