document translations

This commit is contained in:
bkfox 2020-01-06 14:15:49 +01:00
parent 253045e976
commit 078a90f09a
33 changed files with 355 additions and 543 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Aircox 0.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-01-04 19:33+0100\n"
"POT-Creation-Date: 2020-01-06 14:14+0100\n"
"PO-Revision-Date: 2016-10-10 16:00+02\n"
"Last-Translator: Aarys\n"
"Language-Team: Aircox's translators team\n"
@ -52,7 +52,7 @@ msgstr "Jour"
msgid "file"
msgstr "fichier"
#: admin/sound.py:61 templates/aircox/episode_detail.html:36
#: admin/sound.py:61 templates/aircox/episode_detail.html:38
msgid "Playlist"
msgstr ""
@ -81,7 +81,7 @@ msgid "Article"
msgstr ""
#: models/article.py:22 templates/admin/base.html:46
#: templates/aircox/program_detail.html:17
#: templates/aircox/program_detail.html:19
msgid "Articles"
msgstr ""
@ -106,7 +106,7 @@ msgid "cancelled"
msgstr ""
#: models/episode.py:147 models/sound.py:90 models/sound.py:280
#: templates/admin/aircox/statistics.html:21
#: templates/admin/aircox/statistics.html:23
msgid "episode"
msgstr ""
@ -119,7 +119,7 @@ msgstr "type"
msgid "Diffusion"
msgstr "Diffusion"
#: models/episode.py:166 templates/aircox/controllers/monitor.html:151
#: models/episode.py:166
msgid "Diffusions"
msgstr "Diffusions"
@ -127,8 +127,8 @@ msgstr "Diffusions"
msgid "edit the diffusion's planification"
msgstr "éditer la planification de la diffusion"
#: models/episode.py:177 templates/aircox/episode_detail.html:20
#: templates/aircox/program_header.html:16
#: models/episode.py:177 templates/aircox/episode_detail.html:22
#: templates/aircox/program_header.html:21
#, fuzzy
#| msgid "Rerun"
msgid "rerun"
@ -172,7 +172,6 @@ msgid "Sound"
msgstr "Son"
#: models/log.py:210 models/sound.py:306
#: templates/aircox/controllers/stats.html:58
msgid "Track"
msgstr "Morceau"
@ -188,7 +187,7 @@ msgstr ""
msgid "Category"
msgstr ""
#: models/page.py:33 templates/aircox/page_list.html:23
#: models/page.py:33 templates/aircox/page_list.html:28
msgid "Categories"
msgstr ""
@ -303,7 +302,7 @@ msgstr ""
msgid "date of the first diffusion"
msgstr "date de la première diffusion"
#: models/program.py:256 templates/admin/aircox/statistics.html:20
#: models/program.py:256 templates/admin/aircox/statistics.html:22
msgid "time"
msgstr "heure"
@ -508,7 +507,7 @@ msgstr "en secondes"
msgid "artist"
msgstr "artiste"
#: models/sound.py:296 templates/admin/aircox/statistics.html:23
#: models/sound.py:296 templates/admin/aircox/statistics.html:25
msgid "tags"
msgstr "tags"
@ -604,35 +603,35 @@ msgstr ""
"liste des paramètres disponibles séparés par des virgules; placé dans le "
"fichier de configuration en tant que code brut; relatif au plugin utilisé"
#: templates/admin/aircox/page_change_form.html:9
#: templates/admin/aircox/page_change_form.html:11
msgid "Move to trash"
msgstr ""
#: templates/admin/aircox/page_change_form.html:12
#: templates/admin/aircox/page_change_form.html:14
msgid "Mark as draft"
msgstr ""
#: templates/admin/aircox/page_change_form.html:17
#: templates/admin/aircox/page_change_form.html:19
msgid "Save"
msgstr ""
#: templates/admin/aircox/page_change_form.html:18
#: templates/admin/aircox/page_change_form.html:20
msgid "Save and continue"
msgstr ""
#: templates/admin/aircox/page_change_form.html:20
#: templates/admin/aircox/page_change_form.html:22
#, fuzzy
#| msgid "public"
msgid "Publish"
msgstr "public"
#: templates/admin/aircox/statistics.html:22
#: templates/admin/aircox/statistics.html:24
#, fuzzy
#| msgid "Track"
msgid "track"
msgstr "Morceau"
#: templates/admin/aircox/statistics.html:65
#: templates/admin/aircox/statistics.html:67
#, fuzzy
#| msgid "Total"
msgid "Totals"
@ -667,7 +666,7 @@ msgid "Log out"
msgstr ""
#: templates/admin/base.html:111 templates/admin/change_list.html:30
#: templates/aircox/base.html:54
#: templates/aircox/base.html:58
msgid "Home"
msgstr ""
@ -683,181 +682,43 @@ msgstr ""
msgid "Filter"
msgstr ""
#: templates/aircox/article_detail.html:9
#. Translators: in page detail sidebar
#: templates/aircox/article_detail.html:12
msgid "Latest news"
msgstr ""
#: templates/aircox/article_detail.html:20
#: templates/aircox/article_detail.html:23
msgid "Show all news"
msgstr ""
#: templates/aircox/article_detail.html:21
#: templates/aircox/article_detail.html:24
msgid "More news"
msgstr ""
#: templates/aircox/article_list.html:7
#, python-format
msgid "Articles of %(parent)s"
msgstr ""
#: templates/aircox/base.html:97
#: templates/aircox/base.html:102
msgid "list filters"
msgstr ""
#: templates/aircox/base.html:120
#: templates/aircox/base.html:126
msgid "Recently"
msgstr ""
#: templates/aircox/controllers/monitor.html:6
#: templates/aircox/controllers/monitor.html:112
msgid "Streamer monitor"
msgstr "Streamer"
#: templates/aircox/controllers/monitor.html:115
msgid "refresh"
msgstr "rafraîchir"
#: templates/aircox/controllers/monitor.html:129
#, python-format
msgid ""
"\n"
" Current source: %(current_source)s\n"
" "
msgstr ""
"\n"
" Source courante: %(current_source)s\n"
" "
#: templates/aircox/controllers/monitor.html:136
#: templates/aircox/controllers/monitor.html:175
msgid "restart"
msgstr "redémarrer"
#: templates/aircox/controllers/monitor.html:138
#: templates/aircox/controllers/monitor.html:177
msgid "skip"
msgstr "passer"
#: templates/aircox/controllers/monitor.html:143
msgid "Source"
msgstr "Source"
#: templates/aircox/controllers/monitor.html:144
msgid "File"
msgstr "Fichier"
#: templates/aircox/controllers/monitor.html:145
msgid "Actions*"
msgstr "Actions"
#: templates/aircox/controllers/monitor.html:158
msgid "current"
msgstr "courant"
#: templates/aircox/controllers/monitor.html:161
msgid "diffusions"
msgstr "diffusions"
#: templates/aircox/controllers/monitor.html:163
msgid "stream"
msgstr "stream"
#: templates/aircox/controllers/monitor.html:186
msgid ""
"\n"
" *: Due to some technical issues, it might take up to 30 seconds to "
"execute the given action.\n"
" "
msgstr ""
"\n"
" *: Pour des raisons technique, cela peut prendre 30 secondes ou plus "
"pour exécuter une action."
#: templates/aircox/controllers/stats.html:9
#: templates/aircox/controllers/stats.html:14
msgid "Statistics of the stations"
msgstr "Statistiques des stations"
#: templates/aircox/controllers/stats.html:18
msgid "Go to this date:"
msgstr "Aller à cette date:"
#: templates/aircox/controllers/stats.html:19
msgid "day"
msgstr "jour"
#: templates/aircox/controllers/stats.html:21
msgid "month"
msgstr "mois"
#: templates/aircox/controllers/stats.html:23
msgid "year"
msgstr "année"
#: templates/aircox/controllers/stats.html:25
msgid "Show"
msgstr "Montrer"
#: templates/aircox/controllers/stats.html:38
msgid "Date"
msgstr "Date"
#: templates/aircox/controllers/stats.html:39
msgid "Type"
msgstr "Type"
#. Translators "Header for statistics view"
#: templates/aircox/controllers/stats.html:41
msgid "Diffusion or sound played"
msgstr "Diffusion ou son joué"
#: templates/aircox/controllers/stats.html:42
msgid "Tags"
msgstr "Tags"
#: templates/aircox/controllers/stats.html:67
msgid "Total"
msgstr "Total"
#: templates/aircox/controllers/stats.html:71
#, fuzzy, python-format
#| msgid ""
#| "\n"
#| " %(items_count)s items, with a total of %(tracks_count)s "
#| "tracks\n"
#| " "
msgid ""
"\n"
" %(items_count)s items, with a total of %(tracks_count)s "
"tracks\n"
" "
msgstr ""
"\n"
" %(items_counts)s items, avec un total de %(tracks_count)s "
"pistes\n"
" "
#: templates/aircox/diffusion_list.html:6
#: templates/aircox/diffusion_list.html:8
#, python-format
msgid "Today on %(station)s"
msgstr ""
#: templates/aircox/episode_detail.html:19
#: templates/aircox/program_header.html:15
#: templates/aircox/widgets/episode_item.html:32
#: templates/aircox/episode_detail.html:21
#: templates/aircox/program_header.html:20
#: templates/aircox/widgets/episode_item.html:34
#, python-format
msgid "Rerun of %(date)s"
msgstr ""
#: templates/aircox/episode_detail.html:51
#: templates/aircox/episode_detail.html:53
msgid "Podcasts"
msgstr ""
#: templates/aircox/episode_list.html:7
#, python-format
msgid "Episodes of %(parent)s"
msgstr ""
#: templates/aircox/home.html:24
#, fuzzy
#| msgid "current"
@ -884,70 +745,73 @@ msgstr ""
msgid "Today"
msgstr ""
#: templates/aircox/log_list.html:6
#: templates/aircox/log_list.html:8
#, python-format
msgid "That happened on %(station)s"
msgstr ""
#: templates/aircox/page_detail.html:25
#: templates/aircox/page_detail.html:27
#, fuzzy
#| msgid "comment"
msgid "Comments"
msgstr "commentaire"
#: templates/aircox/page_detail.html:46
#: templates/aircox/page_detail.html:48
#, fuzzy
#| msgid "comment"
msgid "Post a comment"
msgstr "commentaire"
#: templates/aircox/page_detail.html:71 templates/aircox/page_list.html:50
#: templates/aircox/page_detail.html:73 templates/aircox/page_list.html:55
msgid "Reset"
msgstr ""
#: templates/aircox/page_detail.html:72
#: templates/aircox/page_detail.html:74
#, fuzzy
#| msgid "comment"
msgid "Comment"
msgstr "commentaire"
#: templates/aircox/page_list.html:8
#. Translators: title when pages are filtered for a specific parent page, e.g.: Articles of My Incredible Show
#: templates/aircox/page_list.html:12
#, python-format
msgid "Publications of %(title)s"
msgid "%(model)s of %(title)s"
msgstr ""
#: templates/aircox/page_list.html:15
#: templates/aircox/page_list.html:20
msgid "Filters"
msgstr ""
#: templates/aircox/page_list.html:47
#: templates/aircox/page_list.html:52
msgid "Apply"
msgstr ""
#: templates/aircox/page_list.html:74
#: templates/aircox/page_list.html:79
#, fuzzy
#| msgid "information"
msgid "pagination"
msgstr "information"
#: templates/aircox/page_list.html:81
#. Translators: Bottom of the list, "previous page"
#: templates/aircox/page_list.html:87
msgid "Previous"
msgstr ""
#: templates/aircox/page_list.html:88
#. Translators: Bottom of the list, "Nextpage"
#: templates/aircox/page_list.html:95
msgid "Next"
msgstr ""
#: templates/aircox/program_base.html:6
#: templates/aircox/program_base.html:8
#, python-format
msgid "Recently on %(program)s"
msgstr ""
#: templates/aircox/program_detail.html:29
#: templates/aircox/program_detail.html:31
msgid "Show all program's articles"
msgstr ""
#: templates/aircox/program_detail.html:30
#: templates/aircox/program_detail.html:32
msgid "More articles"
msgstr ""
@ -959,11 +823,12 @@ msgstr ""
msgid "Jump to date"
msgstr ""
#: templates/aircox/widgets/dates_menu.html:35
#. Translators: form button to select a date
#: templates/aircox/widgets/dates_menu.html:36
msgid "Go"
msgstr ""
#: templates/aircox/widgets/episode_item.html:33
#: templates/aircox/widgets/episode_item.html:35
#, fuzzy
#| msgid "Rerun"
msgid "(rerun)"
@ -979,15 +844,15 @@ msgstr ""
msgid "Show more"
msgstr "Montrer"
#: templates/aircox/widgets/player.html:7
#: templates/aircox/widgets/player.html:10
msgid "player"
msgstr ""
#: templates/aircox/widgets/player.html:8
msgid "audio player used to listen to the radio"
#: templates/aircox/widgets/player.html:11
msgid "Audio player used to listen to the radio and podcasts"
msgstr ""
#: templates/aircox/widgets/player.html:20
#: templates/aircox/widgets/player.html:23
msgid "Play or pause audio"
msgstr ""
@ -1057,6 +922,106 @@ msgstr ""
msgid "comments are not allowed"
msgstr ""
#~ msgid "Streamer monitor"
#~ msgstr "Streamer"
#~ msgid "refresh"
#~ msgstr "rafraîchir"
#, python-format
#~ msgid ""
#~ "\n"
#~ " Current source: %(current_source)s\n"
#~ " "
#~ msgstr ""
#~ "\n"
#~ " Source courante: %(current_source)s\n"
#~ " "
#~ msgid "restart"
#~ msgstr "redémarrer"
#~ msgid "skip"
#~ msgstr "passer"
#~ msgid "Source"
#~ msgstr "Source"
#~ msgid "File"
#~ msgstr "Fichier"
#~ msgid "Actions*"
#~ msgstr "Actions"
#~ msgid "current"
#~ msgstr "courant"
#~ msgid "diffusions"
#~ msgstr "diffusions"
#~ msgid "stream"
#~ msgstr "stream"
#~ msgid ""
#~ "\n"
#~ " *: Due to some technical issues, it might take up to 30 seconds to "
#~ "execute the given action.\n"
#~ " "
#~ msgstr ""
#~ "\n"
#~ " *: Pour des raisons technique, cela peut prendre 30 secondes ou plus "
#~ "pour exécuter une action."
#~ msgid "Statistics of the stations"
#~ msgstr "Statistiques des stations"
#~ msgid "Go to this date:"
#~ msgstr "Aller à cette date:"
#~ msgid "day"
#~ msgstr "jour"
#~ msgid "month"
#~ msgstr "mois"
#~ msgid "year"
#~ msgstr "année"
#~ msgid "Show"
#~ msgstr "Montrer"
#~ msgid "Date"
#~ msgstr "Date"
#~ msgid "Type"
#~ msgstr "Type"
#~ msgid "Diffusion or sound played"
#~ msgstr "Diffusion ou son joué"
#~ msgid "Tags"
#~ msgstr "Tags"
#~ msgid "Total"
#~ msgstr "Total"
#, fuzzy, python-format
#~| msgid ""
#~| "\n"
#~| " %(items_count)s items, with a total of %(tracks_count)s "
#~| "tracks\n"
#~| " "
#~ msgid ""
#~ "\n"
#~ " %(items_count)s items, with a total of %(tracks_count)s "
#~ "tracks\n"
#~ " "
#~ msgstr ""
#~ "\n"
#~ " %(items_counts)s items, avec un total de %(tracks_count)s "
#~ "pistes\n"
#~ " "
#, fuzzy
#~| msgid "syncronise"
#~ msgid "Synchronise"

