mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 18:34:09 +00:00
feat(tours): keep whole tours in collections and take them into trips
A saved tour can now be kept in a collection, apart from any trip, and later made into a tour of another trip. The bookmark button in a tour's footer and in the planner's head (waiting for the save while there are unsaved changes) opens a dialog with every list of the user; a list they may only read stays in it, dimmed with a lock and a tooltip. The list keeps an independent copy: the line, the type, every measure and setting, the waypoints in order with their roles, the origin, and the trip and tour it was saved from as they were called then. Its days, its links to places of the trip and its obstacle decisions stay in the trip, and later changes to the tour do not reach the copy. A collection shows its kept tours as cards above its places: the grade tile with the source badge, measures and the waypoint count as badges, the trip it came from, and who kept it. The owner or an admin of the list can remove one after a question; tours made from it stay. "Add to a trip" shows the kept tour on a map with its facts and numbered waypoints, lists the user's trips (the ones they may not add tours to dimmed), and asks outright whether the waypoints come along. "Line only" keeps the line as saved and adds no waypoints; a tour kept without a line can only bring them. The new tour has an id of its own, no days and no new places, and names the trip and tour it was saved from; the dialog then offers to open that trip. Neither the collection nor the original tour changes. On the server the kept tours are a table of their own in the tours domain (collection_tours, migration 046100), each row written whole once. Every copy, the in-trip "save as new tour", the take-over from another trip and both directions here, now goes through one copy model (tour-copy.helpers) instead of a second one. Reading and removing follow the collection's roles, keeping one also needs access to the source trip, and taking one over needs place_edit on the target trip; the kept tour is read again inside the write, so one removed meanwhile leaves no half-made tour. The MCP tools list_collection_tours, get_collection_tour, save_tour_to_collection, take_over_collection_tour and delete_collection_tour run over the same service and checks. All 27 locales carry the new strings, and the wiki describes the flow.
This commit is contained in:
@@ -1321,5 +1321,47 @@ const tours: TranslationStrings = {
|
||||
'tours.stages.wholeTour': 'Roteiro completo',
|
||||
'tours.stages.totalPartial': 'conhecido para {known} de {of} etapas',
|
||||
'tours.stages.openInPlanner': 'Abrir esta etapa no planejador',
|
||||
'tours.collection.save': 'Guardar em uma coleção',
|
||||
'tours.collection.saveHint': 'Guarda uma cópia independente deste passeio em uma das suas coleções',
|
||||
'tours.collection.saveFirst': 'Salve o passeio primeiro para guardá-lo em uma coleção',
|
||||
'tours.collection.saveSub': 'Uma cópia independente. Mudanças posteriores neste passeio não chegam a ela.',
|
||||
'tours.collection.list': 'Coleção',
|
||||
'tours.collection.readOnly': 'Você só pode ler esta lista',
|
||||
'tours.collection.noLists': 'Você ainda não tem nenhuma coleção.',
|
||||
'tours.collection.openCollections': 'Abrir coleções',
|
||||
'tours.collection.nameThere': 'Nome na coleção',
|
||||
'tours.collection.keep': 'Guardar',
|
||||
'tours.collection.kept': '“{name}” agora está guardado em “{list}”.',
|
||||
'tours.collection.keepFailed': 'Não foi possível guardar o passeio.',
|
||||
'tours.collection.offline': 'As coleções precisam de conexão.',
|
||||
'tours.collection.listsFailed': 'Não foi possível carregar as coleções.',
|
||||
'tours.collection.toursFailed': 'Não foi possível carregar os passeios desta lista.',
|
||||
'tours.collection.points': '{count} pontos de rota',
|
||||
'tours.collection.points.one': '{count} ponto de rota',
|
||||
'tours.collection.savedFrom': 'Guardado de',
|
||||
'tours.collection.source': 'Guardado de “{tour}” em “{trip}”',
|
||||
'tours.collection.keptBy': 'Guardado por {name}',
|
||||
'tours.collection.add': 'Adicionar a uma viagem',
|
||||
'tours.collection.addHint': 'Cria um passeio novo e próprio na viagem que você escolher',
|
||||
'tours.collection.remove': 'Tirar da coleção',
|
||||
'tours.collection.removeTitle': 'Tirar este passeio da coleção?',
|
||||
'tours.collection.removeBody': 'Os passeios já criados a partir dele nas suas viagens ficam como estão.',
|
||||
'tours.collection.removed': 'O passeio foi tirado da coleção.',
|
||||
'tours.collection.removeFailed': 'Não foi possível tirar o passeio.',
|
||||
'tours.collection.takeEyebrow': 'Da coleção',
|
||||
'tours.collection.takeSub': 'Vira um passeio próprio na viagem escolhida, sem dias. A coleção fica como está.',
|
||||
'tours.collection.intoTrip': 'Na viagem',
|
||||
'tours.collection.noPermission': 'Você não pode adicionar passeios a esta viagem',
|
||||
'tours.collection.noTrips': 'Você ainda não tem nenhuma viagem para adicioná-lo.',
|
||||
'tours.collection.withPoints': 'Com {count} pontos de rota',
|
||||
'tours.collection.withPoints.one': 'Com {count} ponto de rota',
|
||||
'tours.collection.withPointsHint': 'Início, paradas e fim vêm na sua ordem.',
|
||||
'tours.collection.lineOnly': 'Só a linha',
|
||||
'tours.collection.lineOnlyHint': 'A linha fica como foi salva. Nenhum ponto de rota é adicionado.',
|
||||
'tours.collection.needsPoints': 'Este passeio ainda não tem linha, então os pontos de rota precisam vir junto.',
|
||||
'tours.collection.nameInTrip': 'Nome na viagem',
|
||||
'tours.collection.taken': '“{name}” agora é um passeio de “{trip}”.',
|
||||
'tours.collection.takeFailed': 'Não foi possível adicionar o passeio à viagem.',
|
||||
'tours.collection.openTrip': 'Abrir viagem',
|
||||
};
|
||||
export default tours;
|
||||
|
||||
Reference in New Issue
Block a user