diff --git a/package-lock.json b/package-lock.json index cb3baa8..b82bfbe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3980,6 +3980,7 @@ "web": { "name": "@araharah/web", "dependencies": { + "@araharah/routing": "*", "@araharah/search": "*", "@araharah/theme": "*", "maplibre-gl": "^6.15.0" diff --git a/web/package.json b/web/package.json index d6e0ddc..0253315 100644 --- a/web/package.json +++ b/web/package.json @@ -13,7 +13,8 @@ "dependencies": { "maplibre-gl": "^6.15.0", "@araharah/theme": "*", - "@araharah/search": "*" + "@araharah/search": "*", + "@araharah/routing": "*" }, "devDependencies": { "vite": "^8.3.5", diff --git a/web/src/i18n/strings.ts b/web/src/i18n/strings.ts index 183f2e3..05c7705 100644 --- a/web/src/i18n/strings.ts +++ b/web/src/i18n/strings.ts @@ -2,12 +2,13 @@ * strings.ts — the Mini App shell's copy tokens.css (UI-SPEC §Copywriting Contract). * ------------------------------------------------------------------------------- * Every user-facing string the shell renders lives here and NOWHERE else — - * `web/src/ui/*` and `web/src/main.ts` import from this module, and the copy - * gate (web/test/copy-gate.test.mjs COPY1..COPY5) keeps it verbatim against - * the approved UI-SPEC table in en + ms. Register labels (`BOOT-01 //`, - * `BOOT-02 //`, `GEO // LOCATION`, `SYS // POSITION`) are instrument - * vocabulary: identical in both locales by design. Tone is clinical + honest - * (D-01): plain statements of what is stored and what is not. + * `web/src/ui/*`, `web/src/route/*` and `web/src/main.ts` import from this + * module, and the copy gate (web/test/copy-gate.test.mjs COPY1..COPY7) keeps + * it verbatim against the approved UI-SPEC table in en + ms. Register labels + * (`BOOT-01 //`, `BOOT-02 //`, `GEO // LOCATION`, `SYS // POSITION`, `ROUTE`, + * `ROUTE // ROUTER`) are instrument vocabulary: identical in both locales by + * design. Tone is clinical + honest (D-01): plain statements of what is + * stored and what is not. * * Locales: English default ("en") + Bahasa Melayu ("ms") — Phase 2 D-05 * precedent, same pickLocale ms-prefix rule as bot/src/i18n/strings.ts. @@ -45,6 +46,18 @@ export interface ShellStrings { destinationUnavailableBody: string; addToHomeScreen: string; homeScreenAlreadyAdded: string; + routeRegister: string; + routeDiffFastest: string; + /** Template — {min}/{n} placeholders are replaced in code (instrument formats, not locale strings). */ + routeDiffSlower: string; + routePendingRegister: string; + routePendingHeadline: string; + routePendingBody: string; + routePendingHint: string; + ctaSearchAgain: string; + ariaRouteAlternatives: string; + /** Template — {n}/{min}/{km} placeholders are replaced in code. */ + ariaRouteChip: string; } export type Locale = "en" | "ms"; @@ -82,6 +95,17 @@ export const strings: Record = { destinationUnavailableBody: "That place is not in this build. Search again from the bot.", addToHomeScreen: "ADD TO HOME SCREEN", homeScreenAlreadyAdded: "Already on your home screen", + routeRegister: "ROUTE", + routeDiffFastest: "Fastest route", + routeDiffSlower: "+{min} MIN VS ROUTE {n}", + routePendingRegister: "ROUTE // ROUTER", + routePendingHeadline: "Routing not wired up yet", + routePendingBody: + "Routes currently cover known KL landmarks only. The general router ships later — your coordinates were never sent anywhere.", + routePendingHint: "Send /cari in the chat and pick another landmark.", + ctaSearchAgain: "SEARCH AGAIN", + ariaRouteAlternatives: "Alternative routes", + ariaRouteChip: "Route {n}: {min} minutes, {km} kilometres", }, ms: { bootValidatingRegister: "BOOT-01 // SESSION", @@ -115,6 +139,17 @@ export const strings: Record = { destinationUnavailableBody: "Tempat itu tiada dalam binaan ini. Cari semula dari bot.", addToHomeScreen: "TAMBAH KE SKRIN UTAMA", homeScreenAlreadyAdded: "Sudah di skrin utama anda", + routeRegister: "ROUTE", + routeDiffFastest: "Laluan terpantas", + routeDiffSlower: "+{min} MIN VS LALUAN {n}", + routePendingRegister: "ROUTE // ROUTER", + routePendingHeadline: "Penghalaan belum dipasang", + routePendingBody: + "Laluan buat masa ini meliputi mercu tanda KL yang diketahui sahaja. Penghala am akan datang kemudian — koordinat anda tidak pernah dihantar ke mana-mana.", + routePendingHint: "Hantar /cari dalam chat dan pilih mercu tanda lain.", + ctaSearchAgain: "CARI SEMULA", + ariaRouteAlternatives: "Laluan alternatif", + ariaRouteChip: "Laluan {n}: {min} minit, {km} kilometer", }, };