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

09 — User Behaviour (i18n Module)

Observed behaviors, pain points, and design responses for translation consumers and (planned) managers. Personas in 02; journeys in 03.


1. Consumer behaviours

BehaviourEvidenceDesign response
Locale comes from the device, not the applocale resolved from Accept-Language only (i18n.middleware.ts:13-18); no in-app switcherKeep header-first resolution; in-app switcher (forward-looking); ?locale= query override exists (i18n.controller.ts:15)
Users ignore English fallbackmissing hi key renders English silently (i18n.service.ts:40)Acceptable at runtime; CI drift check (planned) prevents silent drift shipping (IMPLEMENTATION_PLAN.md:845)
Users notice literal {days} when a param is missingruntime keeps {name} literal (i18n.service.ts:43)Param parity validation in editor (08 §2) + tests
Region tags confuse resolutionhi-IN handled by split('-')[0] (i18n.middleware.ts:16)Keep region-stripping; document that en-GBen
App caches catalog aggressivelyfull map per fetch (getMessages, i18n.service.ts:47-49)Cache-key = locale; version header (planned) for deltas (forward-looking)

2. Manager behaviours (planned console)

BehaviourPain todayConsole response
Hand-edits JSON and deploysen.json/hi.json manual edits; typo = runtime bugKey Editor with live placeholder check (06 §2)
Doesn't know which locales are behindno coverage signal anywhereCoverageRing + missing badges (05 §1, 07 §2)
Adds a key to en only, ships itsilent English fallback for other localesSave-time warning + CI gate (planned)
Reorders params while translatingruntime shows literal {days} (i18n.service.ts:43)param parity error blocks save (08 §2)
Wants per-tenant copynon-goal today (global catalogs, 01 §6)Documented; tenant-catalog variant (forward-looking)

3. Failure-moment matrix

MomentUser seesCorrectnessFix
Unknown keykey literal (e.g. errors.internal2)degraded but honestadd key; editor search helps
Unknown localeEnglishcorrect fallback
Missing paramLeave requested for {days} day(s).broken copy visibleparity check blocks
Empty value in hiempty stringworst case — empty UIblock save; never-empty guarantee i18n.service.ts:40
401 on catalog fetchoffline UIcorrectretry with backoff; cache last good catalog

4. Behavioural rules

  1. Never render a blank string. If catalog lookup fails, fall back to en, then to key — never '' (matches i18n.service.ts:40).
  2. English is the source of truth for keys and params; every other locale is derived.
  3. Console edits are global (no tenant dimension) until per-tenant catalogs are introduced (forward-looking).
  4. No auto-correct on translation fields (Indic scripts, 07 §8).
  5. Locale ≠ language of content. Tenant-authored announcements (announcement.service.ts:47) are content, not UI strings — they are never translated by this module; only system copy (notifications.handler.ts:16-31 keys (planned)) is.