feat(06-05): the 8-glyph committed maneuver set + glyphs.ts + the 18 guidance strings keys
- 8 hand-authored 32x32 SVGs per the UI-SPEC geometry table (3px stroke, square caps, orthogonal/45° only; uturn = machined staple, no arc) - glyphs.ts: GLYPH_KINDS/GLYPHS via Vite ?raw (committed files are the single source) + svgHost — the ONE sanctioned innerHTML site, a static import value - strings.ts: 18 ShellStrings keys appended in en + ms, values verbatim from the 06-UI-SPEC copywriting contract - copy-gate: COPY1 floor 40→58 + COPY8 pins all 18 guidance keys verbatim in both locales
This commit is contained in:
@@ -24,12 +24,15 @@ test("COPY1 en and ms carry identical key-sets (parity gate, both locales)", ()
|
||||
const enKeys = Object.keys(strings.en).sort();
|
||||
const msKeys = Object.keys(strings.ms).sort();
|
||||
assert.deepEqual(msKeys, enKeys, "ms missing/duplicated keys vs en (D-05 locale parity)");
|
||||
assert.ok(enKeys.length >= 40, `expected the full ShellStrings surface (40 keys incl. the 10 route keys), found ${enKeys.length}`);
|
||||
assert.ok(enKeys.length >= 58, `expected the full ShellStrings surface (58 keys incl. the 10 route + 18 guidance keys), found ${enKeys.length}`);
|
||||
assert.ok(enKeys.includes("deniedRegister"), "deniedRegister is a keys — cards.ts renders GEO //");
|
||||
assert.ok(enKeys.includes("lostRegister"), "lostRegister is a key — cards.ts renders SYS //");
|
||||
assert.ok(enKeys.includes("routeRegister"), "routeRegister is a key — route-card.ts renders ROUTE");
|
||||
assert.ok(enKeys.includes("routePendingRegister"), "routePendingRegister is a key — the pending card renders ROUTE // ROUTER");
|
||||
assert.ok(enKeys.includes("ctaSearchAgain"), "ctaSearchAgain is a key — the D-10 restart affordance");
|
||||
assert.ok(enKeys.includes("guideRegister"), "guideRegister is a key — the banner/card renders GUIDE");
|
||||
assert.ok(enKeys.includes("ctaEndTrip"), "ctaEndTrip is a key — the guidance card's only action");
|
||||
assert.ok(enKeys.includes("guideConfirmHeadline"), "guideConfirmHeadline is a key — the D-09 confirm guard");
|
||||
});
|
||||
|
||||
/* ————— COPY2 — denied copy names location ————— */
|
||||
@@ -131,3 +134,68 @@ test("COPY7 route copy verbatim (the 10 route keys, en + ms)", () => {
|
||||
"instrument vocabulary — identical in both locales",
|
||||
);
|
||||
});
|
||||
|
||||
/* ————— COPY8 — guidance copy verbatim (the 18 guidance keys, en + ms) ————— */
|
||||
|
||||
test("COPY8 guidance copy verbatim (the 18 guidance keys, en + ms, 06-UI-SPEC table)", () => {
|
||||
// register + street fallback
|
||||
assert.equal(strings.en.guideRegister, "GUIDE");
|
||||
assert.equal(strings.ms.guideRegister, "GUIDE", "instrument vocabulary — identical in both locales");
|
||||
assert.equal(strings.en.guideStreetUnnamed, "Unnamed road");
|
||||
assert.equal(strings.ms.guideStreetUnnamed, "Jalan tanpa nama");
|
||||
// the calm banner states (D-04/D-06/D-03)
|
||||
assert.equal(strings.en.guideReroutingLine, "Finding a new route from where you are.");
|
||||
assert.equal(strings.ms.guideReroutingLine, "Mencari laluan baharu dari kedudukan anda.");
|
||||
assert.equal(strings.en.guideResumingLine, "Resuming from your last known progress.");
|
||||
assert.equal(strings.ms.guideResumingLine, "Sambung semula dari kemajuan terakhir anda.");
|
||||
assert.equal(strings.en.guideNoRerouteLine, "Rerouting unavailable on this server.");
|
||||
assert.equal(strings.ms.guideNoRerouteLine, "Pengiraan semula tiada pada pelayan ini.");
|
||||
assert.equal(
|
||||
strings.en.guideNoRerouteBody,
|
||||
"No road graph here — follow the drawn route; recalculation is unavailable.",
|
||||
);
|
||||
assert.equal(
|
||||
strings.ms.guideNoRerouteBody,
|
||||
"Tiada graf jalan di sini — ikut laluan yang dilukis; pengiraan semula tidak tersedia.",
|
||||
);
|
||||
// banner toggle + the guidance card's single action
|
||||
assert.equal(strings.en.ctaBannerList, "LIST");
|
||||
assert.equal(strings.ms.ctaBannerList, "SENARAI");
|
||||
assert.equal(strings.en.ctaBannerClose, "CLOSE");
|
||||
assert.equal(strings.ms.ctaBannerClose, "TUTUP");
|
||||
assert.equal(strings.en.ctaEndTrip, "END TRIP");
|
||||
assert.equal(strings.ms.ctaEndTrip, "TAMAT PERJALANAN");
|
||||
// the D-09 confirm guard — the exact privacy copy at the moment it executes
|
||||
assert.equal(strings.en.guideConfirmHeadline, "Abandon route?");
|
||||
assert.equal(strings.ms.guideConfirmHeadline, "Tinggalkan laluan?");
|
||||
assert.equal(
|
||||
strings.en.guideConfirmBody,
|
||||
"Guidance stops and this trip's record is deleted. Nothing is stored.",
|
||||
);
|
||||
assert.equal(
|
||||
strings.ms.guideConfirmBody,
|
||||
"Panduan berhenti dan rekod perjalanan ini dipadam. Tiada apa-apa disimpan.",
|
||||
);
|
||||
assert.equal(strings.en.ctaConfirmAbandon, "YES, ABANDON");
|
||||
assert.equal(strings.ms.ctaConfirmAbandon, "YA, TINGGALKAN");
|
||||
assert.equal(strings.en.ctaConfirmContinue, "CONTINUE");
|
||||
assert.equal(strings.ms.ctaConfirmContinue, "TERUSKAN");
|
||||
// the D-14 trip-end card — ONE card for arrival and abandon
|
||||
assert.equal(strings.en.guideEndHeadline, "Trip ended");
|
||||
assert.equal(strings.ms.guideEndHeadline, "Perjalanan tamat");
|
||||
assert.equal(
|
||||
strings.en.guideEndBody,
|
||||
"Route guidance stopped and the trip record is deleted — nothing about this drive remains.",
|
||||
);
|
||||
assert.equal(
|
||||
strings.ms.guideEndBody,
|
||||
"Panduan laluan dihentikan dan rekod perjalanan dipadam — tiada apa-apa tentang pemanduan ini kekal.",
|
||||
);
|
||||
// aria labels
|
||||
assert.equal(strings.en.ariaManeuverList, "Full maneuver list");
|
||||
assert.equal(strings.ms.ariaManeuverList, "Senarai penuh manuver");
|
||||
assert.equal(strings.en.ariaBannerToggle, "Next maneuver");
|
||||
assert.equal(strings.ms.ariaBannerToggle, "Manuver seterusnya");
|
||||
assert.equal(strings.en.ariaTripProgress, "Trip progress");
|
||||
assert.equal(strings.ms.ariaTripProgress, "Kemajuan perjalanan");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user