Add choices for transfer_type

This commit is contained in:
Emmy D'Anello 2024-01-26 21:16:26 +01:00
parent ef4e1209a9
commit 90cf8c61a5
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
3 changed files with 122 additions and 89 deletions

View File

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 1.0\n" "Project-Id-Version: 1.0\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Emmy D'Anello <ynerant@emy.lu>\n" "Last-Translator: Emmy D'Anello <ynerant@emy.lu>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -40,7 +40,7 @@ msgstr "Pas d'information"
msgid "Possible" msgid "Possible"
msgstr "Possible" msgstr "Possible"
#: sncfgtfs/models.py:16 #: sncfgtfs/models.py:16 sncfgtfs/models.py:46
msgid "Not possible" msgid "Not possible"
msgstr "Impossible" msgstr "Impossible"
@ -100,334 +100,346 @@ msgstr "Vers l'extérieur"
msgid "Inbound" msgid "Inbound"
msgstr "Vers l'intérieur" 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" msgid "Agency ID"
msgstr "ID de l'agence" msgstr "ID de l'agence"
#: sncfgtfs/models.py:52 #: sncfgtfs/models.py:59
msgid "Agency name" msgid "Agency name"
msgstr "Nom de l'agence" msgstr "Nom de l'agence"
#: sncfgtfs/models.py:56 #: sncfgtfs/models.py:63
msgid "Agency URL" msgid "Agency URL"
msgstr "URL de l'agence" msgstr "URL de l'agence"
#: sncfgtfs/models.py:61 #: sncfgtfs/models.py:68
msgid "Agency timezone" msgid "Agency timezone"
msgstr "Fuseau horaire de l'agence" msgstr "Fuseau horaire de l'agence"
#: sncfgtfs/models.py:66 #: sncfgtfs/models.py:73
msgid "Agency language" msgid "Agency language"
msgstr "Langue de l'agence" msgstr "Langue de l'agence"
#: sncfgtfs/models.py:71 #: sncfgtfs/models.py:78
msgid "Agency" msgid "Agency"
msgstr "Agence" msgstr "Agence"
#: sncfgtfs/models.py:72 #: sncfgtfs/models.py:79
msgid "Agencies" msgid "Agencies"
msgstr "Agences" msgstr "Agences"
#: sncfgtfs/models.py:79 sncfgtfs/models.py:300 #: sncfgtfs/models.py:86 sncfgtfs/models.py:307
msgid "Stop ID" msgid "Stop ID"
msgstr "ID de l'arrêt" msgstr "ID de l'arrêt"
#: sncfgtfs/models.py:84 #: sncfgtfs/models.py:91
msgid "Stop code" msgid "Stop code"
msgstr "Code de l'arrêt" msgstr "Code de l'arrêt"
#: sncfgtfs/models.py:90 #: sncfgtfs/models.py:97
msgid "Stop name" msgid "Stop name"
msgstr "Nom de l'arrêt" msgstr "Nom de l'arrêt"
#: sncfgtfs/models.py:95 #: sncfgtfs/models.py:102
msgid "Stop description" msgid "Stop description"
msgstr "Description de l'arrêt" msgstr "Description de l'arrêt"
#: sncfgtfs/models.py:100 #: sncfgtfs/models.py:107
msgid "Stop longitude" msgid "Stop longitude"
msgstr "Longitude de l'arrêt" msgstr "Longitude de l'arrêt"
#: sncfgtfs/models.py:104 #: sncfgtfs/models.py:111
msgid "Stop latitude" msgid "Stop latitude"
msgstr "Latitude de l'arrêt" msgstr "Latitude de l'arrêt"
#: sncfgtfs/models.py:109 #: sncfgtfs/models.py:116
msgid "Zone ID" msgid "Zone ID"
msgstr "ID de la zone" msgstr "ID de la zone"
#: sncfgtfs/models.py:113 #: sncfgtfs/models.py:120
msgid "Stop URL" msgid "Stop URL"
msgstr "URL de l'arrêt" msgstr "URL de l'arrêt"
#: sncfgtfs/models.py:118 #: sncfgtfs/models.py:125
msgid "Location type" msgid "Location type"
msgstr "Type de localisation" msgstr "Type de localisation"
#: sncfgtfs/models.py:127 #: sncfgtfs/models.py:134
msgid "Parent station" msgid "Parent station"
msgstr "Gare parente" msgstr "Gare parente"
#: sncfgtfs/models.py:133 #: sncfgtfs/models.py:140
msgid "Stop timezone" msgid "Stop timezone"
msgstr "Fuseau horaire de l'arrêt" msgstr "Fuseau horaire de l'arrêt"
#: sncfgtfs/models.py:139 #: sncfgtfs/models.py:146
msgid "Level ID" msgid "Level ID"
msgstr "ID du niveau" msgstr "ID du niveau"
#: sncfgtfs/models.py:144 #: sncfgtfs/models.py:151
msgid "Wheelchair boarding" msgid "Wheelchair boarding"
msgstr "Embarquement en fauteuil roulant" msgstr "Embarquement en fauteuil roulant"
#: sncfgtfs/models.py:152 #: sncfgtfs/models.py:159
msgid "Platform code" msgid "Platform code"
msgstr "Code du quai" msgstr "Code du quai"
#: sncfgtfs/models.py:156 #: sncfgtfs/models.py:163
msgid "Stop" msgid "Stop"
msgstr "Arrêt" msgstr "Arrêt"
#: sncfgtfs/models.py:157 #: sncfgtfs/models.py:164
msgid "Stops" msgid "Stops"
msgstr "Arrêts" msgstr "Arrêts"
#: sncfgtfs/models.py:164 sncfgtfs/models.py:226 #: sncfgtfs/models.py:171 sncfgtfs/models.py:233
msgid "Route ID" msgid "Route ID"
msgstr "ID de la ligne" msgstr "ID de la ligne"
#: sncfgtfs/models.py:175 #: sncfgtfs/models.py:182
msgid "Route short name" msgid "Route short name"
msgstr "Nom court de la ligne" msgstr "Nom court de la ligne"
#: sncfgtfs/models.py:180 #: sncfgtfs/models.py:187
msgid "Route long name" msgid "Route long name"
msgstr "Nom long de la ligne" msgstr "Nom long de la ligne"
#: sncfgtfs/models.py:185 #: sncfgtfs/models.py:192
msgid "Route description" msgid "Route description"
msgstr "Description de la ligne" msgstr "Description de la ligne"
#: sncfgtfs/models.py:190 #: sncfgtfs/models.py:197
msgid "Route type" msgid "Route type"
msgstr "Type de ligne" msgstr "Type de ligne"
#: sncfgtfs/models.py:195 #: sncfgtfs/models.py:202
msgid "Route URL" msgid "Route URL"
msgstr "URL de la ligne" msgstr "URL de la ligne"
#: sncfgtfs/models.py:201 #: sncfgtfs/models.py:208
msgid "Route color" msgid "Route color"
msgstr "Couleur de la ligne" msgstr "Couleur de la ligne"
#: sncfgtfs/models.py:207 #: sncfgtfs/models.py:214
msgid "Route text color" msgid "Route text color"
msgstr "Couleur du texte de la ligne" msgstr "Couleur du texte de la ligne"
#: sncfgtfs/models.py:212 #: sncfgtfs/models.py:219
msgid "Route" msgid "Route"
msgstr "Ligne" msgstr "Ligne"
#: sncfgtfs/models.py:213 #: sncfgtfs/models.py:220
msgid "Routes" msgid "Routes"
msgstr "Lignes" msgstr "Lignes"
#: sncfgtfs/models.py:220 sncfgtfs/models.py:286 #: sncfgtfs/models.py:227 sncfgtfs/models.py:293
msgid "Trip ID" msgid "Trip ID"
msgstr "ID du trajet" 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" msgid "Service ID"
msgstr "ID du service" msgstr "ID du service"
#: sncfgtfs/models.py:236 #: sncfgtfs/models.py:243
msgid "Trip headsign" msgid "Trip headsign"
msgstr "Destination du trajet" msgstr "Destination du trajet"
#: sncfgtfs/models.py:242 #: sncfgtfs/models.py:249
msgid "Trip short name" msgid "Trip short name"
msgstr "Nom court du trajet" msgstr "Nom court du trajet"
#: sncfgtfs/models.py:247 #: sncfgtfs/models.py:254
msgid "Direction" msgid "Direction"
msgstr "Direction" msgstr "Direction"
#: sncfgtfs/models.py:254 #: sncfgtfs/models.py:261
msgid "Block ID" msgid "Block ID"
msgstr "ID du bloc" msgstr "ID du bloc"
#: sncfgtfs/models.py:260 #: sncfgtfs/models.py:267
msgid "Shape ID" msgid "Shape ID"
msgstr "ID de la forme" msgstr "ID de la forme"
#: sncfgtfs/models.py:265 #: sncfgtfs/models.py:272
msgid "Wheelchair accessible" msgid "Wheelchair accessible"
msgstr "Accessible en fauteuil roulant" msgstr "Accessible en fauteuil roulant"
#: sncfgtfs/models.py:272 #: sncfgtfs/models.py:279
msgid "Bikes allowed" msgid "Bikes allowed"
msgstr "Vélos autorisés" msgstr "Vélos autorisés"
#: sncfgtfs/models.py:278 #: sncfgtfs/models.py:285
msgid "Trip" msgid "Trip"
msgstr "Trajet" msgstr "Trajet"
#: sncfgtfs/models.py:279 #: sncfgtfs/models.py:286
msgid "Trips" msgid "Trips"
msgstr "Trajets" msgstr "Trajets"
#: sncfgtfs/models.py:290 #: sncfgtfs/models.py:297
msgid "Arrival time" msgid "Arrival time"
msgstr "Heure d'arrivée" msgstr "Heure d'arrivée"
#: sncfgtfs/models.py:294 #: sncfgtfs/models.py:301
msgid "Departure time" msgid "Departure time"
msgstr "Heure de départ" msgstr "Heure de départ"
#: sncfgtfs/models.py:304 #: sncfgtfs/models.py:311
msgid "Stop sequence" msgid "Stop sequence"
msgstr "Séquence de l'arrêt" msgstr "Séquence de l'arrêt"
#: sncfgtfs/models.py:309 #: sncfgtfs/models.py:316
msgid "Stop headsign" msgid "Stop headsign"
msgstr "Destination de l'arrêt" msgstr "Destination de l'arrêt"
#: sncfgtfs/models.py:314 #: sncfgtfs/models.py:321
msgid "Pickup type" msgid "Pickup type"
msgstr "Type de prise en charge" msgstr "Type de prise en charge"
#: sncfgtfs/models.py:321 #: sncfgtfs/models.py:328
msgid "Drop off type" msgid "Drop off type"
msgstr "Type de dépose" msgstr "Type de dépose"
#: sncfgtfs/models.py:328 #: sncfgtfs/models.py:335
msgid "Timepoint" msgid "Timepoint"
msgstr "Ponctualité" msgstr "Ponctualité"
#: sncfgtfs/models.py:334 #: sncfgtfs/models.py:341
msgid "Stop time" msgid "Stop time"
msgstr "Heure d'arrêt" msgstr "Heure d'arrêt"
#: sncfgtfs/models.py:335 #: sncfgtfs/models.py:342
msgid "Stop times" msgid "Stop times"
msgstr "Heures d'arrêt" msgstr "Heures d'arrêt"
#: sncfgtfs/models.py:346 #: sncfgtfs/models.py:353
msgid "Monday" msgid "Monday"
msgstr "Lundi" msgstr "Lundi"
#: sncfgtfs/models.py:350 #: sncfgtfs/models.py:357
msgid "Tuesday" msgid "Tuesday"
msgstr "Mardi" msgstr "Mardi"
#: sncfgtfs/models.py:354 #: sncfgtfs/models.py:361
msgid "Wednesday" msgid "Wednesday"
msgstr "Mercredi" msgstr "Mercredi"
#: sncfgtfs/models.py:358 #: sncfgtfs/models.py:365
msgid "Thursday" msgid "Thursday"
msgstr "Jeudi" msgstr "Jeudi"
#: sncfgtfs/models.py:362 #: sncfgtfs/models.py:369
msgid "Friday" msgid "Friday"
msgstr "Vendredi" msgstr "Vendredi"
#: sncfgtfs/models.py:366 #: sncfgtfs/models.py:373
msgid "Saturday" msgid "Saturday"
msgstr "Samedi" msgstr "Samedi"
#: sncfgtfs/models.py:370 #: sncfgtfs/models.py:377
msgid "Sunday" msgid "Sunday"
msgstr "Dimanche" msgstr "Dimanche"
#: sncfgtfs/models.py:374 #: sncfgtfs/models.py:381
msgid "Start date" msgid "Start date"
msgstr "Date de début" msgstr "Date de début"
#: sncfgtfs/models.py:378 #: sncfgtfs/models.py:385
msgid "End date" msgid "End date"
msgstr "Date de fin" msgstr "Date de fin"
#: sncfgtfs/models.py:382 #: sncfgtfs/models.py:389
msgid "Calendar" msgid "Calendar"
msgstr "Calendrier" msgstr "Calendrier"
#: sncfgtfs/models.py:383 #: sncfgtfs/models.py:390
msgid "Calendars" msgid "Calendars"
msgstr "Calendriers" msgstr "Calendriers"
#: sncfgtfs/models.py:394 #: sncfgtfs/models.py:401
msgid "Date" msgid "Date"
msgstr "Date" msgstr "Date"
#: sncfgtfs/models.py:398 #: sncfgtfs/models.py:405
msgid "Exception type" msgid "Exception type"
msgstr "Type d'exception" msgstr "Type d'exception"
#: sncfgtfs/models.py:402 #: sncfgtfs/models.py:409
msgid "Calendar date" msgid "Calendar date"
msgstr "Date du calendrier" msgstr "Date du calendrier"
#: sncfgtfs/models.py:403 #: sncfgtfs/models.py:410
msgid "Calendar dates" msgid "Calendar dates"
msgstr "Dates du calendrier" msgstr "Dates du calendrier"
#: sncfgtfs/models.py:410 #: sncfgtfs/models.py:417
msgid "From stop" msgid "From stop"
msgstr "Depuis l'arrêt" msgstr "Depuis l'arrêt"
#: sncfgtfs/models.py:417 #: sncfgtfs/models.py:424
msgid "To stop" msgid "To stop"
msgstr "Jusqu'à l'arrêt" msgstr "Jusqu'à l'arrêt"
#: sncfgtfs/models.py:422 #: sncfgtfs/models.py:429
msgid "Transfer type" msgid "Transfer type"
msgstr "Type de correspondance" msgstr "Type de correspondance"
#: sncfgtfs/models.py:426 #: sncfgtfs/models.py:435
msgid "Minimum transfer time" msgid "Minimum transfer time"
msgstr "Temps de correspondance minimum" msgstr "Temps de correspondance minimum"
#: sncfgtfs/models.py:431 #: sncfgtfs/models.py:440
msgid "Transfer" msgid "Transfer"
msgstr "Correspondance" msgstr "Correspondance"
#: sncfgtfs/models.py:432 #: sncfgtfs/models.py:441
msgid "Transfers" msgid "Transfers"
msgstr "Correspondances" msgstr "Correspondances"
#: sncfgtfs/models.py:438 #: sncfgtfs/models.py:447
msgid "Feed ID" msgid "Feed ID"
msgstr "ID du flux" msgstr "ID du flux"
#: sncfgtfs/models.py:443 #: sncfgtfs/models.py:452
msgid "Feed publisher name" msgid "Feed publisher name"
msgstr "Nom de l'éditeur du flux" msgstr "Nom de l'éditeur du flux"
#: sncfgtfs/models.py:447 #: sncfgtfs/models.py:456
msgid "Feed publisher URL" msgid "Feed publisher URL"
msgstr "URL de l'éditeur du flux" msgstr "URL de l'éditeur du flux"
#: sncfgtfs/models.py:452 #: sncfgtfs/models.py:461
msgid "Feed language" msgid "Feed language"
msgstr "Langue du flux" msgstr "Langue du flux"
#: sncfgtfs/models.py:456 #: sncfgtfs/models.py:465
msgid "Feed start date" msgid "Feed start date"
msgstr "Date de début du flux" msgstr "Date de début du flux"
#: sncfgtfs/models.py:460 #: sncfgtfs/models.py:469
msgid "Feed end date" msgid "Feed end date"
msgstr "Date de fin du flux" msgstr "Date de fin du flux"
#: sncfgtfs/models.py:465 #: sncfgtfs/models.py:474
msgid "Feed version" msgid "Feed version"
msgstr "Version du flux" msgstr "Version du flux"
#: sncfgtfs/models.py:469 #: sncfgtfs/models.py:478
msgid "Feed info" msgid "Feed info"
msgstr "Information du flux" msgstr "Information du flux"
#: sncfgtfs/models.py:470 #: sncfgtfs/models.py:479
msgid "Feed infos" msgid "Feed infos"
msgstr "Informations du flux" msgstr "Informations du flux"

