Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Flutter gen-l10n–based localization scaffolding (ARB files + generated AppLocalizations) and enables localization code generation in the app.
Changes:
- Added
flutter_localizationsSDK dependency and enabledflutter: generate: true - Added
l10n.yamlplus initialen/zhARB files - Added generated localization Dart sources under
lib/l10n/
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Adds flutter_localizations and enables Flutter code generation. |
| pubspec.lock | Locks the new SDK dependency entry for flutter_localizations. |
| l10n.yaml | Configures gen-l10n to read ARB files and emit app_localizations.dart. |
| lib/l10n/app_en.arb | Adds English template ARB entry for appTitle (with description metadata). |
| lib/l10n/app_zh.arb | Adds Chinese locale ARB entry for appTitle. |
| lib/l10n/app_localizations.dart | Adds the generated AppLocalizations base class, delegate, and supported locales. |
| lib/l10n/app_localizations_en.dart | Adds generated English implementation. |
| lib/l10n/app_localizations_zh.dart | Adds generated Chinese implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds internationalization (i18n) foundation to the app using Flutter's official localization framework.
Changes
l10n.yamlconfiguration for ARB file generationen) and Chinese (zh) localesappTitlestringAppLocalizationsclasses and locale-specific implementationsflutter_localizationsSDK dependency and enabledflutter.generateinpubspec.yamlImplementation Details
The localization system uses:
lib/l10n/app_en.arb- English template with string descriptionslib/l10n/app_zh.arb- Chinese translationsAppLocalizationsdelegate withsupportedLocalesfor en/zhAppLocalizations.of(context)