feat(i18n): add English + Chinese localization
All checks were successful
CI / Windows build (push) Successful in 12m34s

The app had zero localization ("软件多语言做了吗" — no). Add Flutter's
official gen-l10n pipeline and localize the core flow the user sees.

- pubspec: flutter_localizations + intl + generate: true
- l10n.yaml + lib/l10n/app_en.arb + app_zh.arb (37 strings)
- main.dart: localizationsDelegates + supportedLocales (follows OS locale)
- pen editor: all tool tooltips, page pill, error states localized
- home: app bar actions + empty-state buttons localized

Proven end-to-end: l10n_test pumps the same widget under Locale('en')
and Locale('zh') and asserts English vs Chinese strings resolve.

flutter analyze: 0 issues. l10n_test: 3/3 pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-23 09:35:26 +08:00
parent f48e43f13d
commit 1d70c029b3
12 changed files with 768 additions and 26 deletions

View File

@@ -13,6 +13,9 @@ environment:
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: any
cupertino_icons: ^1.0.8
# Pen & Ink Rendering
@@ -80,6 +83,8 @@ dev_dependencies:
flutter:
uses-material-design: true
# Generate AppLocalizations from lib/l10n/*.arb (see l10n.yaml).
generate: true
assets:
- assets/models/ocr/