mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 10:24:05 +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:
@@ -205,7 +205,7 @@ const tours: TranslationStrings = {
|
||||
'tourTypes.hike': 'Trilha',
|
||||
'tourTypes.bike': 'Passeio de bicicleta',
|
||||
'tourTypes.run': 'Corrida',
|
||||
'tourTypes.ski': 'Passeio de esqui',
|
||||
'tourTypes.ski': 'Esqui',
|
||||
'tourTypes.kayak': 'Passeio de remo',
|
||||
'tourTypes.walk': 'Caminhada urbana / turística',
|
||||
'tourTypes.food': 'Passeio gastronômico / enológico',
|
||||
@@ -410,6 +410,27 @@ const tours: TranslationStrings = {
|
||||
'tours.winter.activity.snowshoe': 'Caminhada com raquetes de neve',
|
||||
'tours.winter.labelOnly':
|
||||
'Marcado pelos viajantes. Rota e tempo são planejados como em qualquer caminhada, sem verificação para o inverno.',
|
||||
'tours.planner.tourTypeHint.ski': 'De um arquivo GPX, como foi gravado',
|
||||
'tours.ski.title': 'Trilha de esqui',
|
||||
'tours.ski.discipline': 'Modalidade',
|
||||
'tours.ski.discipline.alpine': 'Alpino',
|
||||
'tours.ski.discipline.snowboard': 'Snowboard', // same-as-en
|
||||
'tours.ski.discipline.cross_country': 'Esqui cross-country',
|
||||
'tours.ski.discipline.touring': 'Esqui de travessia',
|
||||
'tours.ski.technique': 'Técnica',
|
||||
'tours.ski.technique.classic': 'Clássica',
|
||||
'tours.ski.technique.skating': 'Skating', // same-as-en
|
||||
'tours.ski.technique.unknown': 'Desconhecida',
|
||||
'tours.ski.chooseDiscipline': 'Escolha uma modalidade para importar a trilha como esqui.',
|
||||
'tours.ski.chooseTechnique': 'Escolha a técnica, ou Desconhecida.',
|
||||
'tours.ski.infoLabel': 'O que o TREK faz com uma trilha de esqui',
|
||||
'tours.ski.info':
|
||||
'Fica como foi gravada e nunca é roteada. Distância e altitudes vêm do arquivo. O TREK não calcula tempo de esqui, e nem a trilha nem as cores de inclinação em 3D dizem algo sobre dificuldade, neve, avalanches ou se pistas e trilhas estão abertas.',
|
||||
'tours.ski.time': 'Tempo de esqui',
|
||||
'tours.ski.timeUnknown': 'Não calculado',
|
||||
'tours.ski.classifyTitle': 'Classificar trilha de esqui',
|
||||
'tours.ski.saved': 'Classificação salva',
|
||||
'tours.ski.saveFailed': 'Não foi possível salvar a classificação.',
|
||||
'tours.planner.tourTypeHint.run': 'A pé no seu ritmo, por caminhos bons para correr',
|
||||
'tours.planner.namePlaceholder.run': 'Corrida sem título',
|
||||
'tours.planner.unreachable.run':
|
||||
|
||||
Reference in New Issue
Block a user