docs: record i18n batch 3 (routing/Sasquatch/labels/dates) + remaining batch 4
This commit is contained in:
parent
e357833557
commit
d26b3b9516
1 changed files with 39 additions and 9 deletions
48
AGENTS.md
48
AGENTS.md
|
|
@ -1756,20 +1756,50 @@ similar are internal endpoints/hook names, not credits — leave them.)
|
||||||
chain) fails the build if any literal `t('…')` key is missing from `en` OR `es`,
|
chain) fails the build if any literal `t('…')` key is missing from `en` OR `es`,
|
||||||
or if `en`/`es` drift. Dynamic template keys (`t(\`ns.${x}\`)`) are NOT checked —
|
or if `en`/`es` drift. Dynamic template keys (`t(\`ns.${x}\`)`) are NOT checked —
|
||||||
keep those few in sync by hand.
|
keep those few in sync by hand.
|
||||||
- **Coverage (2026-10-02, batches 1–2 done):** **~5,770 keys** (EN=ES) and ~180
|
- **Coverage (2026-10-02, batches 1–3 done):** **~6,460 keys** (EN=ES) and ~230
|
||||||
files wired. Namespaces: batch 1 — `mapUi`, `spotUi`, `marketUi`, `labUi`;
|
files wired. Namespaces: batch 1 — `mapUi`, `spotUi`, `marketUi`, `labUi`;
|
||||||
batch 2 — `nav` (header/More/burger labels) + `chromeUi` (footer, toolbar
|
batch 2 — `nav` (header/More/burger labels) + `chromeUi` (footer, toolbar
|
||||||
widgets, spot-type labels), `placesUi` (events/shops/tours/food), `socialUi`
|
widgets, spot-type labels), `placesUi` (events/shops/tours/food), `socialUi`
|
||||||
(crews/DMs/notifications/collectives), `settingsUi` (settings/auth/signup/
|
(crews/DMs/notifications/collectives), `settingsUi` (settings/auth/signup/
|
||||||
onboarding/profile/legal), `walletUi` (wallet/Cashu, stash, mints, app shop,
|
onboarding/profile/legal), `walletUi` (wallet/Cashu, stash, mints, app shop,
|
||||||
newsletter, community stats, leaderboards, profile page).
|
newsletter, community stats, leaderboards, profile page); **batch 3** — see
|
||||||
- **Still to translate (batch 3):** `RouteDialog`/`StopDepartures`/`TripItineraryCard`
|
below.
|
||||||
(routing UI), the Sasquatch panel/dialogs (`SasquatchGuide`, `SasquatchProDialog`,
|
- **Batch 3 (2026-10-02) — done.** Its namespaces live in **fragment files under
|
||||||
`SasquatchActionCard`, `SasquatchAiStatusCard`), `AddToCollectionDialog` edge
|
`src/i18n/batch3/`**, spread into `en`/`es` via `batch3/index.ts`
|
||||||
copy, `SplashScreen`/`LazyMount`, and **shared data-module labels** that live
|
(`export default { ...en, ...batch3En }`), so **parallel translation passes
|
||||||
outside components (`SPOT_TYPE_LABELS`/`SPOT_CATEGORIES` in `src/lib/types.ts`,
|
never edit the big `en.ts`/`es.ts` literals** — add keys to the fragment, not
|
||||||
`src/lib/skateTags.ts`, `src/lib/spotStatus.ts`, `src/lib/sortOptions.ts`).
|
the literal.
|
||||||
**Dates & relative times** are still English (no localized date layer yet).
|
- `routeUi.*` — `RouteDialog` (follow mode, transit time picker + mode filters,
|
||||||
|
itinerary legs), `StopDepartures`, `TripItineraryCard`, and the **routing
|
||||||
|
helpers** (`skateTime`, `distanceReadout`, `maneuverDescriptor` →
|
||||||
|
`MODE_LABEL_KEYS`/`MANEUVER_LABEL_KEYS` static maps, `routeCache.formatAge`).
|
||||||
|
- `sasquatchUi.*` — `SasquatchGuide`, `SasquatchProDialog`, `SasquatchActionCard`,
|
||||||
|
`SasquatchAiStatusCard`, plus `sasquatchPro.ts` `PRO_TIERS.labelKey/badgeKey`
|
||||||
|
and `useSasquatchActions.summarizeDraft(d, t)`. **LLM system prompts and chat
|
||||||
|
bodies stay English** (the model is language-directed separately).
|
||||||
|
- `collectionUi.*` / `bootUi.*` — `AddToCollectionDialog` placeholders,
|
||||||
|
`SplashScreen` status lines.
|
||||||
|
- `labelsUi.*` (221 keys) — the **shared data-module labels**: spot categories/
|
||||||
|
features/types, access, shelter, event types, gear categories/conditions,
|
||||||
|
price/listings, tours, crews, member-visibility, tag categories, spot status.
|
||||||
|
`src/lib/labelKeys.ts` holds the shared `*_KEYS` value→key maps (single
|
||||||
|
source; the five duplicated `EVENT_TYPE_KEYS` copies now import it).
|
||||||
|
`statusTimeAgo()` and `formatPrice(price, type, t?)` are locale-aware now.
|
||||||
|
- **Dates & relative times are localized (2026-10-02):**
|
||||||
|
**`src/lib/dateFnsI18n.ts`** re-exports `date-fns` with
|
||||||
|
`formatDistanceToNow`/`…Strict`/`formatDistance`/`format` defaulting to the
|
||||||
|
active locale, plus `dateLocaleCode()` for native `toLocale{Date,Time}String`.
|
||||||
|
`LanguageProvider` calls `setDateLocale(language)` **during render** so the
|
||||||
|
first paint is in-language. **Import from `@/lib/dateFnsI18n`, not
|
||||||
|
`date-fns`.** Number `.toLocaleString()` calls are deliberately left on the
|
||||||
|
runtime default.
|
||||||
|
- **Still to translate (batch 4):** the **Lab `*_LABELS`/`*_DESCRIPTIONS` maps**
|
||||||
|
in `src/lib/types.ts` (coach/filmer/editor/photo/builder/artist/graffiti/tattoo/
|
||||||
|
trainer/musician/judge/organizer/barber — ~35 maps), `TOUR_SKILL_LEVELS`, the
|
||||||
|
Sasquatch **static FAQ / local-result chat bodies** and `usePurchasePro` receipt
|
||||||
|
prose, and remaining **feed-supplied vs app-word** distinctions. `TagCategory`
|
||||||
|
names/descriptions have keys but no component renders them. Grep a module
|
||||||
|
before assuming it is translated.
|
||||||
- ⚠️ A batch-2 agent dropped the `socialUi.` namespace prefix in ~36 files — the
|
- ⚠️ A batch-2 agent dropped the `socialUi.` namespace prefix in ~36 files — the
|
||||||
`check:i18n` guard caught all 738 usages. **Always run `node scripts/check-i18n.mjs`
|
`check:i18n` guard caught all 738 usages. **Always run `node scripts/check-i18n.mjs`
|
||||||
(it's in `npm test`) after wiring a file.**
|
(it's in `npm test`) after wiring a file.**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue