Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

11 — Design System Mapping (i18n Module)

Maps i18n surfaces to the shared design system (00-shared/02 tokens, 00-shared/04 mapping). Everything here is (planned) console + mobile catalog consumption; the live API has no UI.


1. Token usage

Token (00-shared/02)Where
color.surface/primary/error/warningper-locale field states (idle / focus / error / amber mismatch)
color.text.secondaryplaceholder checker line, locale endonyms
radius.sm/mdchips, field cards, coverage ring background
spacing.3/4per-locale field stacking (≥ 12 dp between locale cards)
type.monokeys, params, drift table
type.bodytranslation values; no forced font family — Indic glyph fallback (07 §8)
shadow.elevation-1editor field cards on tablet master-detail

2. Component → token mapping

ComponentTokens / variants
AppTextField (translation value)multiline variant, TextCapitalization.none, autocorrect off, amber outline = mismatch, red = block error
AppChips (params){days} rendered as days chip, outline variant
AppBadgemissing = amber, ok = green, stale = danger outline
AppButtonprimary = Save, danger = Delete, secondary = Export
AppDialogdestructive variant with danger button for delete/demote
AppSnackbarsuccess/error variants; undo action for delete (planned)
AppDataTabledefault density, sticky header, hover row highlight (desktop)

3. State → token mapping

StateToken
missing translationamber outline + amber text label (never color-only, 00-shared/09)
errorcolor.error + icon + text message
successgreen check + snackbar
disableddisabled palette; Save disabled while pending / conflict
permissionlocked icon + secondary copy

4. Directionality

  • All 9 supported locales are LTR (SUPPORTED_LOCALES, i18n.service.ts:11-21).
  • UI is LTR today; TextDirection must be driven by locale tag, never hardcoded, so an RTL locale (forward-looking) lights up without layout rewrites (07 §1).
  • Number formatting: use intl/NumberFormat per locale in the app (15 §3); catalog values must not hardcode digits.

5. Iconography

IconMeaning
translatemodule icon (console nav)
check-circleper-field saved
warning-amberplaceholder mismatch / stale
error-redblocked state
cloud-done / cloud-offsync status
globelocale cards

6. Dark mode / density

  • Console inherits 00-shared/04; coverage ring uses semantic colors only (works in dark).
  • Compact density on desktop (data-heavy console): row height 40 dp in key list.
  • Text scale to 2.0 enforced on translation fields (00-shared/09).