View File

@ -1,4 +1,5 @@
{% extends "admin/change_form.html" %}
{% comment %}Admin edit template to edit pages.{% endcomment %}
{% load i18n static %}
{% block submit_buttons_bottom %}

View File

@ -1,3 +1,4 @@
{% comment %}Inline block to edit playlists{% endcomment %}
{% load static i18n %}
{% with inline_admin_formset.formset.instance as playlist %}

View File

@ -1,4 +1,5 @@
{% extends "admin/base_site.html" %}
{% comment %}Admin tool displaying logs statistics{% endcomment %}
{% load i18n aircox %}

View File

@ -1,4 +1,5 @@
{% extends "aircox/page_detail.html" %}
{% comment %}Detail page for regular articles{% endcomment %}
{% load i18n %}
{% block sidebar %}
@ -6,6 +7,7 @@
{% if sidebar_object_list %}
<section>
{% comment %}Translators: in page detail sidebar{% endcomment %}
<h4 class="title is-4">{% trans "Latest news" %}</h4>
{% for object in sidebar_object_list %}

View File

@ -1,12 +1,3 @@
{% extends "aircox/page_list.html" %}
{% load i18n aircox %}
{% block title %}
{% if parent %}
{% with parent.title as parent %}
{% blocktrans %}Articles of {{ parent }}{% endblocktrans %}
{% endwith %}
{% else %}{{ block.super }}{% endif %}
{% endblock %}
{% comment %}List of articles{% endcomment %}

