From db7a8ca36588c61e3144110b940475b507218150 Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sun, 29 Oct 2023 22:25:05 +0100 Subject: [PATCH] =?UTF-8?q?Titre=20adapt=C3=A9=20avec=20accord?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../locale/fr/LC_MESSAGES/django.po | 214 ++++++++++++++++++ .../migrations/0009_category_plural.py | 19 ++ ...emove_category_plural_category_alt_name.py | 23 ++ src/agenda_culturel/models.py | 1 + .../agenda_culturel/page-events.html | 7 +- src/agenda_culturel/urls.py | 6 +- src/agenda_culturel/views.py | 2 +- src/scripts/create_categories.py | 20 +- 8 files changed, 277 insertions(+), 15 deletions(-) create mode 100644 src/agenda_culturel/locale/fr/LC_MESSAGES/django.po create mode 100644 src/agenda_culturel/migrations/0009_category_plural.py create mode 100644 src/agenda_culturel/migrations/0010_remove_category_plural_category_alt_name.py diff --git a/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po new file mode 100644 index 0000000..0e73d1c --- /dev/null +++ b/src/agenda_culturel/locale/fr/LC_MESSAGES/django.po @@ -0,0 +1,214 @@ +# Traductions en français de agenda_culturel. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Jean-Marie Favreau , 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: agenda_culturel\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-10-29 21:20+0000\n" +"PO-Revision-Date: 2023-10-29 14:16+0000\n" +"Last-Translator: Jean-Marie Favreau \n" +"Language-Team: Jean-Marie Favreau \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: agenda_culturel/models.py:25 +msgid "Name" +msgstr "Nom" + +#: agenda_culturel/models.py:25 +msgid "Category name" +msgstr "Nom de la catégorie" + +#: agenda_culturel/models.py:26 +msgid "Alternative Name" +msgstr "Nom alternatif" + +#: agenda_culturel/models.py:26 +msgid "Alternative name used with a time period" +msgstr "Nom alternatif utilisé avec une période de temps" + +#: agenda_culturel/models.py:27 +#, fuzzy +#| msgid "Short title" +msgid "Short name" +msgstr "Nom court" + +#: agenda_culturel/models.py:27 +msgid "Short name of the category" +msgstr "Nom court de la catégorie" + +#: agenda_culturel/models.py:28 +msgid "Color" +msgstr "Couleur" + +#: agenda_culturel/models.py:28 +msgid "Color used as background for the category" +msgstr "Couleur utilisée comme fond de la catégorie" + +#: agenda_culturel/models.py:53 agenda_culturel/models.py:70 +msgid "Category" +msgstr "Catégorie" + +#: agenda_culturel/models.py:54 +msgid "Categories" +msgstr "Catégories" + +#: agenda_culturel/models.py:59 +msgid "Published" +msgstr "Publié" + +#: agenda_culturel/models.py:60 +msgid "Trash" +msgstr "Corbeille" + +#: agenda_culturel/models.py:61 +msgid "Draft" +msgstr "Brouillon" + +#: agenda_culturel/models.py:66 +msgid "Title" +msgstr "Titre" + +#: agenda_culturel/models.py:66 +msgid "Short title" +msgstr "Titre court" + +#: agenda_culturel/models.py:68 +msgid "Status" +msgstr "Status" + +#: agenda_culturel/models.py:70 +#, fuzzy +#| msgid "Day of the event" +msgid "Category of the event" +msgstr "Date de l'événement" + +#: agenda_culturel/models.py:72 +msgid "Day of the event" +msgstr "Date de l'événement" + +#: agenda_culturel/models.py:73 +msgid "Starting time" +msgstr "Heure de début" + +#: agenda_culturel/models.py:75 +msgid "End day of the event" +msgstr "Fin de l'événement" + +#: agenda_culturel/models.py:75 +msgid "End day of the event, only required if different from the start day." +msgstr "" +"Date de fin de l'événement, uniquement nécessaire s'il est différent du " +"premier jour de l'événement" + +#: agenda_culturel/models.py:76 +msgid "Final time" +msgstr "Heure de fin" + +#: agenda_culturel/models.py:78 +msgid "Location" +msgstr "Localisation" + +#: agenda_culturel/models.py:78 +msgid "Address of the event" +msgstr "Adresse de l'événement" + +#: agenda_culturel/models.py:80 +msgid "Description" +msgstr "Description" + +#: agenda_culturel/models.py:80 +msgid "General description of the event" +msgstr "Description générale de l'événement" + +#: agenda_culturel/models.py:82 +msgid "Illustration" +msgstr "Illustration" + +#: agenda_culturel/models.py:82 +msgid "URL of the illustration image" +msgstr "URL de l'image illustrative" + +#: agenda_culturel/models.py:83 +msgid "Illustration description" +msgstr "Description de l'illustration" + +#: agenda_culturel/models.py:83 +msgid "Alternative text used by screen readers for the image" +msgstr "Texte alternatif utiliser par les lecteurs d'écrans pour l'image" + +#: agenda_culturel/models.py:85 +msgid "URLs" +msgstr "URLs" + +#: agenda_culturel/models.py:85 +msgid "List of all the urls where this event can be found." +msgstr "Liste de toutes les urls où l'événement peut être trouvé." + +#: agenda_culturel/models.py:87 +msgid "Tags" +msgstr "Étiquettes" + +#: agenda_culturel/models.py:87 +msgid "A list of tags that describe the event." +msgstr "Une liste d'étiquettes décrivant l'événement" + +#: agenda_culturel/models.py:96 +msgid "Event" +msgstr "Événement" + +#: agenda_culturel/models.py:97 +msgid "Events" +msgstr "Événements" + +#: agenda_culturel/models.py:101 +#, fuzzy +#| msgid "URLs" +msgid "URL" +msgstr "URLs" + +#: agenda_culturel/models.py:101 +#, fuzzy +#| msgid "List of all the urls where this event can be found." +msgid "URL where this event can be found." +msgstr "Liste de toutes les urls où l'événement peut être trouvé." + +#: agenda_culturel/models.py:105 +msgid "Event submission form" +msgstr "Formulaire de proposition d'événement" + +#: agenda_culturel/models.py:106 +msgid "Event submissions forms" +msgstr "Formulaires de proposition d'événement" + +#: agenda_culturel/settings/base.py:122 +msgid "English" +msgstr "anglais" + +#: agenda_culturel/settings/base.py:123 +msgid "French" +msgstr "français" + +msgid "this week" +msgstr "cette semaine" + +msgid "this weekend" +msgstr "ce week-end" + +msgid "next week" +msgstr "la semaine prochaine" + +msgid "next weekend" +msgstr "le week-end prochain" + +msgid "this month" +msgstr "ce mois-ci" + +msgid "next month" +msgstr "le mois prochain" diff --git a/src/agenda_culturel/migrations/0009_category_plural.py b/src/agenda_culturel/migrations/0009_category_plural.py new file mode 100644 index 0000000..ceba810 --- /dev/null +++ b/src/agenda_culturel/migrations/0009_category_plural.py @@ -0,0 +1,19 @@ +# Generated by Django 4.2.1 on 2023-10-29 21:14 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('agenda_culturel', '0008_alter_event_reference_urls_alter_event_tags'), + ] + + operations = [ + migrations.AddField( + model_name='category', + name='plural', + field=models.CharField(default='1', help_text='Category name (plural)', max_length=512, verbose_name='Plural nName'), + preserve_default=False, + ), + ] diff --git a/src/agenda_culturel/migrations/0010_remove_category_plural_category_alt_name.py b/src/agenda_culturel/migrations/0010_remove_category_plural_category_alt_name.py new file mode 100644 index 0000000..812b55a --- /dev/null +++ b/src/agenda_culturel/migrations/0010_remove_category_plural_category_alt_name.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.1 on 2023-10-29 21:22 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('agenda_culturel', '0009_category_plural'), + ] + + operations = [ + migrations.RemoveField( + model_name='category', + name='plural', + ), + migrations.AddField( + model_name='category', + name='alt_name', + field=models.CharField(default='1', help_text='Alternative name used with a time period', max_length=512, verbose_name='Alternative Name'), + preserve_default=False, + ), + ] diff --git a/src/agenda_culturel/models.py b/src/agenda_culturel/models.py index 7686bbe..49c8f04 100644 --- a/src/agenda_culturel/models.py +++ b/src/agenda_culturel/models.py @@ -23,6 +23,7 @@ class Category(models.Model): ("#b33dc6", "color 9")] name = models.CharField(verbose_name=_('Name'), help_text=_('Category name'), max_length=512) + alt_name = models.CharField(verbose_name=_('Alternative Name'), help_text=_('Alternative name used with a time period'), max_length=512) codename = models.CharField(verbose_name=_('Short name'), help_text=_('Short name of the category'), max_length=3) color = ColorField(verbose_name=_('Color'), help_text=_('Color used as background for the category'), blank=True, null=True) diff --git a/src/agenda_culturel/templates/agenda_culturel/page-events.html b/src/agenda_culturel/templates/agenda_culturel/page-events.html index eaa7895..d944a28 100644 --- a/src/agenda_culturel/templates/agenda_culturel/page-events.html +++ b/src/agenda_culturel/templates/agenda_culturel/page-events.html @@ -37,7 +37,12 @@
{% block events %} -

{{ selected_mode | capfirst }}

+

{% if category %} + {{ category.alt_name | capfirst }} + {{ selected_mode }} + {% else %} + {{ selected_mode | capfirst }} + {% endif %}

{% endblock %}