mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 10:44:23 +00:00
2a0ceb2687
Transitous has no GTFS coverage for much of Asia, so a search between two Osaka subway stops finds nothing — the stops are not in the feed at all. Add Google as an optional backend behind an admin setting, reusing the install's existing Places key, and fall back to Transitous whenever no key resolves. Uses the Routes API rather than the legacy Directions endpoint the request named: every other Google call here already speaks the v1/X-Goog-Api-Key family, and Google closed the legacy endpoint to Cloud projects created after March 2025. Google returns walking as turn-by-turn navigation steps where MOTIS returns one leg per walking segment, so consecutive walk steps are coalesced into a single leg — otherwise a finely-sliced walk pushed a real journey past the 20-leg cap and the whole itinerary was dropped. Both responses now name the backend that answered. The fallback is silent by design, which left an empty result ambiguous between "no data here" and "the provider you picked never ran", and the admin panel warns when Google is selected but no key resolves — or when only the admin's own key is set, which serves them and nobody else. Cost shaped the implementation, since Google bills where Transitous does not: both field masks are cut to the cheapest SKU tier that still answers the question, cache TTLs are longer than the Transitous path's, and route alternatives ride along inside the already-billed request. Addresses #1699
92 lines
4.1 KiB
TypeScript
92 lines
4.1 KiB
TypeScript
import type { TranslationStrings } from '../types';
|
|
|
|
const trip: TranslationStrings = {
|
|
'trip.tabs.plan': 'Plano',
|
|
'trip.tabs.transports': 'Transportes',
|
|
'trip.tabs.reservations': 'Reservas',
|
|
'trip.tabs.reservationsShort': 'Reservas',
|
|
'trip.tabs.packing': 'Lista de mala',
|
|
'trip.tabs.packingShort': 'Mala',
|
|
'trip.tabs.lists': 'Listas',
|
|
'trip.tabs.listsShort': 'Listas',
|
|
'trip.tabs.budget': 'Custos',
|
|
'trip.tabs.files': 'Arquivos',
|
|
'trip.loading': 'Carregando viagem...',
|
|
'trip.mobilePlan': 'Plano',
|
|
'trip.mobilePlaces': 'Lugares',
|
|
'trip.toast.placeUpdated': 'Lugar atualizado',
|
|
'trip.toast.tripUpdated': 'Viagem atualizada',
|
|
'trip.toast.placeAdded': 'Lugar adicionado',
|
|
'trip.toast.placeDeleted': 'Lugar excluído',
|
|
'trip.toast.selectDay': 'Selecione um dia primeiro',
|
|
'trip.toast.assignedToDay': 'Lugar atribuído ao dia',
|
|
'trip.toast.reorderError': 'Falha ao reordenar',
|
|
'trip.toast.reservationUpdated': 'Reserva atualizada',
|
|
'trip.toast.reservationAdded': 'Reserva adicionada',
|
|
'trip.toast.deleted': 'Excluído',
|
|
'trip.confirm.deletePlace': 'Tem certeza de que deseja excluir este lugar?',
|
|
'trip.confirm.deletePlaces': 'Excluir {count} lugares?',
|
|
'trip.toast.placesDeleted': '{count} lugares excluídos',
|
|
'trip.loadingPhotos': 'Carregando fotos dos lugares...',
|
|
'trip.loadingSteps.pack': 'Fazendo as malas...',
|
|
'trip.loadingSteps.road': 'Pé na estrada...',
|
|
'trip.loadingSteps.arrive': 'Quase lá...',
|
|
'trip.invite.linkTitle': 'Link de convite da viagem',
|
|
'trip.invite.linkHint':
|
|
'Qualquer pessoa com uma conta TREK que abrir este link entra na viagem como membro. Gere novamente para invalidar o link antigo.',
|
|
'trip.invite.create': 'Criar link de convite',
|
|
'trip.invite.regenerate': 'Gerar novamente',
|
|
'trip.invite.disable': 'Desativar',
|
|
'trip.invite.joinHeading': 'Entrar nesta viagem',
|
|
'trip.invite.joinPrompt': 'Você foi convidado para participar de "{title}".',
|
|
'trip.invite.joinCta': 'Entrar na viagem',
|
|
'trip.invite.joining': 'Entrando…',
|
|
'trip.invite.invalidTitle': 'Convite indisponível',
|
|
'trip.invite.invalid': 'Este link de convite é inválido ou expirou.',
|
|
'trip.invite.backToDashboard': 'Voltar ao painel',
|
|
'transit.title': 'Transporte público',
|
|
'transit.from': 'De',
|
|
'transit.to': 'Para',
|
|
'transit.searchStop': 'Buscar parada ou estação…',
|
|
'transit.swap': 'Inverter',
|
|
'transit.depart': 'Partida',
|
|
'transit.arrive': 'Chegada',
|
|
'transit.mode.rail': 'Trem',
|
|
'transit.mode.subway': 'Metrô',
|
|
'transit.mode.tram': 'Bonde',
|
|
'transit.mode.bus': 'Ônibus',
|
|
'transit.mode.ferry': 'Barca',
|
|
'transit.mode.cable': 'Teleférico',
|
|
'transit.pref.best': 'Melhor rota',
|
|
'transit.pref.transfers': 'Menos baldeações',
|
|
'transit.pref.walking': 'Menos caminhada',
|
|
'transit.search': 'Buscar',
|
|
'transit.searching': 'Buscando…',
|
|
'transit.searchError': 'Falha na busca de rota. Tente novamente.',
|
|
'transit.noResultsVia': 'Nenhuma conexão encontrada via {provider}. Tente outro horário ou outros filtros.',
|
|
'transit.noResults': 'Nenhuma conexão encontrada. Tente outro horário ou filtros.',
|
|
'transit.direct': 'Direto',
|
|
'transit.transfers': '{count} baldeações',
|
|
'transit.min': '{count} min',
|
|
'transit.stops': '{count} paradas',
|
|
'transit.walkTo': 'Caminhar até {name}',
|
|
'transit.platform': 'Plataforma {track}',
|
|
'transit.adding': 'Adicionando…',
|
|
'transit.addToDay': 'Adicionar ao dia',
|
|
'transit.itinerary': 'Itinerário',
|
|
'transit.attribution': 'Dados de rota via',
|
|
'transport.modeManual': 'Manual',
|
|
'transport.modeAutomated': 'Automático',
|
|
'transit.sectionTitle': 'Transporte público automático',
|
|
'transit.changeRoute': 'Alterar trajeto',
|
|
'transit.editDetails': 'Editar detalhes',
|
|
'transit.journey': 'Viagem de transporte público',
|
|
'transit.pickDay': 'Escolha um dia para buscar conexões.',
|
|
'transit.noItinerary': 'Esta entrada não tem itinerário salvo — use "Alterar trajeto" para buscar um.',
|
|
'transit.durationLabel': 'Duração',
|
|
'transit.transfersLabel': 'Baldeações',
|
|
'transit.walkLabel': 'A pé',
|
|
'transit.searchHint': 'Busque conexões reais e adicione direto ao dia — dados via Transitous.',
|
|
};
|
|
export default trip;
|