View File

@ -1,8 +1,12 @@
{% comment %}
Context:
Base website template. It displays various elements depending on context
variables.
Usefull context:
- cover: image cover
- site: current website
- has_filters: display filter bar (using block "filters")
- model: view model or displayed `object`'s
- sidebar_object_list: item to display in sidebar
- sidebar_url_name: url name sidebar item complete list
- sidebar_url_parent: parent page for sidebar items complete list
@ -93,6 +97,7 @@ Blocks:
{% block main %}
{% if has_filters %}
{% comment %}Translators: extra toolbar displayed on the top of page lists {% endcomment %}
<nav class="navbar toolbar"
aria-label="{% trans "list filters" %}">
{% block filters %}{% endblock %}
@ -102,6 +107,7 @@ Blocks:
</main>
{% if has_sidebar %}
{% comment %}Translators: main sidebar {% endcomment %}
<aside class="column is-one-third-desktop">
{# FIXME: block cover into sidebar one #}
{% block cover %}

View File

@ -1,27 +0,0 @@
{% load static %}
<html>
<head>
<title>Aircox</title>
<link rel="stylesheet" href="{% static 'aircox/css/layout.css' %}" type="text/css" />
</head>
<body>
<sidebar class="sidebar main-sidebar">
</sidebar>
<main>
{% block title %}
<h1>{{ title|default:"Aircox" }}</h1>
{% endblock %}
<div class="content">
{% block content %}
{% endblock %}
</div>
</main>
</body>
</html>

View File

@ -1,193 +0,0 @@
{% extends "admin/base_site.html" %}
{% load i18n %}
{% load static %}
{% block title %}
{% trans "Streamer monitor" %}
{% endblock %}
{% block content %}
<style>
.actions button {
padding: 0em;
margin: 0.2em;
text-align: center;
}
.actions button img {
max-width: 2em;
max-height: 2em;
}
.sources img {
max-width: 2.5em;
max-height: 2em;
}
.float_right {
float: right;
}
.table_section_header {
font-style: italic;
}
section.station {
padding: 0.4em;
font-size: 0.9em;
}
section.station .sources {
width: 100%;
}
section.station .name {
width: 15em;
}
section.station .file {
color: #007EDF;
}
section.station .actions {
width: 4em;
text-align: right;
}
section.station .sources .current:before {
content: '▶';
color: red;
margin: 0em 1em;
}
</style>
<script>
var Monitor = {
get_token: function () {
return document.cookie.replace(/.*csrftoken=([^;]+)(;.*|$)/, '$1');
},
run: function(action, station, source) {
var params = 'station=' + station + '&&action=' + action;
if(source)
params += '&&source=' + source;
var req = new XMLHttpRequest()
req.open('POST', '{% url 'aircox.monitor' %}', false);
req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
req.setRequestHeader("Content-length", params.length);
req.setRequestHeader("Connection", "close");
req.setRequestHeader("X-CSRFToken", this.get_token());
req.send(params);
this.update();
},
update: function(timeout) {
var req = new XMLHttpRequest()
req.open('GET', '{% url 'aircox.monitor' %}', true);
req.onreadystatechange = function() {
if(req.readyState != 4 || (req.status != 200 && req.status != 0))
return;
var doc = document.implementation.createHTMLDocument('xhr')
.documentElement;
doc.innerHTML = req.responseText;
document.getElementById('stations').innerHTML =
doc.querySelector('#stations').innerHTML;
if(timeout)
window.setTimeout(
function() { Monitor.update(timeout);}, timeout
);
};
req.send();
},
}
Monitor.update(50000);
</script>
<header>
<h1>{% trans "Streamer monitor" %}</h1>
<input type="button" onclick="Monitor.update();"
value="{% trans "refresh" %}">
</header>
<div id='stations'>
{% for station in stations %}
<section class="station">
<header>
<h2>{{ station.name }}</h2>
</header>
<table cellspacing="0" cellpadding="0" class="sources object">
<tr>
<th class="name" colspan=2>{{ station.name }}</th>
<td>
{% with station.streamer.source.name as current_source %}
{% blocktrans %}
Current source: {{ current_source }}
{% endblocktrans %}
{% endwith %}
</td>
<td class="actions">
<button onclick="Monitor.run('restart', '{{ station.name }}');">
<img src="{% static "aircox/images/redo.png" %}" alt="{% trans "restart" %}"></button>
<button onclick="Monitor.run('skip', '{{ station.name }}');">
<img src="{% static "aircox/images/playback_next.png" %}" alt="{% trans "skip" %}"></button>
</td>
</tr>
<tr class="table_section_header">
<td colspan=2>{% trans "Source" %}</td>
<td>{% trans "File" %}</td>
<td>{% trans "Actions*" %}</td>
</tr>
{% for source in station.sources %}
<tr class="source">
<td class="name">
{% if source.is_dealer %}
{% trans "Diffusions" %}
{% else %}
{{ source.name }}
{% endif %}
</td>
<td class="source_info">
{% if source.name == station.streamer.source.name %}
<img src="{% static "aircox/images/play.png" %}" alt="{% trans "current" %}">
{% endif %}
{% if source.is_dealer %}
<img src="{% static "aircox/images/calendar_month.png" %}" alt="{% trans "diffusions" %}">
{% elif not source.program.is_show %}
<img src="{% static "aircox/images/schuffle.png" %}" alt="{% trans "stream" %}">
{% endif %}
</td>
<td class="file">
{% if source.is_dealer %}
{{ source.playlist|join:"<br>" }}
{% else %}
{{ source.sound }}
{% endif %}
</td>
<td class="actions">
<button onclick="Monitor.run('restart', '{{ station.name }}', '{{ source.name }}');">
<img src="{% static "aircox/images/redo.png" %}" alt="{% trans "restart" %}"></button>
<button onclick="Monitor.run('skip', '{{ station.name }}', '{{ source.name }}');">
<img src="{% static "aircox/images/playback_next.png" %}" alt="{% trans "skip" %}"></button>
</td>
</tr>
{% endfor %}
</table>
</section>
{% endfor %}
<div class="info small">
{% blocktrans %}
*: Due to some technical issues, it might take up to 30 seconds to execute the given action.
{% endblocktrans %}
</div>
</div>
{% endblock %}

View File

@ -1,106 +0,0 @@
{% extends "admin/base_site.html" %}
{# {% extends "aircox/controllers/base_site.html" %} #}
{% load i18n %}
{% load tz %}
{% localtime on %}
{% block title %}
{% trans "Statistics of the stations" %}
{% endblock %}
{% block content %}
<header>
<h1>{% trans "Statistics of the stations" %}</h1>
{# TODO here #}
<form action="?" method="GET">
{% trans "Go to this date:" %}
<input name="day" type="number" placeholder="{% trans "day" %}"
value="{{ statistics.0.date.day }}"></input>
<input name="month" type="number" placeholder="{% trans "month" %}"
value="{{ statistics.0.date.month }}"></input>
<input name="year" type="number" placeholder="{% trans "year" %}"
value="{{ statistics.0.date.year }}"></input>
<input type="submit" value="{% trans "Show" %}">
</form>
</header>
{% for stats in statistics %}
<section class="station">
<header>
<h2>{{ stats.station.name }},
{{ stats.date|date:'l d F Y' }}</h2>
</header>
<table cellspacing="0" cellpadding="0" class="object">
<tr class="header">
<th>{% trans "Date" %}</th>
<th width="10%">{% trans "Type" %}
{# Translators "Header for statistics view" #}
<th width="50%">{% trans "Diffusion or sound played" %}
<th width="30%">{% trans "Tags" %}</th>
</tr>
{% for item in stats.items %}
<tr>
<th>{{ item.date|time:"H:i" }}</th>
<th>{{ item.type }}</th>
<th>{{ item.name }}</th>
<th>{% for tag,count in item.tags.items %}
{{ tag }}: {{ count }};
{% endfor %}</th>
</tr>
{% for track in item.tracks %}
<tr class="subdata" tags="{{ track.tags.all|join:', '}}">
<td>{{ track.date|time:"H:i" }}</td>
<td>{% trans "Track" %}</td>
<td>{{ track.artist }} -- <emph>{{ track.title }}</emph> {{ track.version }}</td>
<td>{{ track.tags.all|join:', ' }}</td>
</tr>
{% endfor %}
{% endfor %}
<tr class="bottom">
<th>{{ stats.date|date:'d/m/Y' }}</th>
<th>{% trans "Total" %}</th>
<th>
{% with stats.items|length as items_count %}
{% with stats.count as tracks_count %}
{% blocktrans %}
{{ items_count }} items, with a total of {{ tracks_count }} tracks
{% endblocktrans %}
{% endwith %}
{% endwith %}
</th>
<th>
<script>
var tracks = document.querySelectorAll('.subdata[tags]');
var tags = {}
for(var i = 0; i < tracks.length; i++) {
var tags_ = tracks[i].getAttribute('tags').split(', ');
for(var j = 0; j < tags_.length; j++) {
var tag = tags_[j];
tags[tag] = (tags[tag] || 0) + 1;
}
}
for(var tag in tags) {
document.write('<span>' + tag + ': <b>' + tags[tag] + '</b><br>');
}
</script>
</th>
<th>{% for tag, count, average in stats.tags %}
<span>{{ tag }}: <b>{{ average|floatformat }}%</b> ({{ count }})<br>
{% endfor %}
</th>
</tr>
</table>
</section>
{% endfor %}
{% endblock %}
{% endlocaltime %}

View File

@ -1,4 +1,5 @@
{% extends "aircox/page.html" %}
{% comment %}List of diffusions as a timetable{% endcomment %}
{% load i18n aircox humanize %}
{% block title %}

View File

@ -1,4 +1,5 @@
{% extends "aircox/program_base.html" %}
{% comment %}List of a show's episodes for a specific{% endcomment %}
{% load i18n %}
{% block header %}{{ block.super }}

View File

@ -1,12 +1,3 @@
{% extends "aircox/page_list.html" %}
{% load i18n aircox %}
{% block title %}
{% if parent %}
{% with parent.title as parent %}
{% blocktrans %}Episodes of {{ parent }}{% endblocktrans %}
{% endwith %}
{% else %}{{ block.super }}{% endif %}
{% endblock %}
{% comment %}List of episodes pages{% endcomment %}

View File

@ -1,4 +1,5 @@
{% extends "aircox/page.html" %}
{% comment %}List of logs for a specific date{% endcomment %}
{% load i18n humanize aircox %}
{% block title %}

View File

@ -1,6 +1,9 @@
{% extends "aircox/base.html" %}
{% load static i18n thumbnail %}
{% comment %}
Base template to display pages (list, detail, whatever). By default extend to
this one instead of "base.html"
Context:
- cover: cover image
- title: title
@ -8,6 +11,7 @@ Context:
{% endcomment %}
{% block head_title %}
{% comment %}Hack to include the page title into the <title> tag.{% endcomment %}
{% block title %}{{ title }}{% endblock %}
&mdash;
{{ station.name }}

View File

@ -1,6 +1,8 @@
{% extends "aircox/page.html" %}
{% load static i18n humanize honeypot %}
{% comment %}
Base template used to display a page
Context:
- title: title
- page: page

View File

@ -1,11 +1,15 @@
{% extends "aircox/page.html" %}
{% comment %}Display a list of pages{% endcomment %}
{% load i18n aircox %}
{% block title %}
{% if not parent %}{{ view.model|verbose_name:True|title }}
{% else %}
{% with parent.title as title %}
{% blocktrans %}Publications of {{ title }}{% endblocktrans %}
{% 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 %}
{% endwith %}
{% endwith %}
{% endif %}
{% endblock %}
@ -78,6 +82,7 @@
{% else %}
<a class="pagination-previous" disabled>
{% endif %}
{% comment %}Translators: Bottom of the list, "previous page"{% endcomment %}
{% trans "Previous" %}</a>
{% if page_obj.has_next %}
@ -85,6 +90,7 @@
{% else %}
<a class="pagination-next" disabled>
{% endif %}
{% comment %}Translators: Bottom of the list, "Nextpage"{% endcomment %}
{% trans "Next" %}</a>
<ul class="pagination-list">

View File

@ -1,4 +1,5 @@
{% extends "aircox/page_detail.html" %}
{% comment %}Base template used to display informations of a specific show{% endcomment %}
{% load i18n %}
{% block sidebar_title %}

View File

@ -1,4 +1,5 @@
{% extends "aircox/program_base.html" %}
{% comment %}Detail page of a show{% endcomment %}
{% load i18n %}
{% block header %}

View File

@ -1,3 +1,8 @@
{% comment %}
Header displaying informations of a program.
FIXME: consider moving into the "widgets" directory.
{% endcomment %}
{% load i18n %}
<section class="is-size-5 has-text-weight-bold">
{% for schedule in program.schedule_set.all %}

View File

@ -32,6 +32,7 @@ An empty date results to a title or a separator
name="date" value="{{ date|date:"Y-m-d" }}">
</div>
<div class="control">
{% comment %}Translators: form button to select a date{% endcomment %}
<button class="button is-primary">{% trans "Go" %}</button>
</div>
</div>

View File

@ -1,13 +1,15 @@
{% extends "aircox/widgets/page_item.html" %}
{% load i18n easy_thumbnails_tags aircox %}
{% comment %}
List item for an episode.
Context variables:
- object: episode
- diffusion: episode's diffusion
- hide_schedule: if True, do not display start time
{% endcomment %}
{% load i18n easy_thumbnails_tags aircox %}
{% block title %}
{% if not object.is_published and object.program.is_published %}
<a href="{{ object.program.get_absolute_url }}">{{ object.title }}</a>

View File

@ -1,5 +1,7 @@
{% load i18n aircox %}
{% comment %}
List item for a log, either for a logged track or diffusion (as diffusion).
Context objects:
- object: object to render
- hide_schedule: if true, hide the schedule

View File

@ -1,5 +1,7 @@
{% load i18n easy_thumbnails_tags aircox %}
{% comment %}
List item for a page
Context variables:
- object: the object to render
- render_card: render as card

View File

@ -1,11 +1,14 @@
{% load i18n %}
{% comment %}
The audio player
{% endcomment %}
{% if audio_streams %}
<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" %}">
aria-description="{% trans "Audio player used to listen to the radio and podcasts" %}">
<noscript>
<audio src="{{ audio_streams.0 }}" controls>
{% for stream in audio_streams %}

View File

@ -1,3 +1,7 @@
{% comment %}
List item for a podcast.
{% endcomment %}
<div class="podcast">
{% if object.embed %}
{{ object.embed|safe }}

View File

@ -1,4 +1,6 @@
{% comment %}
List item for a track
Context:
- object: track to render
{% endcomment %}

View File

@ -10,8 +10,12 @@ register = template.Library()
@register.filter(name='verbose_name')
def do_verbose_name(obj, plural=False):
""" Return model's verbose name (singular or plural) """
return obj._meta.verbose_name_plural if plural else \
"""
Return model's verbose name (singular or plural) or `obj` if it is a
string (can act for default values).
"""
return obj if isinstance(obj, str) else \
obj._meta.verbose_name_plural if plural else \
obj._meta.verbose_name
@register.simple_tag(name='update_query')

View File

@ -56,6 +56,12 @@ class BaseView(TemplateResponseMixin, ContextMixin):
streams = streams and streams.split('\n')
kwargs['audio_streams'] = streams
if 'model' not in kwargs:
model = getattr(self, 'model', None) or hasattr(self, 'object') and \
type(self.object)
kwargs['model'] = model
return super().get_context_data(**kwargs)

View File

@ -0,0 +1,130 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-01-06 14:15+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: models.py:37
msgid "input"
msgstr ""
#: models.py:38
msgid "output"
msgstr ""
#: models.py:56
msgid "station"
msgstr ""
#: models.py:58
msgid "direction"
msgstr ""
#: models.py:59
msgid "type"
msgstr ""
#: models.py:61
msgid "active"
msgstr ""
#: models.py:62
msgid "this port is active"
msgstr ""
#: models.py:65
msgid "port settings"
msgstr ""
#: models.py:66
msgid ""
"list of comma separated params available; this is put in the output config "
"file as raw code; plugin related"
msgstr ""
#: templates/aircox_streamer/source_item.html:19
msgid "Synchronize source with Liquidsoap"
msgstr ""
#: templates/aircox_streamer/source_item.html:23
msgid "Synchronise"
msgstr ""
#: templates/aircox_streamer/source_item.html:26
msgid "Restart current track"
msgstr ""
#: templates/aircox_streamer/source_item.html:30
msgid "Restart"
msgstr ""
#: templates/aircox_streamer/source_item.html:33
msgid "Skip current file"
msgstr ""
#: templates/aircox_streamer/source_item.html:34
msgid "Skip"
msgstr ""
#: templates/aircox_streamer/source_item.html:43
msgid "Add sound"
msgstr ""
#: templates/aircox_streamer/source_item.html:51
msgid "Select a sound"
msgstr ""
#: templates/aircox_streamer/source_item.html:53
msgid "Add a sound to the queue (queue may start playing)"
msgstr ""
#: templates/aircox_streamer/source_item.html:62
msgid "Add"
msgstr ""
#: templates/aircox_streamer/source_item.html:68
msgid "Sounds in queue"
msgstr ""
#: templates/aircox_streamer/source_item.html:86
msgid "Status"
msgstr ""
#: templates/aircox_streamer/source_item.html:96
msgid "Air time"
msgstr ""
#: templates/aircox_streamer/source_item.html:106
msgid "Time left"
msgstr ""
#: templates/aircox_streamer/source_item.html:114
msgid "Data source"
msgstr ""
#: templates/aircox_streamer/streamer.html:19
msgid "Reload"
msgstr ""
#: templates/aircox_streamer/streamer.html:26
#: templates/aircox_streamer/streamer.html:27
msgid "Select a station"
msgstr ""
#: urls.py:9 views.py:9
msgid "Streamer Monitor"
msgstr ""

View File

@ -1,3 +1,4 @@
{% comment %}List item for a source.{% endcomment %}
{% load i18n %}
<section class="box"><div class="columns is-desktop">

View File

@ -1,4 +1,5 @@
{% extends "admin/base_site.html" %}
{% comment %}Admin tools used to manage the streamer.{% endcomment %}
{% load i18n static %}
{% block extrastyle %}{{ block.super }}

View File

@ -1,4 +1,4 @@
Django>=2.2.0
Django>=2.2.0,<3.0.0
djangorestframework>=3.9.4
django-model-utils>=3.2.0
django-filter>=2.2.0