Skip to content

Commit

Permalink
Merge branch 'dev' into require-acct-setup-before-saving-locations
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup authored Oct 23, 2023
2 parents 7946e55 + d35b2cd commit 823bba9
Show file tree
Hide file tree
Showing 36 changed files with 1,066 additions and 164 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ jobs:
auto-approve-and-automerge:
# sources:
# https://github.com/hmarr/auto-approve-action
# https://github.com/marketplace/actions/enable-github-automerge
# https://github.com/marketplace/actions/enable-pull-request-automerge#dependabot-example
runs-on: ubuntu-latest
permissions:
Expand All @@ -15,6 +16,6 @@ jobs:
- name: Auto-approve PR
uses: hmarr/auto-approve-action@v3
- name: Enable auto-merge
run: gh pr merge --merge --auto ${{ github.event.pull_request.number }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: alexwilson/enable-github-automerge-action@main
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/percy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Download OTP2 config file
run: curl $PERCY_OTP2_CONFIG_URL --output /tmp/otp2config.yml
env:
PERCY_OTP2_CONFIG_URL: ${{ secrets.PERCY_MOCK_OTP2_GEOCODER_CONFIG }}
PERCY_OTP2_CONFIG_URL: ${{ secrets.PERCY_MOCK_OTP2_GEOCODER_CALLTAKER_CONFIG }}
- name: Build OTP-RR Calltaker
# Calltaker has a separate config file, so another build should be produced.
run: yarn build
Expand Down
467 changes: 467 additions & 0 deletions __tests__/components/viewers/__snapshots__/stop-viewer.js.snap

Large diffs are not rendered by default.

46 changes: 33 additions & 13 deletions __tests__/util/ui.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { getItineraryView, ItineraryView } from '../../lib/util/ui'
import {
getItineraryView,
getMapToggleNewItineraryView,
ItineraryView
} from '../../lib/util/ui'

describe('util > ui', () => {
describe('getItineraryView', () => {
Expand All @@ -17,18 +21,21 @@ describe('util > ui', () => {
)
})
it('returns an itinerary list view if URL contains ui_activeItinerary=-1 regardless of ui_itineraryView', () => {
expect(
getItineraryView({
ui_activeItinerary: -1,
ui_itineraryView: ItineraryView.FULL
})
).toBe(ItineraryView.LIST)
expect(
getItineraryView({
ui_activeItinerary: -1,
ui_itineraryView: ItineraryView.LEG
})
).toBe(ItineraryView.LIST)
const expectedValues = {
[ItineraryView.FULL]: ItineraryView.LIST,
[ItineraryView.LEG]: ItineraryView.LIST,
[ItineraryView.LEG_HIDDEN]: ItineraryView.LIST,
[ItineraryView.LIST]: ItineraryView.LIST,
[ItineraryView.LIST_HIDDEN]: ItineraryView.LIST_HIDDEN
}
Object.entries(expectedValues).forEach(([k, v]) => {
expect(
getItineraryView({
ui_activeItinerary: -1,
ui_itineraryView: k
})
).toBe(v)
})
})
it('returns the specified view mode when set in URL', () => {
expect(
Expand All @@ -39,4 +46,17 @@ describe('util > ui', () => {
).toBe(ItineraryView.LEG)
})
})
describe('getMapToggleNewItineraryView', () => {
it('should obtain the new itinerary view value', () => {
const expectedValues = {
[ItineraryView.LEG]: ItineraryView.LEG_HIDDEN,
[ItineraryView.LEG_HIDDEN]: ItineraryView.LEG,
[ItineraryView.LIST]: ItineraryView.LIST_HIDDEN,
[ItineraryView.LIST_HIDDEN]: ItineraryView.LIST
}
Object.entries(expectedValues).forEach(([k, v]) => {
expect(getMapToggleNewItineraryView(k)).toBe(v)
})
})
})
})
3 changes: 3 additions & 0 deletions example-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ itinerary:
# Whether the plan first/previous/next/last buttons should be shown along with
# plan trip itineraries.
showPlanFirstLastButtons: false
# Filters out trips returned by OTP by default, unless specifically requested.
# e.g. filters out walk-only itineraries if user has not explicitly asked for them.
strictItineraryFiltering: false
# Whether to render route names and colors in the blocks inside
# the batch ui rows
renderRouteNamesInBlocks: true
Expand Down
1 change: 1 addition & 0 deletions i18n/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,7 @@ components:
notificationsDisabled: "Notifications: <strong>Disabled</strong>"
TripTools:
copyLink: Copy Link
header: Trip Tools
linkCopied: Copied
reportEmailSubject: Reporting an Issue with OpenTripPlanner
reportEmailTemplate: >
Expand Down
30 changes: 21 additions & 9 deletions i18n/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ actions:
No se puede guardar el plan: este plan no se pudo guardar debido a la
falta de capacidad en uno o más vehículos. Por favor, vuelva a planificar
su viaje.
maxTripRequestsExceeded: Número de solicitudes de viaje superadas sin resultados válidos
maxTripRequestsExceeded: Número de solicitudes de viaje superadas sin resultados
válidos
saveItinerariesError: "No se pudieron guardar los itinerarios: {err}"
setDateError: "Error al establecer la fecha:"
setGroupSizeError: "No se pudo establecer el tamaño del grupo:"
Expand All @@ -52,9 +53,13 @@ actions:
authTokenError: Error al obtener un token de autorización.
confirmDeleteMonitoredTrip: ¿Desea eliminar este viaje?
confirmDeletePlace: ¿Quiere eliminar este lugar?
emailVerificationResent: El mensaje de verificación de correo electrónico ha sido reenviado.
emailVerificationResent: El mensaje de verificación de correo electrónico ha sido
reenviado.
genericError: "Se ha encontrado un error: {err}"
itineraryExistenceCheckFailed: Comprobación de errores para ver si el viaje seleccionado es posible.
itineraryExistenceCheckFailed: Comprobación de errores para ver si el viaje seleccionado
es posible.
mustBeLoggedInToSavePlace: Por favor, inicia la sesión para guardar las ubicaciones.
placeRemembered: La configuración de este lugar se ha guardado.
preferencesSaved: Sus preferencias se han guardado.
smsInvalidCode: El código introducido no es válido. Por favor, inténtelo de nuevo.
smsResendThrottled: >-
Expand Down Expand Up @@ -243,7 +248,8 @@ components:
a incluir el transporte publico en la selección de modos.
origin: origen
planTripTooltip: Planificar viaje
validationMessage: "Por favor, defina los siguientes campos para planificar un viaje: {issues}"
validationMessage: "Por favor, defina los siguientes campos para planificar un
viaje: {issues}"
BeforeSignInScreen:
mainTitle: Iniciando sesión
message: >
Expand Down Expand Up @@ -485,6 +491,7 @@ components:
tripsFound: Encontramos {count, plural, one {# opción} other {# opciones}}
waiting: Espera...
RouteDetails:
headsignTo: "{headsign} ({lastStop})"
moreDetails: Más detalles
operatedBy: Servicio operado por {agencyName}
selectADirection: Seleccione una dirección…
Expand Down Expand Up @@ -544,7 +551,8 @@ components:
header: ¡La sesión está a punto de terminar!
keepSession: Continuar sesión
SimpleRealtimeAnnotation:
usingRealtimeInfo: Este viaje utiliza información de tráfico y retrasos en tiempo real
usingRealtimeInfo: Este viaje utiliza información de tráfico y retrasos en tiempo
real
StackedPaneDisplay:
savePreferences: Guardar preferencias
StopScheduleTable:
Expand Down Expand Up @@ -607,16 +615,19 @@ components:
travelingAt: Viajando a {milesPerHour}
vehicleName: Vehículo {vehicleNumber}
TripBasicsPane:
checkingItineraryExistence: Comprobación de la existencia de itinerarios para cada día de la semana…
checkingItineraryExistence: Comprobación de la existencia de itinerarios para
cada día de la semana…
selectAtLeastOneDay: Por favor, seleccione al menos un día para el seguimiento.
tripDaysPrompt: ¿Qué días hace este viaje?
tripIsAvailableOnDaysIndicated: Su viaje está disponible en los días de la semana indicados anteriormente.
tripIsAvailableOnDaysIndicated: Su viaje está disponible en los días de la semana
indicados anteriormente.
tripNamePrompt: "Por favor, indique un nombre para este viaje:"
tripNotAvailableOnDay: El viaje no está disponible el {repeatedDay}
unsavedChangesExistingTrip: >-
Todavía no ha guardado su viaje. Si abandona la página, los cambios se
perderán.
unsavedChangesNewTrip: Todavía no ha guardado su nuevo viaje. Si abandona la página, se perderá.
unsavedChangesNewTrip: Todavía no ha guardado su nuevo viaje. Si abandona la página,
se perderá.
TripNotificationsPane:
advancedSettings: Configuración avanzada
altRouteRecommended: Se recomienda una ruta alternativa o un punto de transferencia
Expand Down Expand Up @@ -697,9 +708,10 @@ components:
notifications: >-
Notificaciones: <strong>{leadTimeInMinutes} minutos antes de la salida
programada</strong>
notificationsDisabled: "Notificaciones: <strong>Disabled</strong>"
notificationsDisabled: "Notificaciones: <strong>Desactivadas</strong>"
TripTools:
copyLink: Copiar enlace
header: Herramientas
linkCopied: Copiado
reportEmailSubject: Informar un problema con OpenTripPlanner
reportEmailTemplate: >
Expand Down
1 change: 1 addition & 0 deletions i18n/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ components:
notificationsDisabled: "Notifications : <strong>Désactivées</strong>"
TripTools:
copyLink: Copier le lien
header: Outils
linkCopied: Copié
reportEmailSubject: Signaler un problème avec OpenTripPlanner
reportEmailTemplate: >
Expand Down
8 changes: 6 additions & 2 deletions i18n/ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ actions:
fetchFieldTripsError: "트립을 가져오는 중에 오류가 발생했습니다: {err}"
fetchTripsForDateError: "필트 트립 날짜에 대한 트립을 가져오는 중에 오류가 발생했습니다: {err}"
incompatibleTripDateError: 계획한 트립 날짜({tripDate})가 요청한 트립 날짜({requestDate})가 아닙니다
itineraryCapacityError: "플랜을 저장할 수 없습니다: 하나 이상의 차량의 용량이 부족하여 이 플랜을 저장할 수 없습니다. 트립을 다시 계획하세요."
itineraryCapacityError: "플랜을 저장할 수 없습니다: 하나 이상의 차량의 용량이 부족하여 이 플랜을 저장할 수 없습니다.
트립을 다시 계획하세요."
maxTripRequestsExceeded: 유효한 결과없이 초과된 트립 요청의 개수
saveItinerariesError: "트립을 저장하는 데 실패했습니다: {err}"
setDateError: "날짜를 설정하는 중에 오류가 발생했습니다:"
Expand Down Expand Up @@ -504,6 +505,7 @@ components:
notifyViaChannelWhen: "다음의 경우, {channel}을 통해 알려주세요:"
oneHour: 1 시간
realtimeAlertFlagged: 내 트립 일정에 실시간 경고가 있습니다
timeBefore: '{time} 전'
TripStatus:
alerts: "{alerts, plural, one {# 경고!} other {# 경고!}}"
deleteTrip: 트립 삭제
Expand Down Expand Up @@ -561,6 +563,7 @@ components:
notificationsDisabled: "알림: <strong>비활성화됨</strong>"
TripTools:
copyLink: 링크 복사
header: 도구
linkCopied: 복사됨
reportEmailSubject: OpenTripPlanner로 문제 보고
reportEmailTemplate: |
Expand Down Expand Up @@ -640,5 +643,6 @@ util:
networkUnavailable: 현재 {network} 네트워크를 사용할 수 없습니다.
noTripFound: 트립을 찾을 수 없습니다.
noTripFoundForMode: "{modes}의 트립을 찾을 수 없습니다."
noTripFoundReason: 지정된 최대 거리 내 또는 지정된 시간에 대중 교통 서비스가 없거나, 출발지 또는 도착지가 안전하게 접근가능하지 못할 수 있습니다.
noTripFoundReason: 지정된 최대 거리 내 또는 지정된 시간에 대중 교통 서비스가 없거나, 출발지 또는 도착지가 안전하게 접근가능하지
못할 수 있습니다.
noTripFoundWithReason: "{noTripFound} {reason}"
135 changes: 135 additions & 0 deletions i18n/tr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
_id: en-US
actions:
fieldTrip:
saveItinerariesError: 'Seyahat planları kaydedilemedi: {err}'
setDateError: 'Tarih ayarlanırken hata oluştu:'
fetchFieldTripError: ''
setGroupSizeError: 'Grup boyutu ayarlanırken hata oluştu:'
maxTripRequestsExceeded: Geçerli sonuçlar olmadan yolculuk isteklerinin sayısı
aşıldı
setPaymentError: 'Ödeme bilgileri ayarlanırken hata oluştu:'
setRequestStatusError: 'İstek durumu ayarlanırken hata oluştu:'
editSubmitterNotesError: 'Gönderenin notları düzenlenirken hata oluştu:'
user:
emailVerificationResent: E-posta doğrulama mesajı yeniden gönderildi.
genericError: 'Bir hata ile karşılaşıldı: {err}'
smsVerificationFailed: Telefonunuz doğrulanamadı. Girdiğiniz kodun süresi dolmuş
olabilir. Lütfen yeni bir kod isteyin ve tekrar deneyin.
authTokenError: Yetkilendirme anahtarı alınırken hata oluştu.
mustBeLoggedInToSavePlace: Konumları kaydetmek için lütfen giriş yapın.
itineraryExistenceCheckFailed: Seçtiğiniz seyahatin mümkün olup olmadığı kontrol
edilirken hata oluştu.
smsInvalidCode: Girdiğiniz kod geçersiz. Lütfen tekrar deneyin.
accountDeleted: Kullanıcı hesabınız ({email}) silindi.
preferencesSaved: Tercihleriniz kaydedilmiştir.
placeRemembered: Bu yerin ayarları kaydedildi.
confirmDeletePlace: Bu yeri kaldırmak ister misiniz?
smsResendThrottled: Belirtilen telefon numarasına bir dakikadan kısa süre önce
bir doğrulama SMS'i gönderildi. Lütfen birkaç dakika sonra tekrar deneyin.
location:
userDeniedPermission: Kullanıcı izni reddetti
deniedAccessAlert: "Konumunuza erişim engellendi.\nMevcut konumunuzu kullanmak
için tarayıcınızdan konum izinlerini etkinleştirin ve sayfayı yeniden yükleyin.
\n"
unknownPositionError: Konum alınırken bilinmeyen hata
geolocationNotSupportedError: Coğrafi konum tarayıcınız tarafından desteklenmiyor
callTaker:
fetchCallsError: 'Çağrılar alınırken hata oluştu: {err}'
queryFetchError: 'Sorgular alınırken hata oluştu: {err}'
map:
currentLocation: (Mevcut Konum)
common:
daysOfWeekPlural:
thursday: Perşembeler
tuesday: Salılar
saturday: Cumartesileri
friday: Cumalar
monday: Pazartesileri
wednesday: Çarşambalar
sunday: Pazarları
modes:
car: Araba
micromobility_rent: E-Skutır
subway: Metro
micromobility: E-Skutır
rent: Kiralama seçenekleri
walk: Yürümek
funicular: Füniküler
car_park: Park Et Devam Et
flex: Esnek Rotalar
ferry: Feribot
bike: Bisiklet
tram: Tramvay
gondola: Gondol
drive: Sürücü
cable_car: Teleferik
rail: Demiryolu
bus: Otobüs
bicycle_rent: Bisiklet paylaşımı
notifications:
email: eposta
push: bildirimler
sms: SMS
daysOfWeekCompact:
wednesday: Çar
thursday: Per
sunday: Paz
tuesday: Sal
saturday: Cmt
friday: Cum
monday: Pzt
itineraryDescriptions:
fareUnknown: Ücret bilgisi yok
forms:
"yes": Evet
print: Yazdır
"no": Hayır
finish: Bitiş
submitting: Gönderiliyor…
startOver: Baştan Başla
close: Kapat
edit: Düzenle
delete: Sil
save: Kaydet
cancel: İptal
back: Geri
error: hata!
next: Sonraki
defaultValue: '{value} (varsayılan)'
daysOfWeek:
sunday: Pazar
wednesday: Çarşamba
saturday: Cumartesi
friday: Cuma
monday: Pazartesi
tuesday: Salı
thursday: Perşembe
dateExpressions:
tomorrow: Yarın
yesterday: Dün
today: Bugün
coordinates: '{lat}, {lon}'
linkOpensNewWindow: (Yeni pencere açar)
places:
home: ev
dining: yemek
work:
searchForms:
click: tıkla
time:
duration:
aFewSeconds: birkaç saniye
components:
AddPlaceButton:
addPlace: Yer ekle
tooManyPlaces: Maksimum ara yerlere ulaşıldı
needOriginDestination: Ara yerler eklemek için başlangıç/bitiş noktasını tanımlayın
AfterSignInScreen:
mainTitle: Yönlendiriliyor...
A11yPrefs:
accessibilityRoutingByDefault: Varsayılan olarak erişilebilir seyahatleri tercih
et
AdvancedOptions:
preferredRoutes: Tercih edilen rotaları seçin...
bannedRoutes: Yasaklanan rotaları seç…
_name: İngilizce
1 change: 1 addition & 0 deletions i18n/vi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,7 @@ components:
notificationsDisabled: "Thông báo: <strong>Đã tắt</strong>"
TripTools:
copyLink: Sao chép URL
header: Công cụ
linkCopied: Đã sao chép
reportEmailSubject: Báo cáo sự cố với OpenTripPlanner
reportEmailTemplate: |
Expand Down
2 changes: 2 additions & 0 deletions i18n/zh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ components:
notifyViaChannelWhen: "通过 {channel} 通知我当:"
oneHour: 1小时
realtimeAlertFlagged: 在我的行程中有一个实时警报标志着
timeBefore: '{time} 前'
TripStatus:
alerts: "{alerts, plural, one {# 警报!} other {# 警报!}}"
deleteTrip: 删除行程
Expand Down Expand Up @@ -559,6 +560,7 @@ components:
notificationsDisabled: "通知: <strong>已禁用</strong>"
TripTools:
copyLink: 复制链接
header: 工具
linkCopied: 已复制
reportEmailSubject: 报告OpenTripPlanner的问题
reportEmailTemplate: |
Expand Down
Loading

0 comments on commit 823bba9

Please sign in to comment.