You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Localize the entire app (English + Korean) behind a language feature flag
Migrate every user-facing string across desktop and mobile to Flutter
gen-l10n (lib/l10n/app_en.arb + app_ko.arb, ~1,160 keys) and ship a full
Korean translation. English ARB values are byte-identical to the previous
hardcoded literals, so English builds render exactly as before.
Language selection:
- Settings gains a Language option — System (Auto) / English / 한국어 —
on desktop (modal) and mobile (sheet).
- With no stored preference the app follows the OS locale, clamped to
supportedLocales with an English fallback; a saved choice always wins.
- localeProvider gains clearToSystem(); a context-free
appLocalizationsProvider serves providers and services.
Feature flag (kill switch):
- VIZOR_LANGUAGE_ENABLED (compile-time dart-define, default true).
Building with --dart-define=VIZOR_LANGUAGE_ENABLED=false pins the app
to English, ignores stored/OS locale, and hides the Language rows —
restoring the pre-i18n behavior verbatim without a revert. The const
flag is tree-shaken from release builds.
Localization mechanics:
- Screens use AppLocalizations.of(context); context-free helpers and
friendly-error mappers take an AppLocalizations parameter; Riverpod
providers read appLocalizationsProvider (test-safe fallback).
- Dates use intl DateFormat guarded by intlSafeLocale(), with
locale-aware day/month ordering; hardcoded month tables removed.
- Label-text sniffing replaced by typed kinds: SwapStatusDetailRowKind
on swap status rows and AddressFormatIssueKind on address findings, so
filtering/ordering/tooltips no longer parse English labels.
- Rust-thrown error strings remain English as mapper inputs; only mapper
output is localized. Persisted data (account names, swap records)
stays English.
Tooling and tests:
- Widgetbook gains a LocalizationAddon with a locale switcher.
- ~95 test harnesses receive AppLocalizations delegates (MaterialApp,
MaterialApp.router, and bare AppTheme wrappers).
- CFBundleLocalizations (en, ko) added to iOS and macOS Info.plists.
- Fixed-height cards on the unlock/set-password/intro screens gain 8px
headroom so taller Korean type fits.
Verification: flutter analyze clean; desktop lane 1422 passed / 1 failed
(receive_use_cases_test, pre-existing on main); mobile lane 325 passed /
2 failed (mobile_routes_test, mobile_receive_use_cases_test, both
pre-existing on main). Manually verified on macOS: language switching,
follow-OS resolution, onboarding/create/import flows, Keystone connect,
send end-to-end, activity and swap surfaces in Korean.
0 commit comments