Skip to content

Commit 1692f8c

Browse files
committed
1 parent 64756fc commit 1692f8c

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

front/public/locales/en/operationalStudies/manageTrainSchedule.json

+10
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@
7878
"pathfindingMissingParamsSimple": "Missing information for the search",
7979
"pathfindingNoState": "No route search.",
8080
"pathfindingStatus": "Pathfinding state",
81+
"pathfindingErrors": {
82+
"not_found_in_blocks": "Missing block",
83+
"not_found_in_routes": "Missing route",
84+
"not_found_in_tracks": "Missing track",
85+
"incompatible_electrification": "Incompatible electrification",
86+
"incompatible_loading_gauge": "Incompatible loading gauge",
87+
"incompatible_signaling_system": "Incompatible signaling system",
88+
"not_enough_path_items": "Missing parameters for pathfinding: Departure, Arrival, Rolling stock",
89+
"pathfinding_failed": "No path found"
90+
},
8191
"powerRestriction": "Power restriction code",
8292
"powerRestrictionExplanationText": "By default, the simulation will use the nominal power.",
8393
"powerRestrictionEmptyExplanationText": "The selected rolling stock does not have any power restrictions. You can edit it in the rolling stock editor.",

front/public/locales/fr/operationalStudies/manageTrainSchedule.json

+10
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@
7878
"pathfindingMissingParamsSimple": "Informations manquantes pour la recherche",
7979
"pathfindingNoState": "Aucune recherche itinéraire.",
8080
"pathfindingStatus": "Statut recherche d’itinéraire",
81+
"pathfindingErrors": {
82+
"not_found_in_blocks": "Canton manquant",
83+
"not_found_in_routes": "Itinéraire manquant",
84+
"not_found_in_tracks": "Voie manquante",
85+
"incompatible_electrification": "Électrification incompatible",
86+
"incompatible_loading_gauge": "Gabarit incompatible",
87+
"incompatible_signaling_system": "Système de signalisation incompatible",
88+
"not_enough_path_items": "Éléments manquants pour la recherche : Origine, Destination, Matériel roulant",
89+
"pathfinding_failed": "Aucun chemin trouvé"
90+
},
8191
"pleaseWait": "Veuillez patientez…",
8292
"powerRestriction": "Code de restriction de puissance",
8393
"powerRestrictionExplanationText": "Si aucune restriction de puissance n'est renseignée sur un intervalle, le calcul de marche sera réalisé en utilisant la puissance nominale.",

front/src/modules/pathfinding/hook/usePathfinding.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,10 @@ export const usePathfindingV2 = (
296296
// * }
297297
}
298298
} else {
299-
pathfindingDispatch({ type: 'PATHFINDING_ERROR', message: pathfindingResult.status });
299+
pathfindingDispatch({
300+
type: 'PATHFINDING_ERROR',
301+
message: `pathfindingErrors.${pathfindingResult.status}`,
302+
});
300303
}
301304
} catch (e) {
302305
if (isObject(e)) {

0 commit comments

Comments
 (0)