-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
front: fix translations for pathfinding error in itinerary #9729
base: dev
Are you sure you want to change the base?
front: fix translations for pathfinding error in itinerary #9729
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -104,7 +104,8 @@ | |||
"not_found_in_tracks": "Voie manquante", | |||
"not_enough_path_items": "Éléments manquants pour la recherche : Origine, Destination, Matériel roulant", | |||
"pathfinding_failure": "Aucun chemin trouvé", | |||
"rolling_stock_not_found": "Matériel roulant non trouvé" | |||
"rolling_stock_not_found": "Matériel roulant non trouvé", | |||
"the path goes over the same track multiple times": "Le chemin emprunte plusieurs fois la même voie" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah. This is not an error code, it's a human-readable error message. So I don't think this is a stable string we can rely on.
For pathfindingResult.error_type
we have an error code and we can find a suitable translation. For pathfindingResult.core_error.message
specifically, we should probably just pass the message as-is without going through translations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I was wondering. But if the app is set in french, the user will have a mixed french-english error message ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do want to provide an error message in French, we could use pathfindingResult.core_error.type
maybe? But there are many such error types (see core/osrd-reporting/src/main/java/fr/sncf/osrd/reporting/exceptions/ErrorType.java
) so not sure it's a rabbit hole we want to jump into.
closes #9728