Compare commits

..

No commits in common. "c102cf936e1b50e674af12b53b5a6acc0623f13b" and "7369d2d8d386bfddb33f5d4ad1c117c93c0f847d" have entirely different histories.

7 changed files with 76 additions and 108 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Aircox 0.1\n" "Project-Id-Version: Aircox 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-07 08:18+0100\n" "POT-Creation-Date: 2024-04-28 18:57+0000\n"
"PO-Revision-Date: 2016-10-10 16:00+02\n" "PO-Revision-Date: 2016-10-10 16:00+02\n"
"Last-Translator: Aarys\n" "Last-Translator: Aarys\n"
"Language-Team: Aircox's translators team\n" "Language-Team: Aircox's translators team\n"
@ -22,7 +22,7 @@ msgstr ""
msgid "start" msgid "start"
msgstr "début" msgstr "début"
#: admin/diffusion.py:31 models/diffusion.py:127 models/program.py:182 #: admin/diffusion.py:31 models/diffusion.py:127 models/program.py:172
msgid "end" msgid "end"
msgstr "fin" msgstr "fin"
@ -38,7 +38,7 @@ msgstr "Depuis"
msgid "Until" msgid "Until"
msgstr "Jusque" msgstr "Jusque"
#: admin/filters.py:28 models/page.py:282 tests/admin/test_filters.py:53 #: admin/filters.py:28 models/page.py:289 tests/admin/test_filters.py:53
msgid "None" msgid "None"
msgstr "Aucun" msgstr "Aucun"
@ -88,7 +88,7 @@ msgstr "temps"
msgid "Search" msgid "Search"
msgstr "Chercher" msgstr "Chercher"
#: filters.py:36 models/episode.py:135 #: filters.py:36 models/episode.py:131
msgid "Podcast" msgid "Podcast"
msgstr "Podcast" msgstr "Podcast"
@ -140,33 +140,31 @@ msgstr "éditer les dates de diffusion"
msgid "rerun" msgid "rerun"
msgstr "rediffusion" msgstr "rediffusion"
#: models/episode.py:61 templates/aircox/dashboard/statistics.html:29 #: models/episode.py:60 templates/aircox/dashboard/statistics.html:29
msgid "Episode" msgid "Episode"
msgstr "Épisode" msgstr "Épisode"
#: models/episode.py:62 #: models/episode.py:61
#: templates/aircox/dashboard/widgets/program_episodes.html:4
#: templates/aircox/program_form.html:10
msgid "Episodes" msgid "Episodes"
msgstr "Épisodes" msgstr "Épisodes"
#: models/episode.py:122 models/page.py:344 models/track.py:35 #: models/episode.py:118 models/page.py:351 models/track.py:35
msgid "order" msgid "order"
msgstr "ordre" msgstr "ordre"
#: models/episode.py:124 models/track.py:37 #: models/episode.py:120 models/track.py:37
msgid "position in the playlist" msgid "position in the playlist"
msgstr "position dans la playlist" msgstr "position dans la playlist"
#: models/episode.py:127 models/sound.py:59 #: models/episode.py:123 models/sound.py:59
msgid "Broadcast" msgid "Broadcast"
msgstr "Broadcast" msgstr "Broadcast"
#: models/episode.py:129 models/sound.py:61 #: models/episode.py:125 models/sound.py:61
msgid "The sound is broadcasted on air" msgid "The sound is broadcasted on air"
msgstr "Le son est radiodiffusé" msgstr "Le son est radiodiffusé"
#: models/episode.py:136 templates/aircox/episode_detail.html:16 #: models/episode.py:132 templates/aircox/episode_detail.html:16
#: templates/aircox/episode_form.html:11 templates/aircox/episode_list.html:8 #: templates/aircox/episode_form.html:11 templates/aircox/episode_list.html:8
msgid "Podcasts" msgid "Podcasts"
msgstr "Podcasts" msgstr "Podcasts"
@ -215,7 +213,7 @@ msgstr "stop"
msgid "other" msgid "other"
msgstr "autre" msgstr "autre"
#: models/log.py:89 models/page.py:342 models/program.py:55 #: models/log.py:89 models/page.py:349 models/program.py:55
#: models/station.py:146 #: models/station.py:146
msgid "station" msgid "station"
msgstr "station" msgstr "station"
@ -257,7 +255,7 @@ msgstr "Log"
msgid "Logs" msgid "Logs"
msgstr "Logs" msgstr "Logs"
#: models/page.py:43 models/page.py:345 models/track.py:45 #: models/page.py:43 models/page.py:352 models/track.py:45
msgid "title" msgid "title"
msgstr "titre" msgstr "titre"
@ -273,8 +271,7 @@ msgstr "Catégorie"
msgid "Categories" msgid "Categories"
msgstr "Catégories" msgstr "Catégories"
#: models/page.py:84 templates/aircox/dashboard/widgets/program_episodes.html:6 #: models/page.py:84
#: views/episode.py:150
msgid "draft" msgid "draft"
msgstr "brouillon" msgstr "brouillon"
@ -294,107 +291,107 @@ msgstr "statut"
msgid "cover" msgid "cover"
msgstr "couverture" msgstr "couverture"
#: models/page.py:102 models/page.py:322 #: models/page.py:103 models/page.py:329
msgid "content" msgid "content"
msgstr "contenu" msgstr "contenu"
#: models/page.py:195 #: models/page.py:202
msgid "category" msgid "category"
msgstr "catégorie" msgstr "catégorie"
#: models/page.py:200 #: models/page.py:207
msgid "publication date" msgid "publication date"
msgstr "date de publication" msgstr "date de publication"
#: models/page.py:202 #: models/page.py:209
msgid "featured" msgid "featured"
msgstr "en avant" msgstr "en avant"
#: models/page.py:206 #: models/page.py:213
msgid "allow comments" msgid "allow comments"
msgstr "autoriser les commentaires" msgstr "autoriser les commentaires"
#: models/page.py:221 #: models/page.py:228
msgid "Publication" msgid "Publication"
msgstr "Publication" msgstr "Publication"
#: models/page.py:222 #: models/page.py:229
msgid "Publications" msgid "Publications"
msgstr "Publications" msgstr "Publications"
#: models/page.py:283 #: models/page.py:290
msgid "Home Page" msgid "Home Page"
msgstr "Page d'accueil" msgstr "Page d'accueil"
#: models/page.py:284 #: models/page.py:291
msgid "Timetable" msgid "Timetable"
msgstr "Horaires" msgstr "Horaires"
#: models/page.py:285 #: models/page.py:292
msgid "Programs list" msgid "Programs list"
msgstr "Liste des émissions" msgstr "Liste des émissions"
#: models/page.py:286 #: models/page.py:293
msgid "Episodes list" msgid "Episodes list"
msgstr "Liste des épisodes" msgstr "Liste des épisodes"
#: models/page.py:287 #: models/page.py:294
msgid "Articles list" msgid "Articles list"
msgstr "Liste des articles" msgstr "Liste des articles"
#: models/page.py:288 #: models/page.py:295
msgid "Publications list" msgid "Publications list"
msgstr "Publications" msgstr "Publications"
#: models/page.py:289 #: models/page.py:296
msgid "Podcasts list" msgid "Podcasts list"
msgstr "Podcasts" msgstr "Podcasts"
#: models/page.py:292 #: models/page.py:299
msgid "attach to" msgid "attach to"
msgstr "attacher à" msgstr "attacher à"
#: models/page.py:297 #: models/page.py:304
msgid "display this page content to related element" msgid "display this page content to related element"
msgstr "Afficher le contenu de cette page pour l'élément sélectionné" msgstr "Afficher le contenu de cette page pour l'élément sélectionné"
#: models/page.py:315 #: models/page.py:322
msgid "related page" msgid "related page"
msgstr "page liée" msgstr "page liée"
#: models/page.py:319 #: models/page.py:326
msgid "nickname" msgid "nickname"
msgstr "pseudo" msgstr "pseudo"
#: models/page.py:320 #: models/page.py:327
msgid "email" msgid "email"
msgstr "email" msgstr "email"
#: models/page.py:335 #: models/page.py:342
msgid "Comment" msgid "Comment"
msgstr "Commentaire" msgstr "Commentaire"
#: models/page.py:336 templates/aircox/page_detail.html:51 #: models/page.py:343 templates/aircox/page_detail.html:51
msgid "Comments" msgid "Comments"
msgstr "Commentaires" msgstr "Commentaires"
#: models/page.py:343 #: models/page.py:350
msgid "menu" msgid "menu"
msgstr "menu" msgstr "menu"
#: models/page.py:346 #: models/page.py:353
msgid "url" msgid "url"
msgstr "url" msgstr "url"
#: models/page.py:351 #: models/page.py:358
msgid "page" msgid "page"
msgstr "page" msgstr "page"
#: models/page.py:357 #: models/page.py:364
msgid "Menu item" msgid "Menu item"
msgstr "Élément du menu" msgstr "Élément du menu"
#: models/page.py:358 #: models/page.py:365
msgid "Menu items" msgid "Menu items"
msgstr "Éléments de menu" msgstr "Éléments de menu"
@ -414,7 +411,7 @@ msgstr "synchroniser"
msgid "update later diffusions according to schedule changes" msgid "update later diffusions according to schedule changes"
msgstr "met à jour les dates de diffusion à venir lorsque l'horaire change" msgstr "met à jour les dates de diffusion à venir lorsque l'horaire change"
#: models/program.py:66 permissions.py:18 #: models/program.py:66 permissions.py:17
msgid "editors" msgid "editors"
msgstr "éditeurs" msgstr "éditeurs"
@ -423,23 +420,23 @@ msgstr "éditeurs"
msgid "Programs" msgid "Programs"
msgstr "Émissions" msgstr "Émissions"
#: models/program.py:167 models/rerun.py:42 #: models/program.py:157 models/rerun.py:42
msgid "related program" msgid "related program"
msgstr "émission apparentée" msgstr "émission apparentée"
#: models/program.py:170 #: models/program.py:160
msgid "delay" msgid "delay"
msgstr "délai" msgstr "délai"
#: models/program.py:173 #: models/program.py:163
msgid "minimal delay between two sound plays" msgid "minimal delay between two sound plays"
msgstr "délai minimum entre deux sons joués" msgstr "délai minimum entre deux sons joués"
#: models/program.py:176 #: models/program.py:166
msgid "begin" msgid "begin"
msgstr "début" msgstr "début"
#: models/program.py:179 models/program.py:185 #: models/program.py:169 models/program.py:175
msgid "used to define a time range this stream is played" msgid "used to define a time range this stream is played"
msgstr "utilisé pour définir une période durant lequel ce stream est joué" msgstr "utilisé pour définir une période durant lequel ce stream est joué"
@ -553,6 +550,8 @@ msgid "downloadable"
msgstr "téléchargeable" msgstr "téléchargeable"
#: models/sound.py:55 #: models/sound.py:55
#, fuzzy
#| msgid "sound can be downloaded by visitors"
msgid "Sound can be downloaded by website visitors." msgid "Sound can be downloaded by website visitors."
msgstr "Le son peut être téléchargé par les visiteurs du site." msgstr "Le son peut être téléchargé par les visiteurs du site."
@ -707,7 +706,7 @@ msgstr "Séparateur de l'éditeur de playlist"
msgid " By %(filter_title)s " msgid " By %(filter_title)s "
msgstr "Par %(filter_title)s " msgstr "Par %(filter_title)s "
#: templates/aircox/base.html:71 #: templates/aircox/base.html:70
msgid "Main menu" msgid "Main menu"
msgstr "Menu principal" msgstr "Menu principal"
@ -736,7 +735,8 @@ msgid "Last Comments"
msgstr "Derniers commentaires" msgstr "Derniers commentaires"
#: templates/aircox/dashboard/statistics.html:4 #: templates/aircox/dashboard/statistics.html:4
#: templates/aircox/widgets/nav.html:41 views/admin.py:35 #: templates/aircox/widgets/nav.html:41 tests/test_admin_site.py:40
#: views/admin.py:35
msgid "Statistics" msgid "Statistics"
msgstr "Statistiques" msgstr "Statistiques"
@ -905,56 +905,53 @@ msgid "Post comment"
msgstr "Commenter" msgstr "Commenter"
#: templates/aircox/page_form.html:14 #: templates/aircox/page_form.html:14
#, python-format #, fuzzy, python-format
#| msgid "Create a %(model)s"
msgid "Create a %(model)s" msgid "Create a %(model)s"
msgstr "Ajouter un %(model)s" msgstr "Ajouter %(models)s"
#: templates/aircox/page_form.html:34 #: templates/aircox/page_form.html:28
msgid "Select an image" msgid "Select an image"
msgstr "Sélectionner une image" msgstr "Sélectionner une image"
#: templates/aircox/page_form.html:50 #: templates/aircox/page_form.html:44
msgid "Are you sure you want to remove this item from server?" msgid "Are you sure you want to remove this item from server?"
msgstr "Êtes-vous sûr de vouloir retirer ce fichier du serveur?" msgstr "Êtes-vous sûr de vouloir retirer ce fichier du serveur?"
#: templates/aircox/page_form.html:97 #: templates/aircox/page_form.html:91
msgid "Change cover" msgid "Change cover"
msgstr "Changer de couverture" msgstr "Changer de couverture"
#: templates/aircox/page_form.html:135 #: templates/aircox/page_form.html:125
msgid "Update" msgid "Update"
msgstr "Mise à jour" msgstr "Mise à jour"
#: templates/aircox/program_detail.html:26 #: templates/aircox/program_detail.html:24
#, python-format #, python-format
msgid "Rerun of %(date)s" msgid "Rerun of %(date)s"
msgstr "Rediffusion du %(date)s" msgstr "Rediffusion du %(date)s"
#: templates/aircox/program_detail.html:27 #: templates/aircox/program_detail.html:25
msgid "Rerun" msgid "Rerun"
msgstr "Rediffusion" msgstr "Rediffusion"
#: templates/aircox/program_detail.html:48 #: templates/aircox/program_detail.html:41
msgid "Last Episodes" msgid "Last Episodes"
msgstr "Derniers Épisodes" msgstr "Derniers Épisodes"
#: templates/aircox/program_detail.html:49 #: templates/aircox/program_detail.html:42
msgid "All episodes" msgid "All episodes"
msgstr "Tous les épisodes" msgstr "Tous les épisodes"
#: templates/aircox/program_detail.html:56 #: templates/aircox/program_detail.html:49
msgid "Last Articles" msgid "Last Articles"
msgstr "Derniers articles" msgstr "Derniers articles"
#: templates/aircox/program_detail.html:57 #: templates/aircox/program_detail.html:50
msgid "All articles" msgid "All articles"
msgstr "Tous les articles" msgstr "Tous les articles"
#: templates/aircox/program_form.html:12 #: templates/aircox/program_form.html:13
msgid "New episode"
msgstr "Nouvel épisode"
#: templates/aircox/program_form.html:17
msgid "Editors" msgid "Editors"
msgstr "Éditeurs" msgstr "Éditeurs"
@ -1024,7 +1021,7 @@ msgstr "Prochain"
msgid "Dashboard" msgid "Dashboard"
msgstr "Tableau de bord" msgstr "Tableau de bord"
#: templates/aircox/widgets/nav.html:50 #: templates/aircox/widgets/nav.html:47
msgid "Disconnect" msgid "Disconnect"
msgstr "Déconnexion" msgstr "Déconnexion"
@ -1247,35 +1244,31 @@ msgstr "dashboard/"
msgid "dashboard/program/<pk>/" msgid "dashboard/program/<pk>/"
msgstr "dashboard/emissions/<pk>/" msgstr "dashboard/emissions/<pk>/"
#: urls.py:131 #: urls.py:130
msgid "dashboard/program/<pk>/add-episode/"
msgstr "dashboard/emissions/<pk>/nouvel-episode/"
#: urls.py:133
msgid "dashboard/episodes/<pk>/" msgid "dashboard/episodes/<pk>/"
msgstr "dashboard/episodes/<pk>/" msgstr "dashboard/episodes/<pk>/"
#: urls.py:134 #: urls.py:131
msgid "dashboard/statistics/" msgid "dashboard/statistics/"
msgstr "dashboard/statistiques/" msgstr "dashboard/statistiques/"
#: urls.py:135 #: urls.py:132
msgid "dashboard/statistics/<date:date>/" msgid "dashboard/statistics/<date:date>/"
msgstr "dashboard/statistiques/<date:date>/" msgstr "dashboard/statistiques/<date:date>/"
#: urls.py:136 #: urls.py:133
msgid "dashboard/users/" msgid "dashboard/users/"
msgstr "dashboard/utilisateurs/" msgstr "dashboard/utilisateurs/"
#: urls.py:138 #: urls.py:135
msgid "errors/no-station/" msgid "errors/no-station/"
msgstr "erreurs/pas-de-station/" msgstr "erreurs/pas-de-station/"
#: views/page.py:100 #: views/page.py:89
#, python-brace-format #, python-brace-format
msgid "{model}" msgid "{model}"
msgstr "{model}" msgstr "{model}"
#: views/page.py:210 #: views/page.py:204
msgid "comments are not allowed" msgid "comments are not allowed"
msgstr "les commentaires ne sont pas autorisés" msgstr "les commentaires ne sont pas autorisés"