View File

@ -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 import django.db.models.deletion
from django.db import migrations, models from django.db import migrations, models
@ -307,7 +307,19 @@ class Migration(migrations.Migration):
verbose_name="ID", 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", "min_transfer_time",
models.IntegerField( models.IntegerField(
@ -320,7 +332,7 @@ class Migration(migrations.Migration):
on_delete=django.db.models.deletion.CASCADE, on_delete=django.db.models.deletion.CASCADE,
related_name="transfers_from", related_name="transfers_from",
to="sncfgtfs.stop", 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, on_delete=django.db.models.deletion.CASCADE,
related_name="transfers_to", related_name="transfers_to",
to="sncfgtfs.stop", to="sncfgtfs.stop",
verbose_name="To stop ID", verbose_name="To stop",
), ),
), ),
], ],

View File

@ -39,6 +39,13 @@ class Direction(models.IntegerChoices):
INBOUND = 1, _("Inbound") 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): class Agency(models.Model):
agency_id = models.CharField( agency_id = models.CharField(
max_length=255, max_length=255,
@ -420,6 +427,8 @@ class Transfer(models.Model):
transfer_type = models.IntegerField( transfer_type = models.IntegerField(
verbose_name=_("Transfer type"), verbose_name=_("Transfer type"),
choices=TransferType,
default=TransferType.RECOMMENDED,
) )
min_transfer_time = models.IntegerField( min_transfer_time = models.IntegerField(