diff --git a/server/src/nest/place-import/place-import.types.ts b/server/src/nest/place-import/place-import.types.ts index 976e25034..14478c63d 100644 --- a/server/src/nest/place-import/place-import.types.ts +++ b/server/src/nest/place-import/place-import.types.ts @@ -106,8 +106,10 @@ export class CollectionGpxError extends Error { /** * CW-06: where a Google Maps short link led. `refused` when a hop or the * landing link is not one the walk import may follow or read, `unreachable` - * when the chain could not be followed in time or answered nonsense, - * `too_many_redirects` and `no_redirect` as they say. + * when the chain could not be followed in time, a name did not resolve, or it + * answered nonsense, `not_found` when Google answered that it has no such + * link (404 or 410), `too_many_redirects` and `no_redirect` as they say. */ -export type ShortLinkOutcome = - { ok: true; url: string } | { ok: false; why: 'refused' | 'unreachable' | 'too_many_redirects' | 'no_redirect' }; +export type ShortLinkOutcome = { ok: true; url: string } | { ok: false; why: ShortLinkFailure }; + +export type ShortLinkFailure = 'refused' | 'unreachable' | 'not_found' | 'too_many_redirects' | 'no_redirect'; diff --git a/server/src/nest/place-import/providers/google-maps-short-link.provider.ts b/server/src/nest/place-import/providers/google-maps-short-link.provider.ts index 3c59cb633..b95da10c3 100644 --- a/server/src/nest/place-import/providers/google-maps-short-link.provider.ts +++ b/server/src/nest/place-import/providers/google-maps-short-link.provider.ts @@ -31,6 +31,15 @@ export interface ShortLinkLimits { export const SHORT_LINK_LIMITS: ShortLinkLimits = { hops: 3, deadlineMs: 8_000, locationChars: 8_192 }; +/** Google's final answer that it has no such link (404), or no longer (410); asking again changes nothing. */ +const NO_SUCH_LINK: ReadonlySet = new Set([404, 410]); + +/** What one hop answered: its status, and the Location of a 3xx or null. */ +interface HopAnswer { + status: number; + location: string | null; +} + /** The lookup inside the SSRF guard cannot be aborted; this holds it to the chain's deadline as well. */ function beforeDeadline(work: Promise, signal: AbortSignal): Promise { return new Promise((resolve, reject) => { @@ -58,7 +67,7 @@ export class GoogleMapsShortLinkProvider { try { return await this.hop(start, 0, signal, limits); } catch (err: unknown) { - // A deadline passed, a name that does not resolve, a connection that failed. + // A deadline passed, a name lookup that hung, a connection that failed. logDebug(`[walk import] Google Maps short link not followed: ${err instanceof Error ? err.name : 'error'}`); return { ok: false, why: 'unreachable' }; } @@ -77,8 +86,10 @@ export class GoogleMapsShortLinkProvider { // Strict: a private address stays refused whatever ALLOW_INTERNAL_NETWORK says. const ssrf = await beforeDeadline(checkSsrf(url.href, true), signal); const addresses = ssrf.allowed ? (ssrf.resolvedIps ?? []) : []; - if (addresses.length === 0) return { ok: false, why: 'refused' }; - const location = await this.locationOf(url, addresses, signal); + // A name leading into this network is refused; one that does not resolve just now is Google's side, not the link's. + if (addresses.length === 0) return { ok: false, why: ssrf.isPrivate ? 'refused' : 'unreachable' }; + const { status, location } = await this.answerOf(url, addresses, signal); + if (NO_SUCH_LINK.has(status)) return { ok: false, why: 'not_found' }; if (location === null) return { ok: false, why: 'no_redirect' }; if (location.length > limits.locationChars) return { ok: false, why: 'unreachable' }; let next: URL; @@ -92,8 +103,8 @@ export class GoogleMapsShortLinkProvider { return isGoogleMapsLongLink(next) ? { ok: true, url: next.href } : { ok: false, why: 'refused' }; } - /** One request through the pinned dispatcher, nothing followed and no body read: the Location of a 3xx, or null. */ - private async locationOf(url: URL, addresses: string[], signal: AbortSignal): Promise { + /** One request through the pinned dispatcher, nothing followed and no body read. */ + private async answerOf(url: URL, addresses: string[], signal: AbortSignal): Promise { const dispatcher = createOutboundDispatcher(url.href, addresses); // Nothing of the caller's goes along: no cookie, no authorization, no referrer. // Node's fetch keeps no cookie jar, and credentials 'omit' says so for the record. @@ -110,7 +121,8 @@ export class GoogleMapsShortLinkProvider { // Object.assign joins the two without casting either away. const response = await fetch(url.href, Object.assign(init, { dispatcher })); discardBody(response); - return response.status >= 300 && response.status < 400 ? response.headers.get('location') : null; + const { status } = response; + return { status, location: status >= 300 && status < 400 ? response.headers.get('location') : null }; } finally { void dispatcher.close().catch((err: unknown) => logDebug(`[walk import] dispatcher not closed: ${String(err)}`)); } diff --git a/server/src/nest/tours/tour-walk-import.mcp.ts b/server/src/nest/tours/tour-walk-import.mcp.ts index 638b58454..f95a83766 100644 --- a/server/src/nest/tours/tour-walk-import.mcp.ts +++ b/server/src/nest/tours/tour-walk-import.mcp.ts @@ -1,6 +1,6 @@ import { ADDON_IDS } from '../../addons'; import { noAccess, permissionDenied } from '../../mcp/tools/_shared'; -import { McpController, Tool, TOOL_ANNOTATIONS_READONLY, ok, type McpContext } from '../../nest-mcp'; +import { McpController, Tool, TOOL_ANNOTATIONS_OPEN_WORLD_READONLY, ok, type McpContext } from '../../nest-mcp'; import { addonGate } from '../addons/addon-gate'; import { AddonsService } from '../addons/addons.service'; import { McpToolGuardsService } from '../mcp-shared/mcp-tool-guards.service'; @@ -36,7 +36,8 @@ export class TourWalkImportMcp { tripId: idSchema.describe('The trip the walk is meant for'), url: preview.url, }, - annotations: TOOL_ANNOTATIONS_READONLY, + // Open world: a short link is followed to Google on every call. + annotations: TOOL_ANNOTATIONS_OPEN_WORLD_READONLY, when: addonGate(ADDON_IDS.TOURS), access: { group: 'trips', mode: 'read' }, }) diff --git a/server/src/nest/tours/tour-walk-import.service.ts b/server/src/nest/tours/tour-walk-import.service.ts index 78e1a185f..dc425bab2 100644 --- a/server/src/nest/tours/tour-walk-import.service.ts +++ b/server/src/nest/tours/tour-walk-import.service.ts @@ -7,6 +7,7 @@ import { PlaceImportService, type DirWaypoint, } from '../place-import/place-import.service'; +import type { ShortLinkFailure } from '../place-import/place-import.types'; import { Injectable } from '@nestjs/common'; import { TOUR_STATION_NAME_MAX, @@ -25,6 +26,7 @@ const REFUSAL_TEXT: Readonly> = { 'The link does not say clearly that the route is on foot. Choose walking in Google Maps and share it again.', short_link_refused: 'The short link leads somewhere other than Google Maps, so it was not followed.', short_link_failed: 'The short link could not be followed just now. Try again, or paste the long link.', + short_link_unknown: 'Google Maps does not know that short link. Share the route in Google Maps again.', too_few_stops: 'Fewer than two stops could be read from that link.', too_many_stops: 'That route has more stops than a walk can take.', }; @@ -32,6 +34,19 @@ const REFUSAL_TEXT: Readonly> = { /** Reasons that are Google's answer rather than the link's. */ const UPSTREAM: ReadonlySet = new Set(['short_link_failed']); +/** + * Why a short link was not followed, as the walk import says it: a link that + * leaves Google Maps, one Google does not know, and the rest a failure on + * the way that may pass. + */ +const SHORT_LINK_REFUSAL: Readonly> = { + refused: 'short_link_refused', + not_found: 'short_link_unknown', + unreachable: 'short_link_failed', + too_many_redirects: 'short_link_failed', + no_redirect: 'short_link_failed', +}; + function refuse(reason: WalkImportRefusal): DomainError { return new DomainError(UPSTREAM.has(reason) ? 502 : 400, REFUSAL_TEXT[reason], { code: reason, details: { reason } }); } @@ -76,7 +91,7 @@ export class TourWalkImportService { private async followed(link: URL): Promise { const outcome = await this.placeImport.resolveGoogleShortLink(link.href); - if ('why' in outcome) throw refuse(outcome.why === 'refused' ? 'short_link_refused' : 'short_link_failed'); + if ('why' in outcome) throw refuse(SHORT_LINK_REFUSAL[outcome.why]); return new URL(outcome.url); } } diff --git a/server/tests/e2e/tours-walk-import.e2e.test.ts b/server/tests/e2e/tours-walk-import.e2e.test.ts index c0b7511c2..0bb99b4fa 100644 --- a/server/tests/e2e/tours-walk-import.e2e.test.ts +++ b/server/tests/e2e/tours-walk-import.e2e.test.ts @@ -230,4 +230,21 @@ describe('Tours walk import e2e (real guards + temp SQLite)', () => { }); expect(await countRows(orm, Tours, {})).toBe(0); }); + + it('502 when the short link name does not resolve just now, and 400 when Google does not know the link', async () => { + lookup.mockRejectedValue(Object.assign(new Error('getaddrinfo EAI_AGAIN maps.app.goo.gl'), { code: 'EAI_AGAIN' })); + const offline = await preview(OWNER, { url: SHORT }); + expect([offline.status, offline.body.reason]).toEqual([502, 'short_link_failed']); + expect(fetchSpy).not.toHaveBeenCalled(); + + lookup.mockResolvedValue([{ address: '142.250.185.14', family: 4 }] as never); + fetchSpy.mockResolvedValueOnce(new Response('not found', { status: 404 })); + const unknown = await preview(OWNER, { url: SHORT }); + expect(unknown.status).toBe(400); + expect(unknown.body).toEqual({ + error: 'Google Maps does not know that short link. Share the route in Google Maps again.', + reason: 'short_link_unknown', + }); + expect(await countRows(orm, Tours, {})).toBe(0); + }); }); diff --git a/server/tests/unit/nest/place-import/google-maps-short-link.provider.test.ts b/server/tests/unit/nest/place-import/google-maps-short-link.provider.test.ts index aac1b640e..9baae8211 100644 --- a/server/tests/unit/nest/place-import/google-maps-short-link.provider.test.ts +++ b/server/tests/unit/nest/place-import/google-maps-short-link.provider.test.ts @@ -194,7 +194,12 @@ describe('GoogleMapsShortLinkProvider', () => { }); it('SHORT-010: an answer that is no redirect, and a redirect relative to the short host', async () => { - answers(new Response('not found', { status: 404 })); + answers(new Response('', { status: 200 })); + expect(await provider.resolve(SHORT)).toEqual({ ok: false, why: 'no_redirect' }); + // Busy or blocked just now is no answer about the link either. + answers(new Response(null, { status: 503 })); + expect(await provider.resolve(SHORT)).toEqual({ ok: false, why: 'no_redirect' }); + answers(new Response(null, { status: 429 })); expect(await provider.resolve(SHORT)).toEqual({ ok: false, why: 'no_redirect' }); answers(redirect('/elsewhere'), redirect(PORTO_RIBEIRA)); expect(await provider.resolve(SHORT)).toEqual({ ok: true, url: PORTO_RIBEIRA }); @@ -228,4 +233,33 @@ describe('GoogleMapsShortLinkProvider', () => { expect(close).toHaveBeenCalledTimes(1); close.mockRestore(); }); + + it('SHORT-014: a name that does not resolve just now is unreachable, not a link that leads elsewhere', async () => { + const noAnswer = (code: string) => Object.assign(new Error(`getaddrinfo ${code}`), { code }); + await inTurn(['EAI_AGAIN', 'ENOTFOUND'], async (code) => { + lookup.mockReset(); + lookup.mockRejectedValue(noAnswer(code)); + const fetchSpy = answers(); + expect(await provider.resolve(SHORT)).toEqual({ ok: false, why: 'unreachable' }); + expect(fetchSpy).not.toHaveBeenCalled(); + }); + // A later hop whose name does not resolve says the same. + lookup.mockReset(); + lookup.mockResolvedValueOnce([{ address: PUBLIC_IP, family: 4 }] as never); + lookup.mockRejectedValueOnce(noAnswer('EAI_AGAIN')); + const fetchSpy = answers(redirect('https://goo.gl/maps/next')); + expect(await provider.resolve(SHORT)).toEqual({ ok: false, why: 'unreachable' }); + expect(fetchSpy).toHaveBeenCalledTimes(1); + expect(lookedUp()).toEqual(['maps.app.goo.gl', 'goo.gl']); + }); + + it('SHORT-015: a short link Google does not know is not_found, at the first hop or a later one', async () => { + await inTurn([404, 410], async (status) => { + answers(new Response('not found', { status })); + expect(await provider.resolve(SHORT)).toEqual({ ok: false, why: 'not_found' }); + }); + const fetchSpy = answers(redirect('https://goo.gl/maps/next'), new Response(null, { status: 404 })); + expect(await provider.resolve(SHORT)).toEqual({ ok: false, why: 'not_found' }); + expect(fetchSpy).toHaveBeenCalledTimes(2); + }); }); diff --git a/server/tests/unit/nest/tour-walk-import.mcp.test.ts b/server/tests/unit/nest/tour-walk-import.mcp.test.ts index 660252a95..73304acf5 100644 --- a/server/tests/unit/nest/tour-walk-import.mcp.test.ts +++ b/server/tests/unit/nest/tour-walk-import.mcp.test.ts @@ -6,6 +6,7 @@ */ import { trekMcpErrorMapper } from '../../../src/mcp/nest-mcp-policy'; import type { McpContext } from '../../../src/nest-mcp'; +import { getEntry, type ClassRef } from '../../../src/nest-mcp/metadata'; import { DomainError, catchDomainError } from '../../../src/nest/common/domain-error'; import { McpToolGuardsService } from '../../../src/nest/mcp-shared/mcp-tool-guards.service'; import { GoogleMapsShortLinkProvider } from '../../../src/nest/place-import/providers/google-maps-short-link.provider'; @@ -13,15 +14,17 @@ import { TourWalkImportMcp } from '../../../src/nest/tours/tour-walk-import.mcp' import { ToursModule } from '../../../src/nest/tours/tours.module'; import { PORTO_RIBEIRA } from '../../fixtures/google-maps-walks'; import { createSnapshotTestDb } from '../../helpers/db-mock'; -import { createTrip, createUser } from '../../helpers/factories'; -import { resetTestDb } from '../../helpers/test-db'; +import { makeTrip } from '../../helpers/factories/trips'; +import { makeUser } from '../../helpers/factories/users'; import { createTestModule, type TestModule } from '../../helpers/test-module'; +import { createTestOrm, type TestOrm } from '../../helpers/test-orm'; import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'; const db = createSnapshotTestDb(); const resolve = vi.fn(); let t: TestModule; +let orm: TestOrm; let mcp: TourWalkImportMcp; beforeAll(async () => { @@ -30,13 +33,12 @@ beforeAll(async () => { imports: [ToursModule], overrides: [{ provide: GoogleMapsShortLinkProvider, useValue: { resolve } }], }); + orm = await createTestOrm(db); mcp = t.get(TourWalkImportMcp); }); -beforeEach(() => { - resetTestDb(db); - resolve.mockReset(); -}); +beforeEach(() => resolve.mockReset()); afterAll(async () => { + await orm.close(); await t.close(); db.close(); }); @@ -48,16 +50,16 @@ function read(result: { content: Array<{ type: string; text: string }>; isError? return result.isError ? { error: text } : JSON.parse(text); } -function fixture() { - const { user } = createUser(db); - const { user: outsider } = createUser(db); - const trip = createTrip(db, user.id, { title: 'Porto' }); +async function fixture() { + const { user } = await makeUser(orm); + const { user: outsider } = await makeUser(orm); + const trip = await makeTrip(orm, user.id, { title: 'Porto' }); return { user, outsider, trip }; } describe('TourWalkImportMcp', () => { it('WALK-IMPORT-MCP-001: preview_google_maps_walk reads the stops of a walking route and stores nothing', async () => { - const { user, trip } = fixture(); + const { user, trip } = await fixture(); const answer = read(await mcp.previewGoogleMapsWalk({ tripId: trip.id, url: PORTO_RIBEIRA }, ctx(user.id))); expect(answer.resolved_url).toBe(PORTO_RIBEIRA); expect(answer.stations).toHaveLength(5); @@ -66,7 +68,7 @@ describe('TourWalkImportMcp', () => { }); it('WALK-IMPORT-MCP-002: nothing for someone outside the trip, nor for a member who may not edit places', async () => { - const { user, outsider, trip } = fixture(); + const { user, outsider, trip } = await fixture(); expect((await mcp.previewGoogleMapsWalk({ tripId: trip.id, url: PORTO_RIBEIRA }, ctx(outsider.id))).isError).toBe( true, ); @@ -78,7 +80,7 @@ describe('TourWalkImportMcp', () => { }); it('WALK-IMPORT-MCP-003: a route not on foot is refused with the English text REST sends', async () => { - const { user, trip } = fixture(); + const { user, trip } = await fixture(); const car = PORTO_RIBEIRA.replace(/!3e2$/, '!3e0'); const err = await catchDomainError(() => mcp.previewGoogleMapsWalk({ tripId: trip.id, url: car }, ctx(user.id))); expect(err).toBeInstanceOf(DomainError); @@ -92,4 +94,14 @@ describe('TourWalkImportMcp', () => { isError: true, }); }); + + it('WALK-IMPORT-MCP-004: preview_google_maps_walk is read-only and open world, since a short link is followed to Google', () => { + const entry = getEntry(TourWalkImportMcp as unknown as ClassRef, 'previewGoogleMapsWalk'); + expect(entry?.kind).toBe('tool'); + expect(entry?.kind === 'tool' && entry.options.annotations).toMatchObject({ + readOnlyHint: true, + destructiveHint: false, + openWorldHint: true, + }); + }); }); diff --git a/server/tests/unit/nest/tour-walk-import.service.test.ts b/server/tests/unit/nest/tour-walk-import.service.test.ts index f16dee12e..c75112226 100644 --- a/server/tests/unit/nest/tour-walk-import.service.test.ts +++ b/server/tests/unit/nest/tour-walk-import.service.test.ts @@ -12,7 +12,13 @@ import { ToursModule } from '../../../src/nest/tours/tours.module'; import { PORTO_ALIADOS, PORTO_RIBEIRA } from '../../fixtures/google-maps-walks'; import { createSnapshotTestDb } from '../../helpers/db-mock'; import { createTestModule, type TestModule } from '../../helpers/test-module'; -import { TOUR_STATION_NAME_MAX, WALK_IMPORT_STATIONS_MAX, type WalkImportRefusal } from '@trek/shared'; +import { + TOUR_STATION_NAME_MAX, + WALK_IMPORT_REFUSALS, + WALK_IMPORT_STATIONS_MAX, + type WalkImportRefusal, +} from '@trek/shared'; +import en from '@trek/shared/i18n/en'; import { afterAll, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest'; @@ -132,6 +138,9 @@ describe('TourWalkImportService.preview', () => { it('WALK-IMPORT-007: a short link the resolver refuses or cannot follow says which, the second as Google’s failure', async () => { resolve.mockResolvedValueOnce({ ok: false, why: 'refused' }); expect(await refusal('https://maps.app.goo.gl/abc')).toMatchObject({ status: 400, reason: 'short_link_refused' }); + // Google's final answer that it has no such link is the link's, and asking again changes nothing. + resolve.mockResolvedValueOnce({ ok: false, why: 'not_found' }); + expect(await refusal('https://maps.app.goo.gl/abc')).toMatchObject({ status: 400, reason: 'short_link_unknown' }); // Each one Google's failure, not the link's. const failed = await Promise.all( (['unreachable', 'too_many_redirects', 'no_redirect'] as const).map((why) => { @@ -150,4 +159,31 @@ describe('TourWalkImportService.preview', () => { expect(most.stations).toHaveLength(WALK_IMPORT_STATIONS_MAX); expect(most.stations.every((station) => station.lat !== null)).toBe(true); }); + + it('WALK-IMPORT-009: every reason is sent with the English text the planner shows for it', async () => { + const SHORT = 'https://maps.app.goo.gl/abc'; + const shortLink = (why: string) => () => resolve.mockResolvedValueOnce({ ok: false, why }); + const nothing = () => undefined; + const cases: Record unknown]> = { + not_google_maps: ['not a link', nothing], + not_a_route: ['https://www.google.com/maps/place/Cathedral/@48.1,11.5,17z', nothing], + not_walking: [walk(['A', 'B'], '!3e0'), nothing], + mode_unknown: [walk(['A', 'B'], ''), nothing], + short_link_refused: [SHORT, shortLink('refused')], + short_link_failed: [SHORT, shortLink('unreachable')], + short_link_unknown: [SHORT, shortLink('not_found')], + too_few_stops: [`${DIR}Cathedral/data=!3e2`, nothing], + too_many_stops: [walk(Array.from({ length: WALK_IMPORT_STATIONS_MAX + 1 }, (_, i) => `Stop${i}`)), nothing], + }; + expect(Object.keys(cases).sort()).toEqual([...WALK_IMPORT_REFUSALS].sort()); + const english: Record = en; + const sent = await WALK_IMPORT_REFUSALS.reduce>>(async (previous, reason) => { + const done = await previous; + const [url, arrange] = cases[reason]; + arrange(); + const answer = await refusal(url); + return [...done, [answer.reason, answer.error]]; + }, Promise.resolve([])); + expect(sent).toEqual(WALK_IMPORT_REFUSALS.map((reason) => [reason, english[`tours.walkImport.refusal.${reason}`]])); + }); }); diff --git a/shared/src/i18n/ar/tours.ts b/shared/src/i18n/ar/tours.ts index df8d7d997..441e7f41c 100644 --- a/shared/src/i18n/ar/tours.ts +++ b/shared/src/i18n/ar/tours.ts @@ -357,6 +357,8 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.short_link_refused': 'يقود الرابط المختصر إلى مكان غير Google Maps، لذلك لم يُتابَع.', 'tours.walkImport.refusal.short_link_failed': 'تعذرت متابعة الرابط المختصر الآن. حاول مرة أخرى أو الصق الرابط الطويل.', + 'tours.walkImport.refusal.short_link_unknown': + 'لا يعرف Google Maps هذا الرابط المختصر. شارك المسار من Google Maps مرة أخرى.', 'tours.walkImport.refusal.too_few_stops': 'أمكن قراءة أقل من محطتين من هذا الرابط.', 'tours.walkImport.refusal.too_many_stops': 'في هذا المسار محطات أكثر مما تتسع له جولة المشي.', 'tours.provenance.takenOverFrom': 'منقولة من', diff --git a/shared/src/i18n/az/tours.ts b/shared/src/i18n/az/tours.ts index 8827e48ea..724f15de3 100644 --- a/shared/src/i18n/az/tours.ts +++ b/shared/src/i18n/az/tours.ts @@ -344,6 +344,8 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.short_link_refused': 'Qısa keçid Google Maps-dən başqa yerə aparır, ona görə də izlənmədi.', 'tours.walkImport.refusal.short_link_failed': 'Qısa keçidi indi izləmək mümkün olmadı. Yenidən cəhd et və ya uzun keçidi yapışdır.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps bu qısa keçidi tanımır. Marşrutu Google Maps-də yenidən paylaş.', 'tours.walkImport.refusal.too_few_stops': 'Bu keçiddən ikidən az dayanacaq oxuna bildi.', 'tours.walkImport.refusal.too_many_stops': 'Bu marşrutda bir gəzintinin götürə biləcəyindən çox dayanacaq var.', 'tours.provenance.takenOverFrom': 'Götürüldüyü yer', diff --git a/shared/src/i18n/br/tours.ts b/shared/src/i18n/br/tours.ts index a50210756..bb29dee29 100644 --- a/shared/src/i18n/br/tours.ts +++ b/shared/src/i18n/br/tours.ts @@ -350,6 +350,8 @@ const tours: TranslationStrings = { 'O link curto leva a outro lugar que não o Google Maps, então não foi seguido.', 'tours.walkImport.refusal.short_link_failed': 'Não foi possível seguir o link curto agora. Tente de novo ou cole o link longo.', + 'tours.walkImport.refusal.short_link_unknown': + 'O Google Maps não reconhece este link curto. Compartilhe a rota de novo no Google Maps.', 'tours.walkImport.refusal.too_few_stops': 'Menos de duas paradas puderam ser lidas desse link.', 'tours.walkImport.refusal.too_many_stops': 'Essa rota tem mais paradas do que um passeio comporta.', 'tours.provenance.takenOverFrom': 'Trazido de', diff --git a/shared/src/i18n/ca/tours.ts b/shared/src/i18n/ca/tours.ts index aac1f8fad..bbee0a430 100644 --- a/shared/src/i18n/ca/tours.ts +++ b/shared/src/i18n/ca/tours.ts @@ -351,6 +351,8 @@ const tours: TranslationStrings = { "L'enllaç curt porta a un lloc que no és Google Maps, així que no s'ha seguit.", 'tours.walkImport.refusal.short_link_failed': "Ara no s'ha pogut seguir l'enllaç curt. Torna-ho a provar o enganxa l'enllaç llarg.", + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps no reconeix aquest enllaç curt. Torna a compartir la ruta des de Google Maps.', 'tours.walkImport.refusal.too_few_stops': "D'aquest enllaç s'han pogut llegir menys de dues parades.", 'tours.walkImport.refusal.too_many_stops': 'Aquesta ruta té més parades de les que admet un passeig.', 'tours.provenance.takenOverFrom': 'Agafada de', diff --git a/shared/src/i18n/cs/tours.ts b/shared/src/i18n/cs/tours.ts index 0b1565ad5..a29e6630c 100644 --- a/shared/src/i18n/cs/tours.ts +++ b/shared/src/i18n/cs/tours.ts @@ -344,6 +344,8 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.short_link_refused': 'Krátký odkaz vede jinam než do Google Maps, proto se nesledoval.', 'tours.walkImport.refusal.short_link_failed': 'Krátký odkaz se teď nepodařilo sledovat. Zkus to znovu, nebo vlož dlouhý odkaz.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps tento krátký odkaz nezná. Sdílej trasu v Google Maps znovu.', 'tours.walkImport.refusal.too_few_stops': 'Z tohoto odkazu se podařilo přečíst méně než dvě zastávky.', 'tours.walkImport.refusal.too_many_stops': 'Tato trasa má víc zastávek, než procházka pojme.', 'tours.provenance.takenOverFrom': 'Převzato z', diff --git a/shared/src/i18n/de/tours.ts b/shared/src/i18n/de/tours.ts index ba6f756bb..7cd59f6fa 100644 --- a/shared/src/i18n/de/tours.ts +++ b/shared/src/i18n/de/tours.ts @@ -353,6 +353,8 @@ const tours: TranslationStrings = { 'Der Kurzlink führt nicht zu Google Maps und wurde deshalb nicht aufgerufen.', 'tours.walkImport.refusal.short_link_failed': 'Der Kurzlink ließ sich gerade nicht auflösen. Versuch es noch einmal oder füge den langen Link ein.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps kennt diesen Kurzlink nicht. Teile die Route in Google Maps noch einmal.', 'tours.walkImport.refusal.too_few_stops': 'Aus diesem Link ließen sich keine zwei Stationen lesen.', 'tours.walkImport.refusal.too_many_stops': 'Diese Route hat mehr Stationen, als ein Walk aufnehmen kann.', 'tours.provenance.takenOverFrom': 'Übernommen aus', diff --git a/shared/src/i18n/en/tours.ts b/shared/src/i18n/en/tours.ts index 105792499..a9893482a 100644 --- a/shared/src/i18n/en/tours.ts +++ b/shared/src/i18n/en/tours.ts @@ -343,6 +343,8 @@ const tours: TranslationStrings = { 'The short link leads somewhere other than Google Maps, so it was not followed.', 'tours.walkImport.refusal.short_link_failed': 'The short link could not be followed just now. Try again, or paste the long link.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps does not know that short link. Share the route in Google Maps again.', 'tours.walkImport.refusal.too_few_stops': 'Fewer than two stops could be read from that link.', 'tours.walkImport.refusal.too_many_stops': 'That route has more stops than a walk can take.', 'tours.provenance.takenOverFrom': 'Taken over from', diff --git a/shared/src/i18n/es/tours.ts b/shared/src/i18n/es/tours.ts index e8531eec7..47cddb93e 100644 --- a/shared/src/i18n/es/tours.ts +++ b/shared/src/i18n/es/tours.ts @@ -350,6 +350,8 @@ const tours: TranslationStrings = { 'El enlace corto lleva a otro sitio que no es Google Maps, así que no se siguió.', 'tours.walkImport.refusal.short_link_failed': 'No se pudo seguir el enlace corto ahora. Vuelve a intentarlo o pega el enlace largo.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps no reconoce este enlace corto. Vuelve a compartir la ruta desde Google Maps.', 'tours.walkImport.refusal.too_few_stops': 'De ese enlace se pudieron leer menos de dos paradas.', 'tours.walkImport.refusal.too_many_stops': 'Esa ruta tiene más paradas de las que admite un paseo.', 'tours.provenance.takenOverFrom': 'Traída de', diff --git a/shared/src/i18n/et/tours.ts b/shared/src/i18n/et/tours.ts index 88c1a9238..f21bdd023 100644 --- a/shared/src/i18n/et/tours.ts +++ b/shared/src/i18n/et/tours.ts @@ -345,6 +345,8 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.short_link_refused': 'Lühilink viib mujale kui Google Mapsi, seepärast seda ei järgitud.', 'tours.walkImport.refusal.short_link_failed': 'Lühilinki ei õnnestunud praegu järgida. Proovi uuesti või kleebi pikk link.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps ei tunne seda lühilinki. Jaga marsruuti Google Mapsis uuesti.', 'tours.walkImport.refusal.too_few_stops': 'Sellest lingist õnnestus lugeda vähem kui kaks peatust.', 'tours.walkImport.refusal.too_many_stops': 'Sellel marsruudil on rohkem peatusi, kui jalutuskäiku mahub.', 'tours.provenance.takenOverFrom': 'Üle võetud', diff --git a/shared/src/i18n/fr/tours.ts b/shared/src/i18n/fr/tours.ts index f4c3f9913..68bde3b39 100644 --- a/shared/src/i18n/fr/tours.ts +++ b/shared/src/i18n/fr/tours.ts @@ -356,6 +356,8 @@ const tours: TranslationStrings = { "Le lien court mène ailleurs que vers Google Maps, il n'a donc pas été suivi.", 'tours.walkImport.refusal.short_link_failed': "Le lien court n'a pas pu être suivi pour l'instant. Réessaie, ou colle le lien long.", + 'tours.walkImport.refusal.short_link_unknown': + "Google Maps ne reconnaît pas ce lien court. Partage de nouveau l'itinéraire depuis Google Maps.", 'tours.walkImport.refusal.too_few_stops': 'Moins de deux étapes ont pu être lues dans ce lien.', 'tours.walkImport.refusal.too_many_stops': "Cet itinéraire compte plus d'étapes qu'une balade ne peut en prendre.", 'tours.provenance.takenOverFrom': 'Repris de', diff --git a/shared/src/i18n/gr/tours.ts b/shared/src/i18n/gr/tours.ts index a9c91ed44..1e564106f 100644 --- a/shared/src/i18n/gr/tours.ts +++ b/shared/src/i18n/gr/tours.ts @@ -358,6 +358,8 @@ const tours: TranslationStrings = { 'Ο σύντομος σύνδεσμος οδηγεί κάπου αλλού και όχι στο Google Maps, γι’ αυτό δεν ακολουθήθηκε.', 'tours.walkImport.refusal.short_link_failed': 'Ο σύντομος σύνδεσμος δεν ακολουθήθηκε αυτή τη στιγμή. Δοκίμασε ξανά ή επικόλλησε τον μεγάλο σύνδεσμο.', + 'tours.walkImport.refusal.short_link_unknown': + 'Το Google Maps δεν αναγνωρίζει αυτόν τον σύντομο σύνδεσμο. Μοιράσου ξανά τη διαδρομή από το Google Maps.', 'tours.walkImport.refusal.too_few_stops': 'Από αυτόν τον σύνδεσμο διαβάστηκαν λιγότερες από δύο στάσεις.', 'tours.walkImport.refusal.too_many_stops': 'Αυτή η διαδρομή έχει περισσότερες στάσεις απ’ όσες χωράει μια βόλτα.', 'tours.provenance.takenOverFrom': 'Μεταφέρθηκε από', diff --git a/shared/src/i18n/hu/tours.ts b/shared/src/i18n/hu/tours.ts index c8658af8a..b05bb168a 100644 --- a/shared/src/i18n/hu/tours.ts +++ b/shared/src/i18n/hu/tours.ts @@ -351,6 +351,8 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.short_link_refused': 'A rövid link nem a Google Mapsre vezet, ezért nem követtük.', 'tours.walkImport.refusal.short_link_failed': 'A rövid linket most nem sikerült követni. Próbáld újra, vagy illeszd be a hosszú linket.', + 'tours.walkImport.refusal.short_link_unknown': + 'A Google Maps nem ismeri ezt a rövid linket. Oszd meg újra az útvonalat a Google Mapsben.', 'tours.walkImport.refusal.too_few_stops': 'Ebből a linkből kettőnél kevesebb megállót sikerült beolvasni.', 'tours.walkImport.refusal.too_many_stops': 'Ennek az útvonalnak több megállója van, mint amennyit egy séta elbír.', 'tours.provenance.takenOverFrom': 'Átvéve innen', diff --git a/shared/src/i18n/id/tours.ts b/shared/src/i18n/id/tours.ts index 695978daa..7f5120144 100644 --- a/shared/src/i18n/id/tours.ts +++ b/shared/src/i18n/id/tours.ts @@ -344,6 +344,8 @@ const tours: TranslationStrings = { 'Tautan pendek mengarah ke tempat selain Google Maps, jadi tidak diikuti.', 'tours.walkImport.refusal.short_link_failed': 'Tautan pendek belum bisa diikuti saat ini. Coba lagi, atau tempel tautan panjangnya.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps tidak mengenali tautan pendek ini. Bagikan lagi rutenya dari Google Maps.', 'tours.walkImport.refusal.too_few_stops': 'Kurang dari dua titik singgah yang bisa dibaca dari tautan itu.', 'tours.walkImport.refusal.too_many_stops': 'Rute ini punya lebih banyak titik singgah daripada yang muat dalam satu rute jalan kaki.', diff --git a/shared/src/i18n/it/tours.ts b/shared/src/i18n/it/tours.ts index 2fa8f9084..74605879b 100644 --- a/shared/src/i18n/it/tours.ts +++ b/shared/src/i18n/it/tours.ts @@ -352,6 +352,8 @@ const tours: TranslationStrings = { 'Il link breve porta altrove rispetto a Google Maps, quindi non è stato seguito.', 'tours.walkImport.refusal.short_link_failed': 'Il link breve non si è potuto seguire adesso. Riprova oppure incolla il link lungo.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps non riconosce questo link breve. Condividi di nuovo il percorso da Google Maps.', 'tours.walkImport.refusal.too_few_stops': 'Da questo link si sono potute leggere meno di due tappe.', 'tours.walkImport.refusal.too_many_stops': 'Questo percorso ha più tappe di quante una passeggiata ne possa contenere.', diff --git a/shared/src/i18n/ja/tours.ts b/shared/src/i18n/ja/tours.ts index c3476b2a8..25332f132 100644 --- a/shared/src/i18n/ja/tours.ts +++ b/shared/src/i18n/ja/tours.ts @@ -335,6 +335,8 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.short_link_refused': '短縮リンクの行き先が Google Maps ではないため、たどりませんでした。', 'tours.walkImport.refusal.short_link_failed': 'いまは短縮リンクをたどれませんでした。もう一度試すか、長いリンクを貼り付けてください。', + 'tours.walkImport.refusal.short_link_unknown': + 'この短縮リンクは Google Maps に見つかりません。Google Maps でルートをもう一度共有してください。', 'tours.walkImport.refusal.too_few_stops': 'このリンクから読み取れた立ち寄り先は 2 件未満でした。', 'tours.walkImport.refusal.too_many_stops': 'このルートの立ち寄り先は、街歩きに入る数を超えています。', 'tours.provenance.takenOverFrom': '取り込み元', diff --git a/shared/src/i18n/ko/tours.ts b/shared/src/i18n/ko/tours.ts index 71c0a08c8..271713a96 100644 --- a/shared/src/i18n/ko/tours.ts +++ b/shared/src/i18n/ko/tours.ts @@ -334,6 +334,8 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.short_link_refused': '단축 링크가 Google Maps가 아닌 곳으로 이어져서 따라가지 않았습니다.', 'tours.walkImport.refusal.short_link_failed': '지금은 단축 링크를 따라가지 못했습니다. 다시 시도하거나 긴 링크를 붙여 넣으세요.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps에서 이 단축 링크를 찾을 수 없습니다. Google Maps에서 경로를 다시 공유하세요.', 'tours.walkImport.refusal.too_few_stops': '이 링크에서 읽은 정류지가 두 곳보다 적습니다.', 'tours.walkImport.refusal.too_many_stops': '이 경로에는 산책 하나에 담을 수 있는 것보다 많은 정류지가 있습니다.', 'tours.provenance.takenOverFrom': '가져온 곳', diff --git a/shared/src/i18n/nl/tours.ts b/shared/src/i18n/nl/tours.ts index 42582dbd8..b302e6d48 100644 --- a/shared/src/i18n/nl/tours.ts +++ b/shared/src/i18n/nl/tours.ts @@ -352,6 +352,8 @@ const tours: TranslationStrings = { 'De korte link leidt ergens anders heen dan Google Maps en is daarom niet gevolgd.', 'tours.walkImport.refusal.short_link_failed': 'De korte link kon nu niet worden gevolgd. Probeer het opnieuw of plak de lange link.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps kent deze korte link niet. Deel de route opnieuw vanuit Google Maps.', 'tours.walkImport.refusal.too_few_stops': 'Uit deze link konden minder dan twee haltes worden gelezen.', 'tours.walkImport.refusal.too_many_stops': 'Deze route heeft meer haltes dan een wandeling kan bevatten.', 'tours.provenance.takenOverFrom': 'Overgenomen uit', diff --git a/shared/src/i18n/pl/tours.ts b/shared/src/i18n/pl/tours.ts index f6dde9c23..d8e23bd5b 100644 --- a/shared/src/i18n/pl/tours.ts +++ b/shared/src/i18n/pl/tours.ts @@ -360,6 +360,8 @@ const tours: TranslationStrings = { 'Krótki link prowadzi gdzie indziej niż do Google Maps, więc nie został otwarty.', 'tours.walkImport.refusal.short_link_failed': 'Nie udało się teraz otworzyć krótkiego linku. Spróbuj ponownie albo wklej długi link.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps nie zna tego krótkiego linku. Udostępnij trasę ponownie w Google Maps.', 'tours.walkImport.refusal.too_few_stops': 'Z tego linku udało się odczytać mniej niż dwa przystanki.', 'tours.walkImport.refusal.too_many_stops': 'Ta trasa ma więcej przystanków, niż zmieści spacer.', 'tours.provenance.takenOverFrom': 'Przejęto z', diff --git a/shared/src/i18n/ru/tours.ts b/shared/src/i18n/ru/tours.ts index 7394b4d1d..6f290dac0 100644 --- a/shared/src/i18n/ru/tours.ts +++ b/shared/src/i18n/ru/tours.ts @@ -363,6 +363,8 @@ const tours: TranslationStrings = { 'Короткая ссылка ведёт не в Google Maps, поэтому по ней не переходили.', 'tours.walkImport.refusal.short_link_failed': 'Не удалось перейти по короткой ссылке сейчас. Попробуй ещё раз или вставь длинную ссылку.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps не знает такой короткой ссылки. Поделись маршрутом в Google Maps ещё раз.', 'tours.walkImport.refusal.too_few_stops': 'Из этой ссылки удалось прочитать меньше двух остановок.', 'tours.walkImport.refusal.too_many_stops': 'В этом маршруте больше остановок, чем вмещает прогулка.', 'tours.provenance.takenOverFrom': 'Взят из', diff --git a/shared/src/i18n/sk/tours.ts b/shared/src/i18n/sk/tours.ts index 36af26d93..40828a716 100644 --- a/shared/src/i18n/sk/tours.ts +++ b/shared/src/i18n/sk/tours.ts @@ -345,6 +345,8 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.short_link_refused': 'Krátky odkaz vedie inam než do Google Maps, preto sa nesledoval.', 'tours.walkImport.refusal.short_link_failed': 'Krátky odkaz sa teraz nepodarilo sledovať. Skús to znova alebo vlož dlhý odkaz.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps tento krátky odkaz nepozná. Zdieľaj trasu v Google Maps znova.', 'tours.walkImport.refusal.too_few_stops': 'Z tohto odkazu sa podarilo prečítať menej ako dve zastávky.', 'tours.walkImport.refusal.too_many_stops': 'Táto trasa má viac zastávok, než prechádzka unesie.', 'tours.provenance.takenOverFrom': 'Prevzaté z', diff --git a/shared/src/i18n/sv/tours.ts b/shared/src/i18n/sv/tours.ts index cea52fb2f..24c0fe003 100644 --- a/shared/src/i18n/sv/tours.ts +++ b/shared/src/i18n/sv/tours.ts @@ -342,6 +342,8 @@ const tours: TranslationStrings = { 'Kortlänken leder någon annanstans än till Google Maps och följdes därför inte.', 'tours.walkImport.refusal.short_link_failed': 'Kortlänken kunde inte följas just nu. Försök igen eller klistra in den långa länken.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps känner inte till den här kortlänken. Dela rutten i Google Maps igen.', 'tours.walkImport.refusal.too_few_stops': 'Färre än två stopp kunde läsas från den länken.', 'tours.walkImport.refusal.too_many_stops': 'Den rutten har fler stopp än en promenad rymmer.', 'tours.provenance.takenOverFrom': 'Hämtad från', diff --git a/shared/src/i18n/th/tours.ts b/shared/src/i18n/th/tours.ts index d8a0c69fb..47fb674af 100644 --- a/shared/src/i18n/th/tours.ts +++ b/shared/src/i18n/th/tours.ts @@ -326,6 +326,8 @@ const tours: TranslationStrings = { 'ลิงก์ไม่ได้บอกชัดว่าเส้นทางนี้เป็นการเดินเท้า เลือกโหมดเดินใน Google Maps แล้วแชร์อีกครั้ง', 'tours.walkImport.refusal.short_link_refused': 'ลิงก์สั้นนี้พาไปที่อื่นที่ไม่ใช่ Google Maps จึงไม่ได้ตามไป', 'tours.walkImport.refusal.short_link_failed': 'ตอนนี้ตามลิงก์สั้นไม่ได้ ลองอีกครั้งหรือวางลิงก์แบบยาว', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps ไม่รู้จักลิงก์สั้นนี้ แชร์เส้นทางจาก Google Maps อีกครั้ง', 'tours.walkImport.refusal.too_few_stops': 'อ่านจุดแวะจากลิงก์นี้ได้ไม่ถึงสองจุด', 'tours.walkImport.refusal.too_many_stops': 'เส้นทางนี้มีจุดแวะมากกว่าที่ทริปเดินเท้าหนึ่งทริปรับได้', 'tours.provenance.takenOverFrom': 'นำมาจาก', diff --git a/shared/src/i18n/tours-locales.spec.ts b/shared/src/i18n/tours-locales.spec.ts index 41c082bdc..7aea6fd10 100644 --- a/shared/src/i18n/tours-locales.spec.ts +++ b/shared/src/i18n/tours-locales.spec.ts @@ -20,7 +20,7 @@ const tokens = (value: string) => [...value.matchAll(/\{[^{}]+\}/g)].map((match) // placeholder spec; here only the general keys are. const groups = pluralGroups(Object.keys(english)); const generalKeys = (keys: string[]) => keys.filter((key) => !pluralFormOf(key, groups)); -const GENERAL_KEY_COUNT = 816; +const GENERAL_KEY_COUNT = 817; function literalKeys(source: string): string[] { const tree = ts.createSourceFile('locale.ts', source, ts.ScriptTarget.Latest, true); diff --git a/shared/src/i18n/tr/tours.ts b/shared/src/i18n/tr/tours.ts index 8c0e30aa9..e52c22d0b 100644 --- a/shared/src/i18n/tr/tours.ts +++ b/shared/src/i18n/tr/tours.ts @@ -344,6 +344,8 @@ const tours: TranslationStrings = { 'Kısa bağlantı Google Maps dışında bir yere gidiyor, bu yüzden takip edilmedi.', 'tours.walkImport.refusal.short_link_failed': 'Kısa bağlantı şu anda takip edilemedi. Yeniden dene ya da uzun bağlantıyı yapıştır.', + 'tours.walkImport.refusal.short_link_unknown': + "Google Maps bu kısa bağlantıyı tanımıyor. Rotayı Google Maps'te yeniden paylaş.", 'tours.walkImport.refusal.too_few_stops': 'Bu bağlantıdan ikiden az durak okunabildi.', 'tours.walkImport.refusal.too_many_stops': 'Bu rotada bir yürüyüşün alabileceğinden fazla durak var.', 'tours.provenance.takenOverFrom': 'Alındığı yer', diff --git a/shared/src/i18n/uk/tours.ts b/shared/src/i18n/uk/tours.ts index e9a540b3a..5e9018d9b 100644 --- a/shared/src/i18n/uk/tours.ts +++ b/shared/src/i18n/uk/tours.ts @@ -358,6 +358,8 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.short_link_refused': 'Коротке посилання веде не в Google Maps, тому за ним не переходили.', 'tours.walkImport.refusal.short_link_failed': 'Не вдалося перейти за коротким посиланням зараз. Спробуй ще раз або встав довге посилання.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps не знає такого короткого посилання. Поділися маршрутом у Google Maps ще раз.', 'tours.walkImport.refusal.too_few_stops': 'З цього посилання вдалося прочитати менше двох зупинок.', 'tours.walkImport.refusal.too_many_stops': 'У цьому маршруті більше зупинок, ніж уміщує прогулянка.', 'tours.provenance.takenOverFrom': 'Взято з', diff --git a/shared/src/i18n/vi/tours.ts b/shared/src/i18n/vi/tours.ts index 02580e4e3..b959b3e78 100644 --- a/shared/src/i18n/vi/tours.ts +++ b/shared/src/i18n/vi/tours.ts @@ -343,6 +343,8 @@ const tours: TranslationStrings = { 'Liên kết rút gọn dẫn đến nơi khác chứ không phải Google Maps, nên không được mở theo.', 'tours.walkImport.refusal.short_link_failed': 'Hiện chưa mở theo được liên kết rút gọn. Hãy thử lại hoặc dán liên kết đầy đủ.', + 'tours.walkImport.refusal.short_link_unknown': + 'Google Maps không nhận ra liên kết rút gọn này. Hãy chia sẻ lại tuyến đường từ Google Maps.', 'tours.walkImport.refusal.too_few_stops': 'Chỉ đọc được ít hơn hai điểm dừng từ liên kết này.', 'tours.walkImport.refusal.too_many_stops': 'Tuyến này có nhiều điểm dừng hơn mức một lộ trình đi bộ chứa được.', 'tours.provenance.takenOverFrom': 'Lấy từ', diff --git a/shared/src/i18n/zh-TW/tours.ts b/shared/src/i18n/zh-TW/tours.ts index a8d07efaa..8b896dba6 100644 --- a/shared/src/i18n/zh-TW/tours.ts +++ b/shared/src/i18n/zh-TW/tours.ts @@ -312,6 +312,7 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.mode_unknown': '連結沒有明確表示這是步行路線。請在 Google Maps 中選擇步行,再分享一次。', 'tours.walkImport.refusal.short_link_refused': '這個短網址指向 Google Maps 以外的地方,因此沒有跟隨。', 'tours.walkImport.refusal.short_link_failed': '暫時無法跟隨這個短網址。請再試一次,或貼上完整的長連結。', + 'tours.walkImport.refusal.short_link_unknown': 'Google Maps 無法辨識這個短網址。請在 Google Maps 中重新分享路線。', 'tours.walkImport.refusal.too_few_stops': '從這個連結只讀取到不足兩個站點。', 'tours.walkImport.refusal.too_many_stops': '這條路線的站點比一次漫步能容納的更多。', 'tours.provenance.takenOverFrom': '引入自', diff --git a/shared/src/i18n/zh/tours.ts b/shared/src/i18n/zh/tours.ts index 1eeef7f50..550f1b17c 100644 --- a/shared/src/i18n/zh/tours.ts +++ b/shared/src/i18n/zh/tours.ts @@ -313,6 +313,7 @@ const tours: TranslationStrings = { 'tours.walkImport.refusal.mode_unknown': '链接没有明确表明这是步行路线。请在 Google Maps 中选择步行,再分享一次。', 'tours.walkImport.refusal.short_link_refused': '该短链接指向 Google Maps 以外的地方,因此没有跟随。', 'tours.walkImport.refusal.short_link_failed': '暂时无法跟随该短链接。请再试一次,或粘贴完整的长链接。', + 'tours.walkImport.refusal.short_link_unknown': 'Google Maps 无法识别该短链接。请在 Google Maps 中重新分享路线。', 'tours.walkImport.refusal.too_few_stops': '从该链接只读取到不足两个站点。', 'tours.walkImport.refusal.too_many_stops': '这条路线的站点比一次漫步能容纳的更多。', 'tours.provenance.takenOverFrom': '引入自', diff --git a/shared/src/tours/tour-walk.schema.spec.ts b/shared/src/tours/tour-walk.schema.spec.ts index db13f11a3..637f02221 100644 --- a/shared/src/tours/tour-walk.schema.spec.ts +++ b/shared/src/tours/tour-walk.schema.spec.ts @@ -101,6 +101,7 @@ describe('city walk import preview contract (CW-06, CW-07)', () => { 'mode_unknown', 'short_link_refused', 'short_link_failed', + 'short_link_unknown', 'too_few_stops', 'too_many_stops', ]); diff --git a/shared/src/tours/tour-walk.schema.ts b/shared/src/tours/tour-walk.schema.ts index ad470ee56..46e500d6c 100644 --- a/shared/src/tours/tour-walk.schema.ts +++ b/shared/src/tours/tour-walk.schema.ts @@ -65,6 +65,7 @@ export const WALK_IMPORT_REFUSALS = [ 'mode_unknown', 'short_link_refused', 'short_link_failed', + 'short_link_unknown', 'too_few_stops', 'too_many_stops', ] as const;