Skip to content

Commit 002fb25

Browse files
amir14aamir14a
andauthored
Update internationalization documents and gen_l10n example. (#12113)
Update internationalization documents and gen_l10n example to align with deprecation of synthetic packages. From flutter 3.32.0 [breaking changes](https://docs.flutter.dev/release/breaking-changes/flutter-generate-i10n-source), localized messages are generated into source, not a synthetic package. This PR should be merged in the future stable release. Issues fixed by this PR (if any): - #11765 Relative links: - https://groups.google.com/g/flutter-announce/c/ZWtR2h6QAZk - https://flutter.dev/to/flutter-gen-deprecation - flutter/flutter#102983 - flutter/flutter#157934 ## Presubmit checklist - [ ] This PR is marked as draft with an explanation if not meant to land until a future stable release. - [x] This PR doesn’t contain automatically generated corrections (Grammarly or similar). - [x] This PR follows the [Google Developer Documentation Style Guidelines](https://developers.google.com/style) — for example, it doesn’t use _i.e._ or _e.g._, and it avoids _I_ and _we_ (first person). - [x] This PR uses [semantic line breaks](https://github.com/dart-lang/site-shared/blob/main/doc/writing-for-dart-and-flutter-websites.md#semantic-line-breaks) of 80 characters or fewer. Co-authored-by: amir14a <[email protected]>
1 parent 68f24d3 commit 002fb25

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/internationalization/gen_l10n_example/lib/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:flutter/material.dart';
22

33
// #docregion app-localizations-import
4-
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
4+
import 'l10n/app_localizations.dart';
55
// #enddocregion app-localizations-import
66

77
// #docregion localization-delegates-import

src/content/ui/accessibility-and-internationalization/internationalization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ complete the following instructions:
266266

267267
6. Now, run `flutter pub get` or `flutter run` and codegen takes place automatically.
268268
You should find generated files in the directory at the path you specified
269-
with the `arb-dir` or `output-dir` options.
269+
with the `output-dir` option (or `arb-dir`, if you don't specify `output-dir`).
270270
Alternatively, you can also run `flutter gen-l10n` to
271271
generate the same files without running the app.
272272

@@ -276,7 +276,7 @@ complete the following instructions:
276276

277277
<?code-excerpt "gen_l10n_example/lib/main.dart (app-localizations-import)"?>
278278
```dart
279-
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
279+
import 'l10n/app_localizations.dart';
280280
```
281281

282282
<?code-excerpt "gen_l10n_example/lib/main.dart (material-app)"?>

0 commit comments

Comments
 (0)