fix: eleven reported bugs across atlas, budget, collections, journey, vacay and the LLM settings (#1923)

* fix(mcp): accept per-leg times on create_transport and update_transport

metadata was pinned to Record<string, string>, so a legs array could not get
through and a multi-leg flight built over MCP lost every intermediate time. The
booking ended up with correct endpoints and no legs, which every reader then
treats as a single segment.

legs is now a real, typed parameter with its contract in @trek/shared, shaped
exactly the way the planner form and the importers write metadata.legs. The
folding checks what the readers depend on: one leg fewer than endpoints (the
AirTrail dedupe builds its signatures on that), day ids that belong to the trip,
airport codes that agree with their endpoint, and the times, where a stopover
endpoint carries the departure and the last one the arrival.

metadata keeps its type and its replace semantics. Segments smuggled through
metadata.legs as a JSON string used to be stored and then ignored by everything
that read them; they are refused now and point at the legs parameter instead.

Closes #1914

* fix(atlas): refuse a bucket list entry that is already on the list

Nothing gave a bucket entry an identity, so the same country could be added as
often as it was clicked. A wish is now identified by name, country, target date
and, where it has them, coordinates. A different target date is a different wish
and still lands, which is what the report asked for; two real places sharing a
name stay separate because their coordinates differ.

Empty string and NULL are normalised on both sides of the comparison, otherwise
the dateless case, which is the one that was reported, would slip through.

Deliberately no unique index and no migration. better-sqlite3 is synchronous and
the server is a single process, so the race an index would guard against cannot
happen here, and an index would have needed a destructive dedupe of existing
rows first.

create_bucket_list_item had no target_date parameter at all, so over MCP the
allowed "same place, other date" case was unreachable. It takes one now. The
plugin RPC reports the duplicate as bad params instead of letting it surface as
an internal error.

Closes #1898

* fix(settings): keep a free-form LLM endpoint in admin hands

Any account could name the address the server calls, and the guard in front of
it deliberately allows loopback and LAN so a self-hosted Ollama works. That is a
reasonable trade for whoever runs the instance, because the network is theirs. It
is not one for an arbitrary account, which could aim a request from inside that
network at a target only it chose and read how the target answered.

A free base URL, and the local provider that is one by another name, now come
only from an admin controlled source: the addon config, the instance-wide
defaults, or an admin's own settings. OpenAI and Anthropic stay available to
everyone, because they go to a fixed address with the user's own key.

The resolver is where this is enforced, since it is the single point both the
booking import and the plugin host pass through, and the only one that also
covers values already sitting in the database. The write path refuses as well,
so nothing is stored that would never be read.

The hint text promised something users no longer have, so it changed with it.

Closes #1772

* fix(calendar): span a date-only booking to its end date

A DATE event without DTEND is exactly one day per RFC 5545, so a multi-day
booking that carries an end date still collapsed onto its first day. It gets an
exclusive DTEND now, built the same way the stay branch already builds one. A
booking without an end date serialises byte for byte as before.

While in here: the stays query joins reservations on the accommodation, and two
bookings pointed at the same stay fanned it out into two events sharing one UID.
Duplicate UIDs in a feed are undefined behaviour and calendar clients pick one at
random.

The same "at most one booking per stay" assumption sat in the accommodations
service, where it was worse than cosmetic: accommodation_id carries no foreign
key, so deleting a stay took only the first booking and left the second pointing
at something that no longer existed. Both the sync and the delete walk all of
them now. The callers keep reading linkedReservationId; the list is additional.

Refs #1869

* fix(vacay): say that the region is required, because it is

The placeholder called the region optional while the add button stayed disabled
until one was picked. The wording predates multiple calendars per plan, which is
what introduced the gate. Only the value of the existing key changed, in all
locales, so the key set stays identical.

Two things the same screen got wrong were in the way of a clean answer:

The button was clickable while the region list was still loading, which put the
user in exactly the state the wording describes, and it is the state the report
was filed from. It waits for the list now.

Changing the country on an existing calendar kept the previous country's regions
on screen, so a German region could be picked for the Netherlands. The list is
cleared with the country, which only works in combination with the loading gate:
without it, the empty list would happen to enable the button instead.

Closes #1813

* fix(collections): let a saved place's address be corrected

The edit form offered name, category and labels, and the address only on the way
in. The cause was not the form: the update contract never declared address, so
the validation pipe stripped it and the UPDATE had no column for it. Coordinates
were pulled through for #1435 and the address was missed.

It travels the whole chain now, contract to service to both forms. No migration,
the column has always been there.

The mobile add sheet had no address input at all, showing whatever the search
result carried as read-only, so editing would have worked while creating still
would not. It has one.

The MCP tool description had drifted further than the address, never having
mentioned the coordinates either. Both are in it now.

Closes #1870

* fix(collections): keep the place search usable after the first save

The add dialog stays open on purpose so several places can be added in a row, but
after a save it gave no way back into the search. A search with no results was
silent, with no empty state and no toast, so typing another name and pressing
enter looked like nothing happened. The reporter described both halves and it is
the silent search that matches "nothing happens" most closely.

There is an empty state now, using a key that already existed in every locale and
was unused. The search row is sticky inside the dialog body, so it stays reachable
after the save instead of sitting above the scroll position.

Also fixed while in here: refreshing the collection after each add reset the
select mode, the selection and the label filter. In the very flow this dialog is
built for, the user quietly lost all three.

Closes #1921

* fix(vacay): make the phone year grid and the dock button do what they look like

Two separate faults met on this screen.

Tapping a day in the year grid did nothing unless the edit mode was already on,
and the only way into it was a floating button that looks exactly like the one
the dock draws in the same spot. A tap now opens that month in the editor, where
the cells are big enough to hit. At 390px the grid cells are around 21px, which
is too small to be mutating data with in the first place.

The dock's plus was not wired for this route, so it fell through to creating a
trip on the dashboard. Two different actions were stacked in one place, and the
wrong one was on top whenever the screen had not painted yet, which includes the
time its chunk is still loading. The dock leaves the slot to the screen now, and
holds the geometry so the tab groups stay symmetric.

Closes #1811

* fix(budget): settle in whole cents so balances stop drifting

The report is a balance that moves on its own, with nothing added, edited or
removed, on a trip where everything is in euro. Two mechanisms were behind it and
both are real.

The display currency is a fourth value, a per-user setting, so "everything is in
euro" never covered it. Each balance was converted and rounded on its own, and
the set no longer summed to zero: at 0.855 and 0.9312 it came out one cent over,
at 0.94 it came out even. That cent appears and disappears with the six hour rate
cache alone, which is exactly the symptom. The flows were rounded separately from
the balances, so the two never had to agree.

And a receipt line nobody was ticked for counted toward the total, and therefore
toward the payer's credit, while landing in no share. That difference is
permanent, and the client sent it that way.

The settlement converts once, at the edge, and does integer arithmetic after
that. Equal splits distribute the credited cents by largest remainder rather than
the entered total, so credits and debits of one expense cancel exactly even in a
foreign currency. Display conversion goes through the same largest-remainder
allocation, so the sum survives it.

With that, the 0.01 epsilon can go. It could never create a cent, but it stranded
them: a one cent balance was filtered out of the flows while staying visible in
the list, which is the "settle up offers nothing" half of the report.

Closes #1382

* fix(journey): reach the book export and the suggestion toggle on a phone

Below 1024px the hero card is dropped, and it held the only way to either action.
The floating bar that replaces it was never given them. It has them now, and the
hero is unmounted rather than hidden, so there is no second invisible copy of the
same controls in the document. The bar's own buttons moved onto the appearance
tokens while they were being touched.

The phone screen never had either action at all and now carries both.

The book itself was hardwired to English, cover and dates included, while the
keys for it had been sitting in every locale unused. It takes the page's
translator and locale, sets the document language, and prints mood and weather,
which were on screen but never in the book.

Closes #1848

* fix(journey): offer the connected photo providers in the phone entry editor

The desktop editor grew an external photo source in #1632; the phone editor that
came out of the mobile rewrite never did, so editing an entry on a phone had no
way to Immich or Synology. It mirrors the desktop mechanics, including the part
that is easy to miss: a save that creates the entry and then fails on the photos
keeps the sheet open, and without remembering what was just created the retry
creates a second entry.

The sheet no longer kicks off its own addon load. The list is loaded once on
boot and this only reacts to it; a second load races the other consumers and
overwrites the store when it lands.

Closes #1808

* fix(mobile): let the document scroll so Safari can collapse its URL bar

iOS Safari only shrinks its address bar when the document scrolls, and TREK's
never did: the root was locked and the mobile shell put a scroll container inside
it. On the bottom tab layout that costs about a sixth of the viewport,
permanently.

Below 768px the document is the scroller again and the full-bleed screens measure
their own height instead of leaning on the shell.

That makes the body scroll locks real for the first time on a phone, and they
were not ready for it. Three of them reset the overflow unconditionally, one of
those on every run of its effect rather than on unmount, so a system notice could
hand the page back while a sheet was still open. They all go through one
reference counted lock now, which is the part that had to land first.

Worth knowing for the issue: this reaches the flow screens. The trip planner, the
journal, the atlas and the vacay screen keep their own full-height scrollers and
still will not collapse the bar.

Closes #1809

* fix(mobile): keep the screen gradient visible behind the translucent cards

The gradient layer introduced with the scroll change sat at z-index -10. A
negative layer paints above the canvas but below the backgrounds of ordinary
blocks, and body carries an opaque one, so the gradient was hidden behind it.
The mobile cards are translucent and take their depth from what is behind them,
so every surface ended up compositing against a single flat colour and the whole
phone UI read as one tone.

The layer is positioned at z-index 0 now and the content above it at 10, which
puts both over body's background. Same visual as before the scroll change, and
the shell still owns no scroll container.

* test(reservations): teach the accommodation delete stub about the id lists

The RPC walks every linked booking since the delete stopped stopping at the
first one. The stub still answered with the two singular fields, so the loop had
nothing to iterate and the cascade events never fired.

* fix(settings): move the free-form LLM endpoint out of user settings entirely

Hiding it from non-admins closed the hole, but it left the option sitting in the
admin's own personal settings, which is not what was asked for and not where it
belongs: an instance has exactly one address it calls out to, and there was a
second, invisible place to set it.

The provider list is now the two hosted ones for everybody, the endpoint field is
gone, and the resolver takes the address from the admin-controlled instance
defaults for every caller including an admin. It no longer reads the users table
at all. The write path refuses the keys for everyone, so nothing can be stored
that would never be read.

The endpoint is configured on the addon in the admin settings, which already
carries provider, model, base URL and key, plus the Ollama model list. Nothing
is lost, it just has one home now.

Behaviour change worth a release note: an admin who set a personal Ollama
endpoint has to move it to the addon config. A non-admin was already in that
position after the previous commit.

Refs #1772

* fix(journey): make the book preview usable on a phone

The preview document carried no viewport, so a phone laid it out at its default
980px while the page is A4 landscape and about 1123px wide. It spilled out of
the frame, which reads as being zoomed far in. Declaring the real width lets the
browser scale the page to fit. Printing is unaffected, it goes by @page.

The preview chrome had the same problem in miniature: a title and two labels on
one row, sized inline, which does not fit a phone and fits translated labels
even less. It moved to a stylesheet, and below 640px the card goes full-bleed,
the decorative title steps aside and the two actions share the width.

Refs #1848

* fix(mobile): stop the shell trapping the screens' own overlays

Lifting the background layer into the positioned range meant the content wrapper
had to be positioned too, and a positioned wrapper with a z-index is a stacking
context. Every fixed overlay a screen renders inside it got clamped to that
level: the vacay view/edit FAB sits at z-50 precisely so it beats the dock at
z-40, and it disappeared behind it.

The layer goes back to a negative z-index and the wrapper back to no positioning
at all. What it needed in the first place was for body to stop painting over it,
which is one line in the phone media block rather than a new stacking context.

* fix(mobile): let the phone background override actually win

A media query adds no specificity, so the themed body rule further down the file
kept winning on source order and painted over the shell's background layer. The
override is on html body now.

The gradient was back to being invisible, which is the flat single-tone phone UI
again.

* fix(vacay): draw today's ring around the day instead of replacing it

On the phone, today short-circuited the day-cell matrix and returned a ring on an
empty cell. A vacation day or a company holiday logged for today was stored and
counted in the totals, but the cell showed nothing, so it read as if the tap had
not taken.

Today is an annotation now, layered like the school band and the shared-calendar
rings, which is how the desktop month card has always treated it. The strong ink
stays only where the cell has no fill of its own, since --m-ink is light in dark
mode and would disappear on a pastel.

* fix(map): stop serving a stale GL style document from the service worker

The Workbox rule for Mapbox matched every URL under api.mapbox.com, and the
style document lives there too. Under StaleWhileRevalidate the map was built
from the previous revision on every load, with the refresh landing one load too
late, so a style republished in Studio with different label languages kept
rendering the old ones. The network tab showed a 200 throughout, because the
service worker's own answer is a real 200, which is why this looked like the app
rewriting text-field at runtime.

The style now has its own rule ahead of the tile rules, on NetworkFirst so it is
current whenever the network is, and still cached so the map opens offline. Its
own small cache too: sharing an LRU with three thousand tiles made the staleness
come and go at random. OpenFreeMap styles had the same problem and are covered
by the same rule.

Closes #1924
This commit is contained in:
Maurice
2026-08-13 14:06:35 +02:00
committed by GitHub
parent 3c5e406229
commit 9dd0a851ca
176 changed files with 4988 additions and 690 deletions
@@ -2,6 +2,7 @@ import {
collectionDeleteManyRequestSchema,
collectionPlaceUpdateRequestSchema,
collectionReorderRequestSchema,
collectionSavePlaceRequestSchema,
} from './collection.schema';
import { describe, expect, it } from 'vitest';
@@ -23,6 +24,27 @@ describe('collectionPlaceUpdateRequestSchema', () => {
it('catches an invalid status back to idea rather than throwing', () => {
expect(collectionPlaceUpdateRequestSchema.parse({ status: 'bogus' as never }).status).toBe('idea');
});
// #1870: the update contract knew no `address`, so the validation pipe stripped
// it and the address of a saved place could never be corrected.
it('passes an address through and accepts null to clear it', () => {
expect(collectionPlaceUpdateRequestSchema.parse({ address: 'Via Nuova 1' }).address).toBe('Via Nuova 1');
expect(collectionPlaceUpdateRequestSchema.parse({ address: null }).address).toBeNull();
});
it('leaves an absent address absent, so an unrelated edit keeps the stored one', () => {
const parsed = collectionPlaceUpdateRequestSchema.parse({ name: 'Trevi Fountain' });
expect('address' in parsed).toBe(false);
expect(parsed.address).toBeUndefined();
});
// Save and update must cap the address the same way (neither does): a limit on
// one side only would reject on edit what saving accepted.
it('caps the address on neither the save nor the update side', () => {
const long = 'x'.repeat(5000);
expect(collectionPlaceUpdateRequestSchema.parse({ address: long }).address).toBe(long);
expect(collectionSavePlaceRequestSchema.parse({ collection_id: 1, name: 'X', address: long }).address).toBe(long);
});
});
// The two ratchet schemas replace hand-rolled "array of numbers" checks — they
@@ -188,6 +188,10 @@ export const collectionPlaceUpdateRequestSchema = z.object({
// Editable coordinates so a place added by GPS can be corrected later (#1435).
lat: z.number().nullable().optional(),
lng: z.number().nullable().optional(),
// Free-text address, correctable after saving (#1870): the add dialog always
// offered it, the edit form did not. Deliberately uncapped, exactly like
// collectionSavePlaceRequestSchema.address, so save and update stay in step.
address: z.string().nullable().optional(),
// .removeDefault() strips the inner .default('idea') so an ABSENT status parses to
// undefined (left unchanged) instead of being injected as 'idea' (see #1437). The
// .catch('idea') guard against invalid values is preserved.
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'إزالة من قائمة الأمنيات',
'atlas.removeFromBucketHint': 'إزالة هذا البلد من قائمة أمنياتك',
'atlas.bucketWhen': 'متى تخطط للزيارة؟',
'atlas.bucketDuplicate': 'موجود بالفعل في قائمة الأمنيات',
'atlas.statsTab': 'الإحصائيات',
'atlas.bucketTab': 'قائمة الأمنيات',
'atlas.addBucket': 'إضافة إلى قائمة الأمنيات',
+3 -1
View File
@@ -337,11 +337,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'فشل الاتصال',
'settings.aiParsing.title': 'التحليل بالذكاء الاصطناعي',
'settings.aiParsing.hint':
'استخدم نموذج الذكاء الاصطناعي الخاص بك لاستخراج الحجوزات من الملفات المرفوعة. لا يسري هذا إلا عندما لا يكون المسؤول قد أعدّ نموذجًا للنظام بأكمله.',
'اختر نموذج الذكاء الاصطناعي المستخدم لاستخراج الحجوزات من الملفات المرفوعة. لا يسري هذا إلا عندما لا يكون المسؤول قد أعدّ نموذجًا للنظام بأكمله.',
'settings.aiParsing.provider': 'المزوّد',
'settings.aiParsing.providerLocal': 'محلي (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'يتم إعداد نقطة نهاية محلية (Ollama) مرة واحدة للمثيل بأكمله من إعدادات المسؤول. ولا يزال بإمكانك استخدام مفتاح OpenAI أو Anthropic الخاص بك هنا.',
'settings.aiParsing.model': 'النموذج',
'settings.aiParsing.baseUrl': 'عنوان URL الأساسي',
'settings.aiParsing.baseUrlHint': 'المكان الذي يعمل فيه النموذج — خادم Ollama محلي أو نقطة نهاية متوافقة مع OpenAI.',
+1 -1
View File
@@ -52,7 +52,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'اختر الدولة',
'vacay.selectRegion': 'اختر المنطقة (اختياري)',
'vacay.selectRegion': 'اختر المنطقة (مطلوب)',
'vacay.addCalendar': 'إضافة تقويم',
'vacay.calendarLabel': 'التسمية',
'vacay.calendarColor': 'اللون',
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Remover da lista de desejos',
'atlas.removeFromBucketHint': 'Tirar este país da sua lista de desejos',
'atlas.bucketWhen': 'Quando pretende visitar?',
'atlas.bucketDuplicate': 'Já está na sua lista de desejos',
'atlas.statsTab': 'Estatísticas',
'atlas.bucketTab': 'Lista de desejos',
'atlas.addBucket': 'Adicionar à lista de desejos',
+3 -1
View File
@@ -350,11 +350,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Falha na conexão',
'settings.aiParsing.title': 'Análise por IA',
'settings.aiParsing.hint':
'Use seu próprio modelo de IA para extrair reservas dos arquivos enviados. Isso se aplica apenas quando o administrador não configurou um modelo para toda a instância.',
'Escolha o modelo de IA usado para extrair reservas dos arquivos enviados. Isso se aplica apenas quando o administrador não configurou um modelo para toda a instância.',
'settings.aiParsing.provider': 'Provedor',
'settings.aiParsing.providerLocal': 'Local (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Um endpoint local (Ollama) é configurado uma única vez para toda a instância nas configurações de administração. Aqui você ainda pode usar sua própria chave da OpenAI ou da Anthropic.',
'settings.aiParsing.model': 'Modelo',
'settings.aiParsing.baseUrl': 'URL base',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Selecione o país',
'vacay.selectRegion': 'Selecione a região (opcional)',
'vacay.selectRegion': 'Selecione a região (obrigatório)',
'vacay.addCalendar': 'Adicionar calendário',
'vacay.calendarLabel': 'Rótulo (opcional)',
'vacay.calendarColor': 'Cor',
+1
View File
@@ -55,6 +55,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Elimina de la llista de desitjos',
'atlas.removeFromBucketHint': 'Treu aquest país de la teva llista de desitjos',
'atlas.bucketWhen': 'Quan planeges visitar-lo?',
'atlas.bucketDuplicate': 'Ja és a la teva llista de desitjos',
'atlas.planned': 'Planificat',
'atlas.showPlanned': 'Mostra els països planificats',
'atlas.plannedFor': 'Planificat per a',
+2
View File
@@ -337,6 +337,8 @@ const settings: TranslationStrings = {
'settings.aiParsing.providerLocal': 'Local (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
"Un punt final local (Ollama) es configura una sola vegada per a tota la instància a la configuració d'administració. Aquí encara pots fer servir la teva pròpia clau d'OpenAI o d'Anthropic.",
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'URL base',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Selecciona un país',
'vacay.selectRegion': 'Selecciona una regió (opcional)',
'vacay.selectRegion': 'Selecciona una regió (obligatori)',
'vacay.companyHolidays': "Festius de l'empresa",
'vacay.companyHolidaysHint': "Permet marcar dies festius comuns de l'empresa",
'vacay.companyHolidaysNoDeduct': "Els festius de l'empresa no descompten dies de vacances.",
+1
View File
@@ -20,6 +20,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Odebrat ze seznamu přání',
'atlas.removeFromBucketHint': 'Odebrat tuto zemi z vašeho bucket listu',
'atlas.bucketWhen': 'Kdy plánujete návštěvu?',
'atlas.bucketDuplicate': 'Už je na vašem seznamu přání',
'atlas.statsTab': 'Statistiky',
'atlas.bucketTab': 'Bucket List',
'atlas.addBucket': 'Přidat na Bucket List',
+3 -1
View File
@@ -344,11 +344,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Připojení selhalo',
'settings.aiParsing.title': 'Zpracování pomocí AI',
'settings.aiParsing.hint':
'Použijte vlastní model AI k získání rezervací z nahraných souborů. Platí pouze tehdy, když správce nenastavil model pro celou instanci.',
'Vyberte model AI pro získání rezervací z nahraných souborů. Platí pouze tehdy, když správce nenastavil model pro celou instanci.',
'settings.aiParsing.provider': 'Poskytovatel',
'settings.aiParsing.providerLocal': 'Místní (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Místní koncový bod (Ollama) se nastavuje jednou pro celou instanci ve správcovském nastavení. Vlastní klíč OpenAI nebo Anthropic tu můžete používat i nadále.',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'Základní URL',
'settings.aiParsing.baseUrlHint': 'Kde model běží — místní server Ollama nebo koncový bod kompatibilní s OpenAI.',
+1 -1
View File
@@ -52,7 +52,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Vyberte zemi',
'vacay.selectRegion': 'Vyberte region (volitelné)',
'vacay.selectRegion': 'Vyberte region (povinné)',
'vacay.addCalendar': 'Přidat kalendář',
'vacay.calendarLabel': 'Popisek (volitelné)',
'vacay.calendarColor': 'Barva',
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Von der Wunschliste entfernen',
'atlas.removeFromBucketHint': 'Dieses Land von deiner Bucket List nehmen',
'atlas.bucketWhen': 'Wann möchtest du dorthin reisen?',
'atlas.bucketDuplicate': 'Steht schon auf deiner Bucket List',
'atlas.statsTab': 'Statistik',
'atlas.bucketTab': 'Wunschliste',
'atlas.addBucket': 'Zur Bucket List hinzufügen',
+3 -1
View File
@@ -353,11 +353,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Verbindung fehlgeschlagen',
'settings.aiParsing.title': 'KI-Verarbeitung',
'settings.aiParsing.hint':
'Nutze dein eigenes KI-Modell, um Buchungen aus hochgeladenen Dateien auszulesen. Greift nur, wenn dein Administrator kein Modell für die gesamte Instanz konfiguriert hat.',
'Wähle das KI-Modell, mit dem Buchungen aus hochgeladenen Dateien ausgelesen werden. Greift nur, wenn dein Administrator kein Modell für die gesamte Instanz konfiguriert hat.',
'settings.aiParsing.provider': 'Anbieter',
'settings.aiParsing.providerLocal': 'Lokal (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Einen lokalen Endpunkt (Ollama) richtet ein Administrator einmal für die ganze Instanz in den Admin-Einstellungen ein. Deinen eigenen OpenAI- oder Anthropic-Schlüssel kannst du hier weiterhin nutzen.',
'settings.aiParsing.model': 'Modell',
'settings.aiParsing.baseUrl': 'Basis-URL',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'Schulferien',
'vacay.schoolHolidaysHint': 'Schulferien als visuelle Kalender-Ebene markieren',
'vacay.selectCountry': 'Land wählen',
'vacay.selectRegion': 'Region wählen (optional)',
'vacay.selectRegion': 'Region wählen (erforderlich)',
'vacay.addCalendar': 'Kalender hinzufügen',
'vacay.calendarLabel': 'Bezeichnung (optional)',
'vacay.calendarColor': 'Farbe',
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Remove from wishlist',
'atlas.removeFromBucketHint': 'Take this country off your bucket list',
'atlas.bucketWhen': 'When do you plan to visit?',
'atlas.bucketDuplicate': 'Already on your bucket list',
'atlas.statsTab': 'Stats',
'atlas.bucketTab': 'Bucket List',
'atlas.addBucket': 'Add to bucket list',
+3 -1
View File
@@ -353,11 +353,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Connection failed',
'settings.aiParsing.title': 'AI parsing',
'settings.aiParsing.hint':
'Use your own AI model to extract bookings from uploaded files. This applies only when your administrator has not configured a model for the whole instance.',
'Choose the AI model used to extract bookings from uploaded files. This applies only when your administrator has not configured a model for the whole instance.',
'settings.aiParsing.provider': 'Provider',
'settings.aiParsing.providerLocal': 'Local (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'A self-hosted (Ollama) endpoint is set up once for the whole instance in the admin settings. You can still use your own OpenAI or Anthropic key here.',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'Base URL',
'settings.aiParsing.baseUrlHint': 'Where the model runs — a local Ollama server or an OpenAI-compatible endpoint.',
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Select country',
'vacay.selectRegion': 'Select region (optional)',
'vacay.selectRegion': 'Select region (required)',
'vacay.addCalendar': 'Add calendar',
'vacay.calendarLabel': 'Label (optional)',
'vacay.calendarColor': 'Color',
+1
View File
@@ -55,6 +55,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Quitar de la lista de deseos',
'atlas.removeFromBucketHint': 'Saca este país de tu lista de deseos',
'atlas.bucketWhen': '¿Cuándo planeas visitarlo?',
'atlas.bucketDuplicate': 'Ya está en tu lista de deseos',
'atlas.planned': 'Planeado',
'atlas.showPlanned': 'Mostrar países planeados',
'atlas.plannedFor': 'Planeado para',
+3 -1
View File
@@ -352,11 +352,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Error de conexión',
'settings.aiParsing.title': 'Análisis con IA',
'settings.aiParsing.hint':
'Usa tu propio modelo de IA para extraer reservas de los archivos subidos. Esto solo se aplica cuando tu administrador no ha configurado un modelo para toda la instancia.',
'Elige el modelo de IA que se usa para extraer reservas de los archivos subidos. Esto solo se aplica cuando tu administrador no ha configurado un modelo para toda la instancia.',
'settings.aiParsing.provider': 'Proveedor',
'settings.aiParsing.providerLocal': 'Local (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Un endpoint local (Ollama) se configura una sola vez para toda la instancia en los ajustes de administración. Aquí puedes seguir usando tu propia clave de OpenAI o Anthropic.',
'settings.aiParsing.model': 'Modelo',
'settings.aiParsing.baseUrl': 'URL base',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Seleccionar país',
'vacay.selectRegion': 'Seleccionar región (opcional)',
'vacay.selectRegion': 'Seleccionar región (obligatorio)',
'vacay.companyHolidays': 'Festivos de empresa',
'vacay.companyHolidaysHint': 'Permitir marcar días festivos comunes de la empresa',
'vacay.companyHolidaysNoDeduct': 'Los festivos de empresa no descuentan días de vacaciones.',
+1
View File
@@ -55,6 +55,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Retirer de la bucket list',
'atlas.removeFromBucketHint': 'Enlever ce pays de votre bucket list',
'atlas.bucketWhen': "Quand prévoyez-vous d'y aller ?",
'atlas.bucketDuplicate': 'Déjà dans votre bucket list',
'atlas.planned': 'Prévu',
'atlas.showPlanned': 'Afficher les pays prévus',
'atlas.plannedFor': 'Prévu pour',
+3 -1
View File
@@ -357,11 +357,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Échec de la connexion',
'settings.aiParsing.title': 'Analyse par IA',
'settings.aiParsing.hint':
"Utilisez votre propre modèle d'IA pour extraire les réservations des fichiers importés. Cela ne s'applique que si votre administrateur n'a pas configuré de modèle pour l'ensemble de l'instance.",
"Choisissez le modèle d'IA utilisé pour extraire les réservations des fichiers importés. Cela ne s'applique que si votre administrateur n'a pas configuré de modèle pour l'ensemble de l'instance.",
'settings.aiParsing.provider': 'Fournisseur',
'settings.aiParsing.providerLocal': 'Local (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
"Un point de terminaison local (Ollama) se configure une seule fois pour toute l'instance dans les paramètres d'administration. Vous pouvez toujours utiliser votre propre clé OpenAI ou Anthropic ici.",
'settings.aiParsing.model': 'Modèle',
'settings.aiParsing.baseUrl': 'URL de base',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -54,7 +54,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Sélectionner un pays',
'vacay.selectRegion': 'Sélectionner une région (facultatif)',
'vacay.selectRegion': 'Sélectionner une région (obligatoire)',
'vacay.companyHolidays': "Jours fériés d'entreprise",
'vacay.companyHolidaysHint': "Autoriser le marquage des jours fériés d'entreprise",
'vacay.companyHolidaysNoDeduct': "Les jours fériés d'entreprise ne sont pas déduits des jours de vacances.",
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Αφαίρεση από τη λίστα επιθυμιών',
'atlas.removeFromBucketHint': 'Αφαιρέστε αυτή τη χώρα από τη λίστα επιθυμιών σας',
'atlas.bucketWhen': 'Πότε σκοπεύετε να το επισκεφθείτε;',
'atlas.bucketDuplicate': 'Βρίσκεται ήδη στη λίστα επιθυμιών σας',
'atlas.statsTab': 'Στατιστικά',
'atlas.bucketTab': 'Λίστα Επιθυμιών',
'atlas.addBucket': 'Προσθήκη στη λίστα επιθυμιών',
+3 -1
View File
@@ -360,11 +360,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Η σύνδεση απέτυχε',
'settings.aiParsing.title': 'Ανάλυση με AI',
'settings.aiParsing.hint':
'Χρησιμοποιήστε το δικό σας μοντέλο AI για την εξαγωγή κρατήσεων από τα αρχεία που ανεβάζετε. Ισχύει μόνο όταν ο διαχειριστής σας δεν έχει ρυθμίσει μοντέλο για ολόκληρη την εγκατάσταση.',
'Επιλέξτε το μοντέλο AI που χρησιμοποιείται για την εξαγωγή κρατήσεων από τα αρχεία που ανεβάζετε. Ισχύει μόνο όταν ο διαχειριστής σας δεν έχει ρυθμίσει μοντέλο για ολόκληρη την εγκατάσταση.',
'settings.aiParsing.provider': 'Πάροχος',
'settings.aiParsing.providerLocal': 'Τοπικό (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Ένα τοπικό τελικό σημείο (Ollama) ρυθμίζεται μία φορά για ολόκληρη την εγκατάσταση στις ρυθμίσεις διαχειριστή. Μπορείτε να συνεχίσετε να χρησιμοποιείτε εδώ το δικό σας κλειδί OpenAI ή Anthropic.',
'settings.aiParsing.model': 'Μοντέλο',
'settings.aiParsing.baseUrl': 'Βασικό URL',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Επιλογή χώρας',
'vacay.selectRegion': 'Επιλογή περιοχής (προαιρετικό)',
'vacay.selectRegion': 'Επιλογή περιοχής (υποχρεωτικό)',
'vacay.addCalendar': 'Προσθήκη ημερολογίου',
'vacay.calendarLabel': 'Ετικέτα (προαιρετικό)',
'vacay.calendarColor': 'Χρώμα',
+1
View File
@@ -22,6 +22,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Eltávolítás a bakancslistáról',
'atlas.removeFromBucketHint': 'Vedd le ezt az országot a bakancslistádról',
'atlas.bucketWhen': 'Mikor tervezed meglátogatni?',
'atlas.bucketDuplicate': 'Már szerepel a bakancslistádon',
'atlas.statsTab': 'Statisztikák',
'atlas.bucketTab': 'Bakancslista',
'atlas.addBucket': 'Hozzáadás a bakancslistához',
+3 -1
View File
@@ -351,11 +351,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'A kapcsolat sikertelen',
'settings.aiParsing.title': 'AI-feldolgozás',
'settings.aiParsing.hint':
'Használd a saját AI-modelledet a foglalások kinyeréséhez a feltöltött fájlokból. Ez csak akkor érvényes, ha a rendszergazda nem állított be modellt az egész példányhoz.',
'Válaszd ki azt az AI-modellt, amely a foglalásokat kinyeri a feltöltött fájlokból. Ez csak akkor érvényes, ha a rendszergazda nem állított be modellt az egész példányhoz.',
'settings.aiParsing.provider': 'Szolgáltató',
'settings.aiParsing.providerLocal': 'Helyi (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'A helyi végpontot (Ollama) egyszer, az egész példányra vonatkozóan az adminisztrátori beállításokban kell megadni. A saját OpenAI- vagy Anthropic-kulcsodat itt továbbra is használhatod.',
'settings.aiParsing.model': 'Modell',
'settings.aiParsing.baseUrl': 'Alap-URL',
'settings.aiParsing.baseUrlHint': 'Ahol a modell fut — helyi Ollama-kiszolgáló vagy OpenAI-kompatibilis végpont.',
+1 -1
View File
@@ -44,7 +44,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Ország kiválasztása',
'vacay.selectRegion': 'Régió kiválasztása (opcionális)',
'vacay.selectRegion': 'Régió kiválasztása (kötelező)',
'vacay.addCalendar': 'Naptár hozzáadása',
'vacay.calendarLabel': 'Címke (opcionális)',
'vacay.calendarColor': 'Szín',
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Hapus dari bucket list',
'atlas.removeFromBucketHint': 'Keluarkan negara ini dari daftar impianmu',
'atlas.bucketWhen': 'Kapan kamu berencana mengunjunginya?',
'atlas.bucketDuplicate': 'Sudah ada di bucket list kamu',
'atlas.statsTab': 'Statistik',
'atlas.bucketTab': 'Daftar Impian',
'atlas.addBucket': 'Tambah ke daftar impian',
+3 -1
View File
@@ -348,11 +348,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Koneksi gagal',
'settings.aiParsing.title': 'Penguraian AI',
'settings.aiParsing.hint':
'Gunakan model AI milikmu sendiri untuk mengekstrak pemesanan dari file yang diunggah. Ini hanya berlaku jika administrator belum mengonfigurasi model untuk seluruh instance.',
'Pilih model AI yang dipakai untuk mengekstrak pemesanan dari file yang diunggah. Ini hanya berlaku jika administrator belum mengonfigurasi model untuk seluruh instance.',
'settings.aiParsing.provider': 'Penyedia',
'settings.aiParsing.providerLocal': 'Lokal (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Endpoint lokal (Ollama) diatur sekali untuk seluruh instansi di pengaturan administrator. Kamu tetap bisa memakai kunci OpenAI atau Anthropic milikmu sendiri di sini.',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'URL Dasar',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -52,7 +52,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Pilih negara',
'vacay.selectRegion': 'Pilih wilayah (opsional)',
'vacay.selectRegion': 'Pilih wilayah (wajib)',
'vacay.addCalendar': 'Tambah kalender',
'vacay.calendarLabel': 'Label (opsional)',
'vacay.calendarColor': 'Warna',
+1
View File
@@ -20,6 +20,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Rimuovi dalla lista desideri',
'atlas.removeFromBucketHint': 'Togli questo paese dalla tua lista desideri',
'atlas.bucketWhen': 'Quando pensi di visitarlo?',
'atlas.bucketDuplicate': 'Già nella tua lista desideri',
'atlas.statsTab': 'Statistiche',
'atlas.bucketTab': 'Lista desideri',
'atlas.addBucket': 'Aggiungi alla lista desideri',
+3 -1
View File
@@ -350,11 +350,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Connessione fallita',
'settings.aiParsing.title': 'Analisi AI',
'settings.aiParsing.hint':
"Usa il tuo modello AI per estrarre le prenotazioni dai file caricati. Vale solo se l'amministratore non ha configurato un modello per l'intera istanza.",
"Scegli il modello AI usato per estrarre le prenotazioni dai file caricati. Vale solo se l'amministratore non ha configurato un modello per l'intera istanza.",
'settings.aiParsing.provider': 'Provider',
'settings.aiParsing.providerLocal': 'Locale (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
"Un endpoint locale (Ollama) si configura una sola volta per l'intera istanza nelle impostazioni di amministrazione. Qui puoi comunque usare la tua chiave OpenAI o Anthropic.",
'settings.aiParsing.model': 'Modello',
'settings.aiParsing.baseUrl': 'URL di base',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Seleziona paese',
'vacay.selectRegion': 'Seleziona regione (opzionale)',
'vacay.selectRegion': 'Seleziona regione (obbligatorio)',
'vacay.addCalendar': 'Aggiungi calendario',
'vacay.calendarLabel': 'Etichetta (opzionale)',
'vacay.calendarColor': 'Colore',
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': '行きたいリストから削除',
'atlas.removeFromBucketHint': 'この国を行きたいリストから外します',
'atlas.bucketWhen': '訪問予定はいつですか?',
'atlas.bucketDuplicate': 'すでに行きたいリストにあります',
'atlas.statsTab': '統計',
'atlas.bucketTab': '行きたいリスト',
'atlas.addBucket': '行きたいリストに追加',
+3 -1
View File
@@ -325,11 +325,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': '接続に失敗しました',
'settings.aiParsing.title': 'AI解析',
'settings.aiParsing.hint':
'アップロードしたファイルから予約情報を抽出するために、自分のAIモデルを使用します。これは、管理者がインスタンス全体のモデルを設定していない場合にのみ適用されます。',
'アップロードしたファイルから予約情報を抽出するAIモデルを選びます。これは、管理者がインスタンス全体のモデルを設定していない場合にのみ適用されます。',
'settings.aiParsing.provider': 'プロバイダー',
'settings.aiParsing.providerLocal': 'ローカル (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'ローカル (Ollama) のエンドポイントは、管理者設定でインスタンス全体に対して一度だけ設定します。自分の OpenAI または Anthropic のキーはここで引き続き使えます。',
'settings.aiParsing.model': 'モデル',
'settings.aiParsing.baseUrl': 'ベースURL',
'settings.aiParsing.baseUrlHint': 'モデルの実行場所 — ローカルのOllamaサーバー、またはOpenAI互換のエンドポイント。',
+1 -1
View File
@@ -52,7 +52,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': '国を選択',
'vacay.selectRegion': '地域を選択(任意)',
'vacay.selectRegion': '地域を選択(必須)',
'vacay.addCalendar': 'カレンダーを追加',
'vacay.calendarLabel': 'ラベル(任意)',
'vacay.calendarColor': '色',
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': '버킷 리스트에서 제거',
'atlas.removeFromBucketHint': '이 나라를 버킷 리스트에서 뺍니다',
'atlas.bucketWhen': '방문 예정 시기는 언제인가요?',
'atlas.bucketDuplicate': '이미 버킷 리스트에 있습니다',
'atlas.statsTab': '통계',
'atlas.bucketTab': '버킷 리스트',
'atlas.addBucket': '버킷 리스트에 추가',
+3 -1
View File
@@ -339,11 +339,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': '연결에 실패했습니다',
'settings.aiParsing.title': 'AI 분석',
'settings.aiParsing.hint':
'업로드한 파일에서 예약 정보를 추출할 때 직접 지정한 AI 모델을 사용하세요. 이 설정은 관리자가 인스턴스 전체에 모델을 설정하지 않은 경우에만 적용됩니다.',
'업로드한 파일에서 예약 정보를 추출할 AI 모델을 선택하세요. 이 설정은 관리자가 인스턴스 전체에 모델을 설정하지 않은 경우에만 적용됩니다.',
'settings.aiParsing.provider': '제공자',
'settings.aiParsing.providerLocal': '로컬 (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'로컬 (Ollama) 엔드포인트는 관리자 설정에서 인스턴스 전체에 대해 한 번만 설정합니다. 본인의 OpenAI 또는 Anthropic 키는 여기서 계속 사용할 수 있습니다.',
'settings.aiParsing.model': '모델',
'settings.aiParsing.baseUrl': '기본 URL',
'settings.aiParsing.baseUrlHint': '모델이 실행되는 위치 — 로컬 Ollama 서버 또는 OpenAI 호환 엔드포인트입니다.',
+1 -1
View File
@@ -52,7 +52,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': '국가 선택',
'vacay.selectRegion': '지역 선택 (선택)',
'vacay.selectRegion': '지역 선택 (필수)',
'vacay.addCalendar': '캘린더 추가',
'vacay.calendarLabel': '레이블 (선택)',
'vacay.calendarColor': '색상',
+1
View File
@@ -55,6 +55,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Uit bucket list verwijderen',
'atlas.removeFromBucketHint': 'Haal dit land van je bucketlist af',
'atlas.bucketWhen': 'Wanneer ben je van plan te gaan?',
'atlas.bucketDuplicate': 'Staat al op je bucket list',
'atlas.planned': 'Gepland',
'atlas.showPlanned': 'Geplande landen tonen',
'atlas.plannedFor': 'Gepland voor',
+3 -1
View File
@@ -351,11 +351,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Verbinding mislukt',
'settings.aiParsing.title': 'AI-verwerking',
'settings.aiParsing.hint':
'Gebruik je eigen AI-model om boekingen uit geüploade bestanden te halen. Dit geldt alleen als je beheerder geen model voor de hele instantie heeft ingesteld.',
'Kies het AI-model waarmee boekingen uit geüploade bestanden worden gehaald. Dit geldt alleen als je beheerder geen model voor de hele instantie heeft ingesteld.',
'settings.aiParsing.provider': 'Provider',
'settings.aiParsing.providerLocal': 'Lokaal (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Een lokaal endpoint (Ollama) wordt eenmalig voor de hele instantie ingesteld in de beheerinstellingen. Je kunt hier nog steeds je eigen OpenAI- of Anthropic-sleutel gebruiken.',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'Basis-URL',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Selecteer land',
'vacay.selectRegion': 'Selecteer regio (optioneel)',
'vacay.selectRegion': 'Selecteer regio (verplicht)',
'vacay.companyHolidays': 'Bedrijfsvakanties',
'vacay.companyHolidaysHint': 'Sta het markeren van bedrijfsbrede vakantiedagen toe',
'vacay.companyHolidaysNoDeduct': 'Bedrijfsvakanties worden niet afgetrokken van vakantiedagen.',
+1
View File
@@ -21,6 +21,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Usuń z listy marzeń',
'atlas.removeFromBucketHint': 'Usuń ten kraj ze swojej listy marzeń',
'atlas.bucketWhen': 'Kiedy planujesz je odwiedzić?',
'atlas.bucketDuplicate': 'Już jest na Twojej liście marzeń',
'atlas.statsTab': 'Statystyki',
'atlas.bucketTab': 'Lista marzeń',
'atlas.addBucket': 'Dodaj do listy marzeń',
+3 -1
View File
@@ -350,11 +350,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Połączenie nieudane',
'settings.aiParsing.title': 'Analiza AI',
'settings.aiParsing.hint':
'Użyj własnego modelu AI, aby wyodrębniać rezerwacje z przesłanych plików. Ma to zastosowanie tylko wtedy, gdy administrator nie skonfigurował modelu dla całej instancji.',
'Wybierz model AI, który wyodrębnia rezerwacje z przesłanych plików. Ma to zastosowanie tylko wtedy, gdy administrator nie skonfigurował modelu dla całej instancji.',
'settings.aiParsing.provider': 'Dostawca',
'settings.aiParsing.providerLocal': 'Lokalny (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Lokalny punkt końcowy (Ollama) konfiguruje się raz dla całej instancji w ustawieniach administratora. Tutaj nadal możesz używać własnego klucza OpenAI lub Anthropic.',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'Bazowy adres URL',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -52,7 +52,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Wybierz kraj',
'vacay.selectRegion': 'Wybierz region (opcjonalnie)',
'vacay.selectRegion': 'Wybierz region (wymagane)',
'vacay.addCalendar': 'Dodaj kalendarz',
'vacay.calendarLabel': 'Etykieta (opcjonalnie)',
'vacay.calendarColor': 'Kolor',
+1
View File
@@ -55,6 +55,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Убрать из списка желаний',
'atlas.removeFromBucketHint': 'Удалить эту страну из списка желаний',
'atlas.bucketWhen': 'Когда вы планируете поехать?',
'atlas.bucketDuplicate': 'Уже в вашем списке желаний',
'atlas.planned': 'Запланировано',
'atlas.showPlanned': 'Показать запланированные страны',
'atlas.plannedFor': 'Запланировано на',
+3 -1
View File
@@ -350,11 +350,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Не удалось подключиться',
'settings.aiParsing.title': 'Распознавание с помощью ИИ',
'settings.aiParsing.hint':
'Используйте собственную модель ИИ для извлечения бронирований из загруженных файлов. Это работает только в том случае, если администратор не настроил модель для всего экземпляра.',
'Выберите модель ИИ для извлечения бронирований из загруженных файлов. Это работает только в том случае, если администратор не настроил модель для всего экземпляра.',
'settings.aiParsing.provider': 'Провайдер',
'settings.aiParsing.providerLocal': 'Локально (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Локальная конечная точка (Ollama) настраивается один раз для всего экземпляра в настройках администратора. Свой ключ OpenAI или Anthropic вы по-прежнему можете использовать здесь.',
'settings.aiParsing.model': 'Модель',
'settings.aiParsing.baseUrl': 'Базовый URL',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Выберите страну',
'vacay.selectRegion': 'Выберите регион (необязательно)',
'vacay.selectRegion': 'Выберите регион (обязательно)',
'vacay.companyHolidays': 'Корпоративные выходные',
'vacay.companyHolidaysHint': 'Разрешить отмечать корпоративные выходные дни',
'vacay.companyHolidaysNoDeduct': 'Корпоративные выходные не вычитаются из дней отпуска.',
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Ta bort från bucketlistan',
'atlas.removeFromBucketHint': 'Ta bort det här landet från din bucketlista',
'atlas.bucketWhen': 'När har du tänkt att komma på besök?',
'atlas.bucketDuplicate': 'Finns redan på din bucketlista',
'atlas.statsTab': 'Statistik',
'atlas.bucketTab': 'Bucketlista',
'atlas.addBucket': 'Lägg till i bucketlistan',
+3 -1
View File
@@ -350,11 +350,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Anslutning misslyckades',
'settings.aiParsing.title': 'AI-analys',
'settings.aiParsing.hint':
'Använd din egen AI-modell för att extrahera bokningar från uppladdade filer. Detta gäller endast när din administratör inte har konfigurerat en modell för hela instansen.',
'Välj den AI-modell som används för att extrahera bokningar från uppladdade filer. Detta gäller endast när din administratör inte har konfigurerat en modell för hela instansen.',
'settings.aiParsing.provider': 'Leverantör',
'settings.aiParsing.providerLocal': 'Lokal (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'En lokal slutpunkt (Ollama) ställs in en gång för hela instansen i administratörsinställningarna. Du kan fortfarande använda din egen OpenAI- eller Anthropic-nyckel här.',
'settings.aiParsing.model': 'Modell',
'settings.aiParsing.baseUrl': 'Bas-URL',
'settings.aiParsing.baseUrlHint': 'Var modellen körs — en lokal Ollama-server eller en OpenAI-kompatibel slutpunkt.',
+1 -1
View File
@@ -52,7 +52,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Välj land',
'vacay.selectRegion': 'Välj region (valfritt)',
'vacay.selectRegion': 'Välj region (obligatoriskt)',
'vacay.addCalendar': 'Lägg till kalender',
'vacay.calendarLabel': 'Etikett (valfritt)',
'vacay.calendarColor': 'Färg',
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Yapılacaklar listesinden kaldır',
'atlas.removeFromBucketHint': 'Bu ülkeyi yapılacaklar listenizden çıkarın',
'atlas.bucketWhen': 'Ne zaman ziyaret etmeyi planlıyorsunuz?',
'atlas.bucketDuplicate': 'Zaten yapılacaklar listenizde',
'atlas.statsTab': 'İstatistikler',
'atlas.bucketTab': 'Yapılacaklar Listesi',
'atlas.addBucket': 'Yapılacaklar listesine ekle',
+3 -1
View File
@@ -347,11 +347,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Bağlantı başarısız',
'settings.aiParsing.title': 'Yapay zekâ ayrıştırma',
'settings.aiParsing.hint':
'Yüklenen dosyalardan rezervasyonları çıkarmak için kendi yapay zekâ modelini kullan. Bu yalnızca yöneticin tüm uygulama geneli için bir model yapılandırmadığında geçerlidir.',
'Yüklenen dosyalardan rezervasyonları çıkarmak için kullanılacak yapay zekâ modelini seç. Bu yalnızca yöneticin tüm uygulama geneli için bir model yapılandırmadığında geçerlidir.',
'settings.aiParsing.provider': 'Sağlayıcı',
'settings.aiParsing.providerLocal': 'Yerel (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Yerel (Ollama) uç noktası, tüm örnek için bir kez yönetici ayarlarında yapılandırılır. Kendi OpenAI veya Anthropic anahtarını burada kullanmaya devam edebilirsin.',
'settings.aiParsing.model': 'Model',
'settings.aiParsing.baseUrl': 'Temel URL',
'settings.aiParsing.baseUrlHint':
+1 -1
View File
@@ -52,7 +52,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Ülke seçin',
'vacay.selectRegion': 'Bölge seçin (isteğe bağlı)',
'vacay.selectRegion': 'Bölge seçin (zorunlu)',
'vacay.addCalendar': 'Takvim ekle',
'vacay.calendarLabel': 'Etiket (isteğe bağlı)',
'vacay.calendarColor': 'Renk',
+1
View File
@@ -55,6 +55,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Видалити зі списку бажань',
'atlas.removeFromBucketHint': 'Прибрати цю країну зі списку бажань',
'atlas.bucketWhen': 'Коли ви плануєте поїхати?',
'atlas.bucketDuplicate': 'Вже у вашому списку бажань',
'atlas.planned': 'Заплановано',
'atlas.showPlanned': 'Показати заплановані країни',
'atlas.plannedFor': 'Заплановано на',
+3 -1
View File
@@ -350,11 +350,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Не вдалося підключитися',
'settings.aiParsing.title': 'Розпізнавання ШІ',
'settings.aiParsing.hint':
'Використовуйте власну модель ШІ для вилучення бронювань із завантажених файлів. Це діє лише тоді, коли адміністратор не налаштував модель для всього екземпляра.',
'Виберіть модель ШІ для вилучення бронювань із завантажених файлів. Це діє лише тоді, коли адміністратор не налаштував модель для всього екземпляра.',
'settings.aiParsing.provider': 'Постачальник',
'settings.aiParsing.providerLocal': 'Локальний (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Локальна кінцева точка (Ollama) налаштовується один раз для всього екземпляра в налаштуваннях адміністратора. Власний ключ OpenAI або Anthropic ви можете використовувати тут і надалі.',
'settings.aiParsing.model': 'Модель',
'settings.aiParsing.baseUrl': 'Базова URL-адреса',
'settings.aiParsing.baseUrlHint': 'Де працює модель — локальний сервер Ollama або сумісна з OpenAI кінцева точка.',
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Виберіть країну',
'vacay.selectRegion': 'Виберіть регіон (необов’язково)',
'vacay.selectRegion': 'Виберіть регіон (обов’язково)',
'vacay.companyHolidays': 'Корпоративні вихідні',
'vacay.companyHolidaysHint': 'Дозволити позначати корпоративні вихідні',
'vacay.companyHolidaysNoDeduct': 'Корпоративні вихідні не віднімаються від днів відпустки.',
+1
View File
@@ -23,6 +23,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': 'Xóa khỏi danh sách nhóm',
'atlas.removeFromBucketHint': 'Bỏ quốc gia này khỏi danh sách nhóm của bạn',
'atlas.bucketWhen': 'Khi nào bạn có kế hoạch đến thăm?',
'atlas.bucketDuplicate': 'Đã có trong danh sách nhóm của bạn',
'atlas.statsTab': 'Thống kê',
'atlas.bucketTab': 'Danh sách nhóm',
'atlas.addBucket': 'Thêm vào danh sách nhóm',
+3 -1
View File
@@ -353,11 +353,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': 'Kết nối không thành công',
'settings.aiParsing.title': 'Phân tích bằng AI',
'settings.aiParsing.hint':
'Sử dụng mô hình AI của riêng bạn để trích xuất đặt chỗ từ các tệp đã tải lên. Tùy chọn này chỉ áp dụng khi quản trị viên chưa cấu hình mô hình cho toàn bộ phiên bản.',
'Chọn mô hình AI dùng để trích xuất đặt chỗ từ các tệp đã tải lên. Tùy chọn này chỉ áp dụng khi quản trị viên chưa cấu hình mô hình cho toàn bộ phiên bản.',
'settings.aiParsing.provider': 'Nhà cung cấp',
'settings.aiParsing.providerLocal': 'Cục bộ (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'Endpoint cục bộ (Ollama) được thiết lập một lần cho toàn bộ phiên bản trong phần cài đặt quản trị. Bạn vẫn có thể dùng khóa OpenAI hoặc Anthropic của riêng mình ở đây.',
'settings.aiParsing.model': 'Mô hình',
'settings.aiParsing.baseUrl': 'URL cơ sở',
'settings.aiParsing.baseUrlHint': 'Nơi mô hình chạy — máy chủ Ollama cục bộ hoặc endpoint tương thích với OpenAI.',
+1 -1
View File
@@ -52,7 +52,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': 'Chọn quốc gia',
'vacay.selectRegion': 'Chọn khu vực (tùy chọn)',
'vacay.selectRegion': 'Chọn khu vực (bắt buộc)',
'vacay.addCalendar': 'Thêm lịch',
'vacay.calendarLabel': 'Nhãn (tùy chọn)',
'vacay.calendarColor': 'Màu sắc',
+1
View File
@@ -55,6 +55,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': '從心願單移除',
'atlas.removeFromBucketHint': '將此國家從心願單中移除',
'atlas.bucketWhen': '你計劃什麼時候去?',
'atlas.bucketDuplicate': '已經在你的心願單中',
'atlas.planned': '計劃中',
'atlas.showPlanned': '顯示計劃中的國家',
'atlas.plannedFor': '計劃於',
+3 -1
View File
@@ -328,11 +328,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.failed': '連接失敗',
'settings.aiParsing.title': 'AI 解析',
'settings.aiParsing.hint':
'使用你自己的 AI 模型,從上傳的檔案中擷取預訂資訊。此設定僅在管理員尚未為整個執行個體設定模型時才會生效。',
'選擇用於從上傳的檔案中擷取預訂資訊的 AI 模型。此設定僅在管理員尚未為整個執行個體設定模型時才會生效。',
'settings.aiParsing.provider': '供應商',
'settings.aiParsing.providerLocal': '本機 (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'本機 (Ollama) 端點在管理員設定中為整個執行個體設定一次。你仍然可以在這裡使用自己的 OpenAI 或 Anthropic 金鑰。',
'settings.aiParsing.model': '模型',
'settings.aiParsing.baseUrl': '基礎網址',
'settings.aiParsing.baseUrlHint': '模型執行的位置 — 本機 Ollama 伺服器,或相容於 OpenAI 的端點。',
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': '選擇國家',
'vacay.selectRegion': '選擇地區(可選)',
'vacay.selectRegion': '選擇地區(必填)',
'vacay.companyHolidays': '公司假日',
'vacay.companyHolidaysHint': '允許標記公司統一休假日',
'vacay.companyHolidaysNoDeduct': '公司假日不計入年假天數。',
+1
View File
@@ -55,6 +55,7 @@ const atlas: TranslationStrings = {
'atlas.removeFromBucket': '从心愿单移除',
'atlas.removeFromBucketHint': '将此国家从心愿单中移除',
'atlas.bucketWhen': '你计划什么时候去?',
'atlas.bucketDuplicate': '已经在你的心愿单中',
'atlas.planned': '计划中',
'atlas.showPlanned': '显示计划中的国家',
'atlas.plannedFor': '计划于',
+3 -2
View File
@@ -325,12 +325,13 @@ const settings: TranslationStrings = {
'settings.airtrail.test.success': '已连接——找到 {count} 个航班',
'settings.airtrail.test.failed': '连接失败',
'settings.aiParsing.title': 'AI 解析',
'settings.aiParsing.hint':
'使用你自己的 AI 模型从上传的文件中提取预订信息。仅当管理员未为整个实例配置模型时才会生效。',
'settings.aiParsing.hint': '选择用于从上传的文件中提取预订信息的 AI 模型。仅当管理员未为整个实例配置模型时才会生效。',
'settings.aiParsing.provider': '服务商',
'settings.aiParsing.providerLocal': '本地 (Ollama)',
'settings.aiParsing.providerOpenai': 'OpenAI',
'settings.aiParsing.providerAnthropic': 'Anthropic',
'settings.aiParsing.localAdminOnly':
'本地 (Ollama) 接口在管理员设置中为整个实例配置一次。你仍然可以在这里使用自己的 OpenAI 或 Anthropic 密钥。',
'settings.aiParsing.model': '模型',
'settings.aiParsing.baseUrl': '基础 URL',
'settings.aiParsing.baseUrlHint': '模型运行的位置——本地 Ollama 服务器或兼容 OpenAI 的接口。',
+1 -1
View File
@@ -53,7 +53,7 @@ const vacay: TranslationStrings = {
'vacay.schoolHolidays': 'School Holidays',
'vacay.schoolHolidaysHint': 'Mark school holidays as a visual calendar layer',
'vacay.selectCountry': '选择国家',
'vacay.selectRegion': '选择地区(可选)',
'vacay.selectRegion': '选择地区(必填)',
'vacay.companyHolidays': '公司假日',
'vacay.companyHolidaysHint': '允许标记公司统一休假日',
'vacay.companyHolidaysNoDeduct': '公司假日不计入年假天数。',
@@ -3,6 +3,8 @@ import {
reservationPositionsRequestSchema,
accommodationCreateBodySchema,
accommodationCreateRequestSchema,
transportLegInputSchema,
transportLegsInputSchema,
} from './reservation.schema';
import { describe, it, expect } from 'vitest';
@@ -54,3 +56,51 @@ describe('accommodationCreateRequestSchema', () => {
expect(accommodationCreateBodySchema.safeParse({ check_in: 5 }).success).toBe(false);
});
});
describe('transportLegInputSchema', () => {
it('accepts a flight leg exactly as the planner form writes it', () => {
expect(
transportLegInputSchema.safeParse({
from: 'AMS',
to: 'CDG',
airline: 'KLM',
flight_number: 'KL1233',
seat: '14A',
dep_day_id: 2029,
dep_time: '09:00',
// The form writes null, not undefined, for a waypoint day/time left blank.
arr_day_id: null,
arr_time: '10:00',
}).success,
).toBe(true);
});
it('accepts a train leg and a leg that carries times only', () => {
expect(
transportLegInputSchema.safeParse({
from: 'Basel SBB', to: 'Lugano', train_number: 'EC 57', platform: '8',
dep_day_id: null, dep_time: '08:33', arr_day_id: null, arr_time: '11:20',
}).success,
).toBe(true);
// from/to may be omitted: a writer can fill them from the endpoint codes.
expect(transportLegInputSchema.safeParse({ dep_time: '09:00', arr_time: '10:00' }).success).toBe(true);
expect(transportLegInputSchema.safeParse({}).success).toBe(true);
});
it('rejects day ids that are not positive integers and blank labels', () => {
expect(transportLegInputSchema.safeParse({ dep_day_id: 'x' }).success).toBe(false);
expect(transportLegInputSchema.safeParse({ dep_day_id: 0 }).success).toBe(false);
expect(transportLegInputSchema.safeParse({ arr_day_id: 2.5 }).success).toBe(false);
expect(transportLegInputSchema.safeParse({ from: '' }).success).toBe(false);
expect(transportLegInputSchema.safeParse({ dep_time: 42 }).success).toBe(false);
});
it('parses a whole leg list', () => {
const parsed = transportLegsInputSchema.safeParse([
{ from: 'AMS', to: 'CDG', dep_time: '09:00', arr_time: '10:00' },
{ from: 'CDG', to: 'FCO', dep_time: '11:00', arr_time: '12:00' },
]);
expect(parsed.success).toBe(true);
expect(transportLegsInputSchema.safeParse([{ dep_day_id: -1 }]).success).toBe(false);
});
});
@@ -73,6 +73,52 @@ export const reservationEndpointsInputSchema = z.array(
);
export type ReservationEndpointsInput = z.infer<typeof reservationEndpointsInputSchema>;
/**
* ONE SEGMENT of a multi-leg transport booking, as stored in
* `reservations.metadata.legs` (#1914).
*
* The model: the ordered `reservation_endpoints` rows are the geometry (which
* airports/stations, in which order), while the per-segment detail (each leg's
* own day + local time and its airline/train identity) lives in the legs. That
* split is why a stopover needs legs at all: its endpoint carries only the
* ONWARD departure time, so the arrival at the stop exists nowhere else.
*
* The shape mirrors 1:1 what the planner form (client TransportModal) and the
* importers (AirTrail, KItinerary) already write, including the `null`-for-unset
* convention on the day/time fields. One schema covers both kinds of booking:
* flights fill airline/flight_number, trains train_number/platform.
*
* `day_positions` is deliberately NOT part of the input: the day planner owns it
* per leg, so a writer preserves it rather than sets it.
*/
export const transportLegInputSchema = z.object({
/** Flights: IATA code of the departure airport. Trains: departure station label. */
from: z.string().min(1).nullable().optional(),
/** Flights: IATA code of the arrival airport. Trains: arrival station label. */
to: z.string().min(1).nullable().optional(),
airline: z.string().max(100).nullable().optional(),
flight_number: z.string().max(20).nullable().optional(),
train_number: z.string().max(20).nullable().optional(),
platform: z.string().max(20).nullable().optional(),
seat: z.string().max(20).nullable().optional(),
dep_day_id: z.number().int().positive().nullable().optional(),
/** Local departure time of this segment, 'HH:mm'. */
dep_time: z.string().max(10).nullable().optional(),
arr_day_id: z.number().int().positive().nullable().optional(),
/** Local arrival time of this segment, 'HH:mm'. */
arr_time: z.string().max(10).nullable().optional(),
});
export type TransportLegInput = z.infer<typeof transportLegInputSchema>;
/**
* The legs of one booking. A leg list only makes sense with at least one
* stopover: a direct booking keeps the flat metadata it always had, and every
* reader (client flightLegs/dayMerge, calendar ICS, the AirTrail dedupe) treats
* `legs.length > 1` as the multi-segment marker.
*/
export const transportLegsInputSchema = z.array(transportLegInputSchema);
export type TransportLegsInput = z.infer<typeof transportLegsInputSchema>;
/**
* Reservation entity as returned by the reservation list endpoint
* (server/src/services/reservationService.ts -> listReservations). Columns of