From 90cf8c61a56930bb25f490d258109f2d13a2d865 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Fri, 26 Jan 2024 21:16:26 +0100 Subject: [PATCH] Add choices for transfer_type --- sncfgtfs/locale/fr/LC_MESSAGES/django.po | 182 ++++++++++++----------- sncfgtfs/migrations/0001_initial.py | 20 ++- sncfgtfs/models.py | 9 ++ 3 files changed, 122 insertions(+), 89 deletions(-) diff --git a/sncfgtfs/locale/fr/LC_MESSAGES/django.po b/sncfgtfs/locale/fr/LC_MESSAGES/django.po index 1172930..f8a95b7 100644 --- a/sncfgtfs/locale/fr/LC_MESSAGES/django.po +++ b/sncfgtfs/locale/fr/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-26 00:40+0100\n" +"POT-Creation-Date: 2024-01-26 21:12+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Emmy D'Anello \n" "Language-Team: LANGUAGE \n" @@ -40,7 +40,7 @@ msgstr "Pas d'information" msgid "Possible" msgstr "Possible" -#: sncfgtfs/models.py:16 +#: sncfgtfs/models.py:16 sncfgtfs/models.py:46 msgid "Not possible" msgstr "Impossible" @@ -100,334 +100,346 @@ msgstr "Vers l'extérieur" msgid "Inbound" msgstr "Vers l'intérieur" -#: sncfgtfs/models.py:46 sncfgtfs/models.py:170 +#: sncfgtfs/models.py:43 +msgid "Recommended" +msgstr "Recommandé" + +#: sncfgtfs/models.py:44 +msgid "Timed" +msgstr "Correspondance programmée" + +#: sncfgtfs/models.py:45 +msgid "Minimum time" +msgstr "Temps de correspondance minimum requis" + +#: sncfgtfs/models.py:53 sncfgtfs/models.py:177 msgid "Agency ID" msgstr "ID de l'agence" -#: sncfgtfs/models.py:52 +#: sncfgtfs/models.py:59 msgid "Agency name" msgstr "Nom de l'agence" -#: sncfgtfs/models.py:56 +#: sncfgtfs/models.py:63 msgid "Agency URL" msgstr "URL de l'agence" -#: sncfgtfs/models.py:61 +#: sncfgtfs/models.py:68 msgid "Agency timezone" msgstr "Fuseau horaire de l'agence" -#: sncfgtfs/models.py:66 +#: sncfgtfs/models.py:73 msgid "Agency language" msgstr "Langue de l'agence" -#: sncfgtfs/models.py:71 +#: sncfgtfs/models.py:78 msgid "Agency" msgstr "Agence" -#: sncfgtfs/models.py:72 +#: sncfgtfs/models.py:79 msgid "Agencies" msgstr "Agences" -#: sncfgtfs/models.py:79 sncfgtfs/models.py:300 +#: sncfgtfs/models.py:86 sncfgtfs/models.py:307 msgid "Stop ID" msgstr "ID de l'arrêt" -#: sncfgtfs/models.py:84 +#: sncfgtfs/models.py:91 msgid "Stop code" msgstr "Code de l'arrêt" -#: sncfgtfs/models.py:90 +#: sncfgtfs/models.py:97 msgid "Stop name" msgstr "Nom de l'arrêt" -#: sncfgtfs/models.py:95 +#: sncfgtfs/models.py:102 msgid "Stop description" msgstr "Description de l'arrêt" -#: sncfgtfs/models.py:100 +#: sncfgtfs/models.py:107 msgid "Stop longitude" msgstr "Longitude de l'arrêt" -#: sncfgtfs/models.py:104 +#: sncfgtfs/models.py:111 msgid "Stop latitude" msgstr "Latitude de l'arrêt" -#: sncfgtfs/models.py:109 +#: sncfgtfs/models.py:116 msgid "Zone ID" msgstr "ID de la zone" -#: sncfgtfs/models.py:113 +#: sncfgtfs/models.py:120 msgid "Stop URL" msgstr "URL de l'arrêt" -#: sncfgtfs/models.py:118 +#: sncfgtfs/models.py:125 msgid "Location type" msgstr "Type de localisation" -#: sncfgtfs/models.py:127 +#: sncfgtfs/models.py:134 msgid "Parent station" msgstr "Gare parente" -#: sncfgtfs/models.py:133 +#: sncfgtfs/models.py:140 msgid "Stop timezone" msgstr "Fuseau horaire de l'arrêt" -#: sncfgtfs/models.py:139 +#: sncfgtfs/models.py:146 msgid "Level ID" msgstr "ID du niveau" -#: sncfgtfs/models.py:144 +#: sncfgtfs/models.py:151 msgid "Wheelchair boarding" msgstr "Embarquement en fauteuil roulant" -#: sncfgtfs/models.py:152 +#: sncfgtfs/models.py:159 msgid "Platform code" msgstr "Code du quai" -#: sncfgtfs/models.py:156 +#: sncfgtfs/models.py:163 msgid "Stop" msgstr "Arrêt" -#: sncfgtfs/models.py:157 +#: sncfgtfs/models.py:164 msgid "Stops" msgstr "Arrêts" -#: sncfgtfs/models.py:164 sncfgtfs/models.py:226 +#: sncfgtfs/models.py:171 sncfgtfs/models.py:233 msgid "Route ID" msgstr "ID de la ligne" -#: sncfgtfs/models.py:175 +#: sncfgtfs/models.py:182 msgid "Route short name" msgstr "Nom court de la ligne" -#: sncfgtfs/models.py:180 +#: sncfgtfs/models.py:187 msgid "Route long name" msgstr "Nom long de la ligne" -#: sncfgtfs/models.py:185 +#: sncfgtfs/models.py:192 msgid "Route description" msgstr "Description de la ligne" -#: sncfgtfs/models.py:190 +#: sncfgtfs/models.py:197 msgid "Route type" msgstr "Type de ligne" -#: sncfgtfs/models.py:195 +#: sncfgtfs/models.py:202 msgid "Route URL" msgstr "URL de la ligne" -#: sncfgtfs/models.py:201 +#: sncfgtfs/models.py:208 msgid "Route color" msgstr "Couleur de la ligne" -#: sncfgtfs/models.py:207 +#: sncfgtfs/models.py:214 msgid "Route text color" msgstr "Couleur du texte de la ligne" -#: sncfgtfs/models.py:212 +#: sncfgtfs/models.py:219 msgid "Route" msgstr "Ligne" -#: sncfgtfs/models.py:213 +#: sncfgtfs/models.py:220 msgid "Routes" msgstr "Lignes" -#: sncfgtfs/models.py:220 sncfgtfs/models.py:286 +#: sncfgtfs/models.py:227 sncfgtfs/models.py:293 msgid "Trip ID" msgstr "ID du trajet" -#: sncfgtfs/models.py:231 sncfgtfs/models.py:342 sncfgtfs/models.py:390 +#: sncfgtfs/models.py:238 sncfgtfs/models.py:349 sncfgtfs/models.py:397 msgid "Service ID" msgstr "ID du service" -#: sncfgtfs/models.py:236 +#: sncfgtfs/models.py:243 msgid "Trip headsign" msgstr "Destination du trajet" -#: sncfgtfs/models.py:242 +#: sncfgtfs/models.py:249 msgid "Trip short name" msgstr "Nom court du trajet" -#: sncfgtfs/models.py:247 +#: sncfgtfs/models.py:254 msgid "Direction" msgstr "Direction" -#: sncfgtfs/models.py:254 +#: sncfgtfs/models.py:261 msgid "Block ID" msgstr "ID du bloc" -#: sncfgtfs/models.py:260 +#: sncfgtfs/models.py:267 msgid "Shape ID" msgstr "ID de la forme" -#: sncfgtfs/models.py:265 +#: sncfgtfs/models.py:272 msgid "Wheelchair accessible" msgstr "Accessible en fauteuil roulant" -#: sncfgtfs/models.py:272 +#: sncfgtfs/models.py:279 msgid "Bikes allowed" msgstr "Vélos autorisés" -#: sncfgtfs/models.py:278 +#: sncfgtfs/models.py:285 msgid "Trip" msgstr "Trajet" -#: sncfgtfs/models.py:279 +#: sncfgtfs/models.py:286 msgid "Trips" msgstr "Trajets" -#: sncfgtfs/models.py:290 +#: sncfgtfs/models.py:297 msgid "Arrival time" msgstr "Heure d'arrivée" -#: sncfgtfs/models.py:294 +#: sncfgtfs/models.py:301 msgid "Departure time" msgstr "Heure de départ" -#: sncfgtfs/models.py:304 +#: sncfgtfs/models.py:311 msgid "Stop sequence" msgstr "Séquence de l'arrêt" -#: sncfgtfs/models.py:309 +#: sncfgtfs/models.py:316 msgid "Stop headsign" msgstr "Destination de l'arrêt" -#: sncfgtfs/models.py:314 +#: sncfgtfs/models.py:321 msgid "Pickup type" msgstr "Type de prise en charge" -#: sncfgtfs/models.py:321 +#: sncfgtfs/models.py:328 msgid "Drop off type" msgstr "Type de dépose" -#: sncfgtfs/models.py:328 +#: sncfgtfs/models.py:335 msgid "Timepoint" msgstr "Ponctualité" -#: sncfgtfs/models.py:334 +#: sncfgtfs/models.py:341 msgid "Stop time" msgstr "Heure d'arrêt" -#: sncfgtfs/models.py:335 +#: sncfgtfs/models.py:342 msgid "Stop times" msgstr "Heures d'arrêt" -#: sncfgtfs/models.py:346 +#: sncfgtfs/models.py:353 msgid "Monday" msgstr "Lundi" -#: sncfgtfs/models.py:350 +#: sncfgtfs/models.py:357 msgid "Tuesday" msgstr "Mardi" -#: sncfgtfs/models.py:354 +#: sncfgtfs/models.py:361 msgid "Wednesday" msgstr "Mercredi" -#: sncfgtfs/models.py:358 +#: sncfgtfs/models.py:365 msgid "Thursday" msgstr "Jeudi" -#: sncfgtfs/models.py:362 +#: sncfgtfs/models.py:369 msgid "Friday" msgstr "Vendredi" -#: sncfgtfs/models.py:366 +#: sncfgtfs/models.py:373 msgid "Saturday" msgstr "Samedi" -#: sncfgtfs/models.py:370 +#: sncfgtfs/models.py:377 msgid "Sunday" msgstr "Dimanche" -#: sncfgtfs/models.py:374 +#: sncfgtfs/models.py:381 msgid "Start date" msgstr "Date de début" -#: sncfgtfs/models.py:378 +#: sncfgtfs/models.py:385 msgid "End date" msgstr "Date de fin" -#: sncfgtfs/models.py:382 +#: sncfgtfs/models.py:389 msgid "Calendar" msgstr "Calendrier" -#: sncfgtfs/models.py:383 +#: sncfgtfs/models.py:390 msgid "Calendars" msgstr "Calendriers" -#: sncfgtfs/models.py:394 +#: sncfgtfs/models.py:401 msgid "Date" msgstr "Date" -#: sncfgtfs/models.py:398 +#: sncfgtfs/models.py:405 msgid "Exception type" msgstr "Type d'exception" -#: sncfgtfs/models.py:402 +#: sncfgtfs/models.py:409 msgid "Calendar date" msgstr "Date du calendrier" -#: sncfgtfs/models.py:403 +#: sncfgtfs/models.py:410 msgid "Calendar dates" msgstr "Dates du calendrier" -#: sncfgtfs/models.py:410 +#: sncfgtfs/models.py:417 msgid "From stop" msgstr "Depuis l'arrêt" -#: sncfgtfs/models.py:417 +#: sncfgtfs/models.py:424 msgid "To stop" msgstr "Jusqu'à l'arrêt" -#: sncfgtfs/models.py:422 +#: sncfgtfs/models.py:429 msgid "Transfer type" msgstr "Type de correspondance" -#: sncfgtfs/models.py:426 +#: sncfgtfs/models.py:435 msgid "Minimum transfer time" msgstr "Temps de correspondance minimum" -#: sncfgtfs/models.py:431 +#: sncfgtfs/models.py:440 msgid "Transfer" msgstr "Correspondance" -#: sncfgtfs/models.py:432 +#: sncfgtfs/models.py:441 msgid "Transfers" msgstr "Correspondances" -#: sncfgtfs/models.py:438 +#: sncfgtfs/models.py:447 msgid "Feed ID" msgstr "ID du flux" -#: sncfgtfs/models.py:443 +#: sncfgtfs/models.py:452 msgid "Feed publisher name" msgstr "Nom de l'éditeur du flux" -#: sncfgtfs/models.py:447 +#: sncfgtfs/models.py:456 msgid "Feed publisher URL" msgstr "URL de l'éditeur du flux" -#: sncfgtfs/models.py:452 +#: sncfgtfs/models.py:461 msgid "Feed language" msgstr "Langue du flux" -#: sncfgtfs/models.py:456 +#: sncfgtfs/models.py:465 msgid "Feed start date" msgstr "Date de début du flux" -#: sncfgtfs/models.py:460 +#: sncfgtfs/models.py:469 msgid "Feed end date" msgstr "Date de fin du flux" -#: sncfgtfs/models.py:465 +#: sncfgtfs/models.py:474 msgid "Feed version" msgstr "Version du flux" -#: sncfgtfs/models.py:469 +#: sncfgtfs/models.py:478 msgid "Feed info" msgstr "Information du flux" -#: sncfgtfs/models.py:470 +#: sncfgtfs/models.py:479 msgid "Feed infos" msgstr "Informations du flux" diff --git a/sncfgtfs/migrations/0001_initial.py b/sncfgtfs/migrations/0001_initial.py index f67baf3..4b51463 100644 --- a/sncfgtfs/migrations/0001_initial.py +++ b/sncfgtfs/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 5.0.1 on 2024-01-25 23:38 +# Generated by Django 5.0.1 on 2024-01-26 20:15 import django.db.models.deletion from django.db import migrations, models @@ -307,7 +307,19 @@ class Migration(migrations.Migration): verbose_name="ID", ), ), - ("transfer_type", models.IntegerField(verbose_name="Transfer type")), + ( + "transfer_type", + models.IntegerField( + choices=[ + (0, "Recommended"), + (1, "Timed"), + (2, "Minimum time"), + (3, "Not possible"), + ], + default=0, + verbose_name="Transfer type", + ), + ), ( "min_transfer_time", models.IntegerField( @@ -320,7 +332,7 @@ class Migration(migrations.Migration): on_delete=django.db.models.deletion.CASCADE, related_name="transfers_from", to="sncfgtfs.stop", - verbose_name="From stop ID", + verbose_name="From stop", ), ), ( @@ -329,7 +341,7 @@ class Migration(migrations.Migration): on_delete=django.db.models.deletion.CASCADE, related_name="transfers_to", to="sncfgtfs.stop", - verbose_name="To stop ID", + verbose_name="To stop", ), ), ], diff --git a/sncfgtfs/models.py b/sncfgtfs/models.py index c97bb2d..f0f009b 100644 --- a/sncfgtfs/models.py +++ b/sncfgtfs/models.py @@ -39,6 +39,13 @@ class Direction(models.IntegerChoices): INBOUND = 1, _("Inbound") +class TransferType(models.IntegerChoices): + RECOMMENDED = 0, _("Recommended") + TIMED = 1, _("Timed") + MINIMUM_TIME = 2, _("Minimum time") + NOT_POSSIBLE = 3, _("Not possible") + + class Agency(models.Model): agency_id = models.CharField( max_length=255, @@ -420,6 +427,8 @@ class Transfer(models.Model): transfer_type = models.IntegerField( verbose_name=_("Transfer type"), + choices=TransferType, + default=TransferType.RECOMMENDED, ) min_transfer_time = models.IntegerField(