View File

@ -2,7 +2,6 @@ import os
from django.conf import settings as d_settings from django.conf import settings as d_settings
from django.db import models from django.db import models
from django.urls import reverse
from django.utils.functional import cached_property from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _ from django.utils.translation import gettext_lazy as _
@ -86,9 +85,6 @@ class Episode(ChildPage):
) )
return super().get_init_kwargs_from(page, title=title, program=page, **kwargs) return super().get_init_kwargs_from(page, title=title, program=page, **kwargs)
def get_absolute_url(self):
return reverse(self.detail_url_name, kwargs={"slug": self.slug})
class EpisodeSoundQuerySet(models.QuerySet): class EpisodeSoundQuerySet(models.QuerySet):
def episode(self, episode): def episode(self, episode):

View File

@ -7,11 +7,7 @@
{% endblock %} {% endblock %}
{% block page-form-actions %} {% block page-form-actions %}
<a class="button secondary" href="{% url 'episode-list' parent_slug=object.slug %}">{% trans "Episodes" %}</a>
&nbsp;
<a class="button secondary" href="{% url 'program-add-episode' object.pk %}">{% trans "New episode" %}</a>
{% if object and object.pk and request.user.is_superuser %} {% if object and object.pk and request.user.is_superuser %}
&nbsp;
<button type="button" <button type="button"
class="button secondary" class="button secondary"
@click="$refs['group-users-modal'].open({id: {{ object.editors_group_id }}, name: '{{ object.editors_group.name }}' })">{% translate "Editors" %}</button> @click="$refs['group-users-modal'].open({id: {{ object.editors_group_id }}, name: '{{ object.editors_group.name }}' })">{% translate "Editors" %}</button>

