Skip to content

Commit

Permalink
front: adding default help message on editor for tool split track
Browse files Browse the repository at this point in the history
section
  • Loading branch information
sim51 committed May 26, 2024
1 parent 4b0f2d6 commit 12c3979
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
3 changes: 2 additions & 1 deletion front/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,8 @@
"help": {
"move": "Click to validate the move, or press 'esc' to cancel",
"hover": "Click on the point to be able to move it",
"split": "Click on the track section to split it at this location"
"split": "Click on the track section to split it at this location",
"default": "Click on the split point on the map, or enter its offset from the beginning of the track section in the form"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion front/public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,8 @@
"help": {
"move": "Cliquer pour valider le déplacement, ou appuyer sur 'esc' pour annuler",
"hover": "Cliquer sur le point pour pouvoir le déplacer",
"split": "Cliquer sur la TIV pour la diviser à cette localisation"
"split": "Cliquer sur le tronçon d'itinéraire de voie pour le diviser à cette localisation",
"default": "Cliquer sur le point de division sur la carte, ou renseigner sa position par rapport au début du tronçon d'itinéraire de voie dans le formulaire"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ import type { ExtendedEditorContextType } from 'applications/editor/types';

const TrackSplitMessages = () => {
const { t, state } = useContext(EditorContext) as ExtendedEditorContextType<TrackSplitState>;

// Click on the map to end the drag, or press 'esc' to cancel
// Click to split the track section at this location
// Click on the point to drag it
switch (state.splitState.type) {
case 'hoverPoint':
return t('Editor.tools.track-split.help.hover').toString();
Expand All @@ -18,7 +14,7 @@ const TrackSplitMessages = () => {
case 'movePoint':
return t('Editor.tools.track-split.help.move').toString();
default:
return null;
return t('Editor.tools.track-split.help.default').toString();
}
};

Expand Down

0 comments on commit 12c3979

Please sign in to comment.