mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 00:20:07 +00:00
feat(tours): import a ski track from GPX and keep it as recorded
SKI-02. Ski joins the types a GPX file can be imported as, offered in the import preview's type field only: TREK routes no ski track, so the planner never offers it. The preview asks for the discipline on purpose (alpine, snowboard, cross-country or ski touring, none chosen at first) and, for cross-country, the technique (classic, skating or unknown); Import waits until both are named, and the technique stays in sight but dimmed for the other disciplines. The track is stored exactly as recorded, with its file name as provenance, its distance and heights from the file and no time: no ski time is worked out and no hiking estimate stands in for one. Opened in the planner, a ski track gets a rail card with its discipline on a tinted tile, a cross-country technique as a badge beside it, the ski time said as not worked out, and an info dot on what TREK does not say (snow, avalanches, open runs, and that the 3D gradient colours are no difficulty or avalanche rating). Change opens a dialog to classify the track again; only the classification changes, through the offline core, with the revision it was made at. Planning over the import is not offered for ski. The existing 3D terrain view, the elevation profile and its focus work on the track as for any import, with the standard map, topo and satellite and no via ferratas. Lists, the day plan and the detail show the discipline as a frosted corner badge on the tile and as a pill with the technique inside; day assignment, copies and take-overs work as for any tour. The corner badge is now one component that the winter label shares. The server keeps tours.ski_discipline and tours.ski_technique (CHECK lists, NULL on every other type), switches the ski type on without a routing profile, refuses a ski import without its discipline, a technique outside cross-country and ski fields on any other type, and takes a planned save's classification off. PUT /api/trips/:tripId/tours/:placeId/ski classifies a ski track again (place_edit, 409 on a stale revision, 400 for a tour that is no ski track) and broadcasts tours:changed. GPX export names the discipline (alpine_skiing, snowboarding, cross_country_skiing, backcountry_skiing), and list_tours describes both fields with what a ski track does not say. Ski is labelled plainly as Ski in every language, so it no longer reads as ski touring.
This commit is contained in:
@@ -200,7 +200,7 @@ const tours: TranslationStrings = {
|
||||
'tourTypes.hike': 'Yürüş',
|
||||
'tourTypes.bike': 'Velosiped turu',
|
||||
'tourTypes.run': 'Qaçış',
|
||||
'tourTypes.ski': 'Xizək turu',
|
||||
'tourTypes.ski': 'Xizək',
|
||||
'tourTypes.kayak': 'Avarlı tur',
|
||||
'tourTypes.walk': 'Şəhər / görməli yerlər gəzintisi',
|
||||
'tourTypes.food': 'Yemək/şərab turu',
|
||||
@@ -404,6 +404,27 @@ const tours: TranslationStrings = {
|
||||
'tours.winter.activity.snowshoe': 'Qar ayaqqabısı ilə yürüş',
|
||||
'tours.winter.labelOnly':
|
||||
'Səyahətçilər tərəfindən qeyd edilib. Marşrut və vaxt istənilən yürüşdəki kimi planlaşdırılır, qış şəraiti üçün yoxlanılmır.',
|
||||
'tours.planner.tourTypeHint.ski': 'GPX faylından, qeydə alındığı kimi',
|
||||
'tours.ski.title': 'Xizək izi',
|
||||
'tours.ski.discipline': 'Növ',
|
||||
'tours.ski.discipline.alpine': 'Alp xizəyi',
|
||||
'tours.ski.discipline.snowboard': 'Snoubord',
|
||||
'tours.ski.discipline.cross_country': 'Xizək qaçışı',
|
||||
'tours.ski.discipline.touring': 'Dağ xizəyi turu',
|
||||
'tours.ski.technique': 'Texnika',
|
||||
'tours.ski.technique.classic': 'Klassik',
|
||||
'tours.ski.technique.skating': 'Konki üslubu',
|
||||
'tours.ski.technique.unknown': 'Naməlum',
|
||||
'tours.ski.chooseDiscipline': 'İzi xizək kimi idxal etmək üçün növ seç.',
|
||||
'tours.ski.chooseTechnique': 'Texnikanı və ya Naməlum seç.',
|
||||
'tours.ski.infoLabel': 'TREK xizək izi ilə nə edir',
|
||||
'tours.ski.info':
|
||||
'Qeydə alındığı kimi qalır və heç vaxt marşrutlanmır. Məsafə və hündürlüklər fayldan gəlir. TREK xizək vaxtı hesablamır, nə iz, nə də 3D-dəki meyil rəngləri çətinlik, qar, uçqun və ya trassaların açıq olub-olmaması barədə heç nə demir.',
|
||||
'tours.ski.time': 'Xizək vaxtı',
|
||||
'tours.ski.timeUnknown': 'Hesablanmayıb',
|
||||
'tours.ski.classifyTitle': 'Xizək izini təsnif et',
|
||||
'tours.ski.saved': 'Təsnifat saxlanıldı',
|
||||
'tours.ski.saveFailed': 'Təsnifatı saxlamaq alınmadı.',
|
||||
'tours.planner.tourTypeHint.run': 'Piyada öz tempinizlə, qaçış üçün rahat yollarla',
|
||||
'tours.planner.namePlaceholder.run': 'Adsız qaçış',
|
||||
'tours.planner.unreachable.run':
|
||||
|
||||
Reference in New Issue
Block a user