View File

@ -127,9 +127,6 @@ urls = [
# ---- dashboard # ---- dashboard
path(_("dashboard/"), views.dashboard.DashboardView.as_view(), name="dashboard"), path(_("dashboard/"), views.dashboard.DashboardView.as_view(), name="dashboard"),
path(_("dashboard/program/<pk>/"), views.program.ProgramUpdateView.as_view(), name="program-edit"), path(_("dashboard/program/<pk>/"), views.program.ProgramUpdateView.as_view(), name="program-edit"),
path(
_("dashboard/program/<pk>/add-episode/"), views.episode.EpisodeCreateView.as_view(), name="program-add-episode"
),
path(_("dashboard/episodes/<pk>/"), views.episode.EpisodeUpdateView.as_view(), name="episode-edit"), path(_("dashboard/episodes/<pk>/"), views.episode.EpisodeUpdateView.as_view(), name="episode-edit"),
path(_("dashboard/statistics/"), views.dashboard.StatisticsView.as_view(), name="dashboard-statistics"), path(_("dashboard/statistics/"), views.dashboard.StatisticsView.as_view(), name="dashboard-statistics"),
path(_("dashboard/statistics/<date:date>/"), views.dashboard.StatisticsView.as_view(), name="dashboard-statistics"), path(_("dashboard/statistics/<date:date>/"), views.dashboard.StatisticsView.as_view(), name="dashboard-statistics"),

View File

@ -1,7 +1,5 @@
from django.contrib.auth.mixins import UserPassesTestMixin from django.contrib.auth.mixins import UserPassesTestMixin
from django.shortcuts import get_object_or_404
from django.urls import reverse from django.urls import reverse
from django.utils.translation import gettext_lazy as _
from aircox.models import Episode, Program, StaticPage, Track from aircox.models import Episode, Program, StaticPage, Track
from aircox import forms, filters, permissions from aircox import forms, filters, permissions
@ -14,7 +12,6 @@ __all__ = (
"EpisodeDetailView", "EpisodeDetailView",
"EpisodeListView", "EpisodeListView",
"PodcastListView", "PodcastListView",
"EpisodeCreateView",
"EpisodeUpdateView", "EpisodeUpdateView",
) )
@ -142,9 +139,3 @@ class EpisodeUpdateView(UserPassesTestMixin, VueFormDataMixin, PageUpdateView):
if invalid: if invalid:
return self.get(request, **formsets) return self.get(request, **formsets)
return resp return resp
class EpisodeCreateView(EpisodeUpdateView):
def get_object(self):
program = get_object_or_404(Program, pk=self.kwargs["pk"])
return Episode.objects.create(program=program, title="%s (%s)" % (program.title, _("draft")))

View File

@ -19,14 +19,9 @@
<div class="media-content flex-column"> <div class="media-content flex-column">
{% if object|model_name == "Episode" %} {% if object|model_name == "Episode" %}
<div class="episode-date"> <div class="episode-date">
{% if object.status %} {{ object.pub_date|date:"d/m/Y" }}<Br/>
{{ object.pub_date|date:"d/m/Y" }} </div>
{% else %}
{% trans "Draft" %}
{% endif %}
<br/>
</div>
{% endif %} {% endif %}
<a href="{{ url|escape }}" class="heading title {% block title-class %}{% endblock %}"> <a href="{{ url|escape }}" class="heading title {% block title-class %}{% endblock %}">
{% block title %}{{ title|default:"" }}{% endblock %} {% block title %}{{ title|default:"" }}{% endblock %}