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

07 — Component Library (i18n Module)

Components specific to the i18n surface; shared components come from 00-shared/03_Component_Library.md (AppTextField, AppCard, AppListTile, AppChips, AppBadge, AppSnackbar, AppDialog, AppDataTable, AppSkeleton, AppEmptyState, AppOfflineBanner, AppSearchBar, AppFAB). Design tokens per 00-shared/02; module behavior per 06_Screen_Specifications.md.


1. PerLocaleFieldGroup (module-specific)

FieldDetail
PurposeOne locale's value editor inside the Key Editor
Propslocale, label (native name), status (shipped/declared/missing), value, params (expected set), onChanged, saving
ChildrenAppTextField (multiline ≥3 rows, auto-grow, TextCapitalization.none) + status chip + placeholder checker line
Placeholder checkerinline text: "params match source" (success) / "missing {days}" (amber) / "unexpected {x}" (error) — regex \{(\w+)\} (i18n.service.ts:42-44)
Statesidle / dirty (dot) / saving (spinner) / saved (check) / missing (amber outline) / error (red outline + message)
a11ysingle Semantics node "value in {locale}"; status via live region
Directionalitydirectionality: TextDirection.ltr for all current locales (all LTR). RTL locale (forward-looking) → per-field TextDirection.rtl driven by locale tag, never hardcoded

2. CoverageRing

FieldDetail
PurposeLocale coverage in Locale Management + key-list badge
Propspresent, total, size (36 default)
Behaviorprogress arc; amber when < 100 %, green at 100 %; text n/n center
a11ysemantic label "coverage 8 of 9 in hi" — never color-only

3. ParamsChips

FieldDetail
PurposeDisplay/enter {param} tokens
Propsparams (string[]), editable
Behaviorchip text without braces (e.g. days); editing appends {...} tokens; invalid chars blocked (regex \w+)
Used inKey Editor header, New Key form, Key List rows

4. LocaleStatusChip

FieldDetail
Purposeshipped vs declared vs missing state
Variantsshipped (filled), declared (outline), missing (amber), stale (danger outline)
a11ytext label always present

5. DriftTableRow

FieldDetail
PurposeSync view row: locale × missing keys with jump-to-editor
Behaviorexpandable; "Fix" button deep-links Key Editor?filter=missing:<locale>

6. LocaleFieldRail (tablet/desktop)

FieldDetail
PurposeVertical locale tab rail in Key Editor (desktop)
Behaviorper-locale status dot on rail; scroll-lock to active field

7. Reuse map

ScreenShared componentsModule-specific
Key ListAppSearchBar, AppChips, AppBadge, AppDataTable, AppSkeleton, AppEmptyState, AppFABCoverageRing (badge), ParamsChips, LocaleStatusChip
Key EditorAppTextField, AppButton, AppSnackbar, AppDialog, AppMenuPerLocaleFieldGroup, ParamsChips, LocaleFieldRail
New KeyAppTextField, AppButton, AppChips, AppBottomSheetParamsChips
Locale ManagementAppCard, AppButton, AppBottomSheetCoverageRing, LocaleStatusChip
SyncAppDataTable, AppButton, AppCardDriftTableRow

8. Typography/locale notes

  • Devanagari, Tamil, Telugu, Kannada, Malayalam, Gujarati, Marathi, Bengali scripts render with system fonts; avoid forced fontFamily for these (Indic glyph fallback required). Keep fontFamily null for translation text.
  • Text scale: translation fields respect textScaleFactor up to 2.0 (00-shared/09).
  • Placeholders never auto-correct; autocorrect off.