mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-06-19 13:21:46 +00:00
6ef3c7ae6b
* feat(reservations): native booking-confirmation import via KDE KItinerary
Adds a two-step preview → confirm flow for importing booking emails,
PDFs, PKPass and HTML confirmations. The server invokes the KDE
kitinerary-extractor binary, maps JSON-LD schema.org output to TREK
reservation shapes, and persists via the existing createReservation
pipeline (accommodations, budget, places, WebSocket broadcasts).
- NestJS BookingImportModule: preview + confirm endpoints under
/api/trips/:tripId/reservations/import/booking{,/confirm}
- KitineraryExtractorService: spawns the binary, filters stderr noise,
handles QDateTime (@value) timezone-aware datetimes
- kitinerary-mapper: FlightReservation, TrainReservation, BusReservation,
BoatReservation, LodgingReservation, FoodEstablishmentReservation,
RentalCarReservation, EventReservation → typed preview items
- BookingImportService: auto-creates place rows; geocodes venues without
coordinates via Nominatim (name+address → address → name fallback);
resolves day IDs for accommodation linking
- BookingImportModal: drag-and-drop multi-file upload, preview cards
with type icons, per-item exclude toggle, confirm step
- Shared Zod contracts: BookingImportPreviewItem, PreviewResponse,
ConfirmRequest, ConfirmResponse — consumed by controller, service,
API client and modal
- Dockerfile: node:24-trixie-slim runtime; amd64 downloads KDE static
binary + locales; arm64 installs libkitinerary-bin + symlinks to
fixed path; ENV KITINERARY_EXTRACTOR_PATH set for both arches
- /api/health/features exposes { bookingImport: boolean } so the UI
hides the Import button when the binary is absent
- i18n keys (English), wiki docs, API.md, README one-liner
* i18n: add booking import translations for all 19 non-English locales
Adds 17 reservations.import.* keys and undo.importBooking to ar, br, cs,
de, es, fr, gr, hu, id, it, ja, ko, nl, pl, ru, tr, uk, zh, zh-TW.
* chore: enforce i18n parity
* docs(wiki): add KItinerary local setup instructions to dev environment guide
23 lines
1.1 KiB
TypeScript
23 lines
1.1 KiB
TypeScript
import type { TranslationStrings } from '../types';
|
|
|
|
const undo: TranslationStrings = {
|
|
'undo.button': 'Отменить',
|
|
'undo.tooltip': 'Отменить: {action}',
|
|
'undo.assignPlace': 'Место добавлено в день',
|
|
'undo.removeAssignment': 'Место удалено из дня',
|
|
'undo.reorder': 'Места переупорядочены',
|
|
'undo.optimize': 'Маршрут оптимизирован',
|
|
'undo.deletePlace': 'Место удалено',
|
|
'undo.deletePlaces': 'Места удалены',
|
|
'undo.moveDay': 'Место перемещено в другой день',
|
|
'undo.lock': 'Блокировка места изменена',
|
|
'undo.importGpx': 'Импорт GPX',
|
|
'undo.importKeyholeMarkup': 'Импорт KMZ/KML',
|
|
'undo.importGoogleList': 'Импорт из Google Maps',
|
|
'undo.importNaverList': 'Импорт из Naver Maps',
|
|
'undo.addPlace': 'Место добавлено',
|
|
'undo.done': 'Отменено: {action}',
|
|
'undo.importBooking': 'Импорт подтверждения бронирования',
|
|
};
|
|
export default undo;
|