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

10 — Interaction Specification (i18n Module)

Interaction, motion, and feedback rules for the i18n surface. Tokens and timing per 00-shared/08; states legend per 05_Screen_Inventory.md.


1. Catalog delivery (live)

InteractionSpecification
App launchfetch catalog for resolved locale (GET /i18n/messages?locale=, i18n.controller.ts:13-17) in parallel with session bootstrap; render with cached catalog first (offline-first), swap when fresh map arrives
Locale change(forward-looking) refetch + rebuild widget tree; keep scroll positions
Retry3 attempts, exponential backoff 1 s / 2 s / 4 s; offline banner (00-shared/03)
Cache versioning (planned)catalog hash header on response; app refetches when hash differs; delta push (forward-looking)

2. Key List (/admin/i18n/keys) (planned)

Gesture/inputBehavior
Tap rowopen Key Editor (450 ms m-base slide)
Long-pressmulti-select mode; AppBar shows "3 selected" + bulk bar (delete / export)
/focus search; Esc clears filters
Filter chipimmediate list filter with m-base fade (200 ms); badge counts animate
Pull-to-refreshre-pull from GET /api/v1/i18n/keys; silent on error
Infinite scroll"load more" at 25-row pages; skeleton 6 rows while fetching

Feedback: save/delete → AppSnackbar (module-scoped); errors → inline banner, never blocking.

3. Key Editor (planned)

InteractionBehavior
Field focuslocale rail scrolls field into view (desktop); phone switches tab
Typinglive placeholder parity check (debounced 300 ms); amber line appears without focus loss
SaveCtrl/Cmd+S anywhere; button spinner; success = field check morph m-fast (120 ms)
Dirty navigationunsaved-changes dialog before leaving (discard/cancel)
Conflict409 → dialog "Reload or overwrite" (06 §2)
Deletedestructive confirm; undo snackbar 5 s (planned)
Multiline growthfield auto-grows to 6 rows max, then scrolls internally

4. Locale Management (planned)

InteractionBehavior
Add localebottom sheet (phone) / dialog (desktop); on success → card appears with coverage ring animation m-base ease-out
Coverage ring tapdrill into Key List filtered missing:<locale>
Promoteenabled only at 100 % coverage + zero param drift; confirm dialog explaining runtime switch-over (new catalog becomes active for that locale)
Demoteconfirm; blocked if it holds the only copy of any key

5. Sync view (planned)

InteractionBehavior
Run nowspinner on button; results stream in rows as CI completes; stale state after 24 h
Row expandDriftTableRow expands missing-key list; "Fix" jumps to editor with filter preset
ExportCSV download; success snackbar; failure toast

6. Motion tokens (from 00-shared/08)

TokenUse
m-fast (120 ms)field check, chip status change, badge update
m-base (200 ms)list filter fade, pane slide, coverage ring
ease-outall entrances; no bounce effects on admin surfaces

7. Haptic/tactile

  • Phone: light haptic on save success; warning haptic on param-mismatch line (only on explicit save, not during typing).
  • Desktop: none.

8. Error feedback matrix

ErrorFeedback
401 catalog fetchsilent retry ×1, then offline state; no nagging UI
403 consolepermission screen + "ask admin" copy (perm i18n.* (planned))
409 duplicate keyinline field error + "Open existing" link
429 rate limitcountdown chip on Save (00-shared/10)
Network lost mid-savebanner "Saved locally, retrying"; draft preserved