Move localization executables to bin folder (#46251)

This commit is contained in:
Shi-Hao Hong 2019-12-16 17:30:57 -08:00 committed by GitHub
parent 7f56a61417
commit 7874bca248
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 26 additions and 24 deletions

View File

@ -519,7 +519,7 @@ Future<void> verifyInternationalizations() async {
final EvalResult materialGenResult = await _evalCommand(
dart,
<String>[
path.join('dev', 'tools', 'localization', 'gen_localizations.dart'),
path.join('dev', 'tools', 'localization', 'bin', 'gen_localizations.dart'),
'--material',
],
workingDirectory: flutterRoot,
@ -527,7 +527,7 @@ Future<void> verifyInternationalizations() async {
final EvalResult cupertinoGenResult = await _evalCommand(
dart,
<String>[
path.join('dev', 'tools', 'localization', 'gen_localizations.dart'),
path.join('dev', 'tools', 'localization', 'bin', 'gen_localizations.dart'),
'--cupertino',
],
workingDirectory: flutterRoot,

View File

@ -18,7 +18,7 @@
// Run this program from the root of the git repository.
//
// ```
// dart dev/tools/localization/encode_kn_arb_files.dart
// dart dev/tools/localization/bin/encode_kn_arb_files.dart
// ```
import 'dart:async';
@ -27,7 +27,7 @@ import 'dart:io';
import 'package:path/path.dart' as path;
import 'localizations_utils.dart';
import '../localizations_utils.dart';
Map<String, dynamic> loadBundle(File file) {
if (!FileSystemEntity.isFileSync(file.path))

View File

@ -16,14 +16,14 @@
/// The following outputs the generated Dart code to the console as a dry run:
///
/// ```
/// dart dev/tools/localization/gen_date_localizations.dart
/// dart dev/tools/localization/bin/gen_date_localizations.dart
/// ```
///
/// If the data looks good, use the `--overwrite` option to overwrite the
/// lib/src/l10n/date_localizations.dart file:
///
/// ```
/// dart dev/tools/localization/gen_date_localizations.dart --overwrite
/// dart dev/tools/localization/bin/gen_date_localizations.dart --overwrite
/// ```
import 'dart:async';
@ -32,7 +32,7 @@ import 'dart:io';
import 'package:path/path.dart' as path;
import 'localizations_utils.dart';
import '../localizations_utils.dart';
const String _kCommandName = 'gen_date_localizations.dart';
@ -84,7 +84,7 @@ Future<void> main(List<String> rawArgs) async {
// This file has been automatically generated. Please do not edit it manually.
// To regenerate run (omit --overwrite to print to console instead of the file):
// dart --enable-asserts dev/tools/localization/gen_date_localizations.dart --overwrite
// dart --enable-asserts dev/tools/localization/bin/gen_date_localizations.dart --overwrite
'''
);

View File

@ -29,7 +29,7 @@
// The following outputs the generated Dart code to the console as a dry run:
//
// ```
// dart dev/tools/localization/gen_localizations.dart
// dart dev/tools/localization/bin/gen_localizations.dart
// ```
//
// If the data looks good, use the `-w` or `--overwrite` option to overwrite the
@ -37,7 +37,7 @@
// and packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart file:
//
// ```
// dart dev/tools/localization/gen_localizations.dart --overwrite
// dart dev/tools/localization/bin/gen_localizations.dart --overwrite
// ```
import 'dart:async';
@ -46,10 +46,10 @@ import 'dart:io';
import 'package:path/path.dart' as path;
import 'package:meta/meta.dart';
import 'gen_cupertino_localizations.dart';
import 'gen_material_localizations.dart';
import 'localizations_utils.dart';
import 'localizations_validator.dart';
import '../gen_cupertino_localizations.dart';
import '../gen_material_localizations.dart';
import '../localizations_utils.dart';
import '../localizations_validator.dart';
/// This is the core of this script; it generates the code used for translations.
String generateArbBasedLocalizationSubclasses({
@ -78,7 +78,7 @@ String generateArbBasedLocalizationSubclasses({
assert(supportedLanguagesDocMacro.isNotEmpty);
final StringBuffer output = StringBuffer();
output.writeln(generateHeader('dart dev/tools/localization/gen_localizations.dart --overwrite'));
output.writeln(generateHeader('dart dev/tools/localization/bin/gen_localizations.dart --overwrite'));
final StringBuffer supportedLocales = StringBuffer();

View File

@ -31,8 +31,9 @@ import 'typography.dart';
// you must add it to every other language (all the other *.arb files in that
// same directory), listing the translation as `TBD`. After that you have to
// re-generate lib/src/l10n/localizations.dart by running
// `dart dev/tools/localization/gen_localizations.dart --overwrite`. There is
// a README file with further information in the lib/src/l10n/ directory.
// `dart dev/tools/localization/bin/gen_localizations.dart --overwrite`.
// There is a README file with further information in the lib/src/l10n/
// directory.
//
// 5. If you are a Google employee, you should then also follow the instructions
// at go/flutter-l10n. If you're not, don't worry about it.

View File

@ -165,7 +165,7 @@ app called `gen_localizations`.
You can see what that script would generate by running this command:
```dart
dart dev/tools/localizations/gen_localizations.dart packages/flutter_localizations/lib/src/l10n material
dart dev/tools/localizations/bin/gen_localizations.dart packages/flutter_localizations/lib/src/l10n material
```
The gen_localizations app just combines the contents of all of the
@ -182,7 +182,7 @@ To in-place update the generated localizations file using the default
values, you can just run:
```dart
dart dev/tools/localizations/gen_localizations.dart --overwrite
dart dev/tools/localizations/bin/gen_localizations.dart --overwrite
```
@ -195,8 +195,9 @@ more information here: https://github.com/flutter/flutter/issues/36704.
Rather than risking developers' editor sessions, the strings in these arb files
(and the code generated for them) have been encoded using the appropriate
escapes for JSON and Dart. The JSON format arb files were rewritten with
dev/tools/localization/encode_kn_arb_files.dart. The localizations code
generator uses generateEncodedString() from dev/tools/localization/localizations_utils.
dev/tools/localization/bin/encode_kn_arb_files.dart. The localizations code
generator uses generateEncodedString()
from dev/tools/localization/localizations_utils.dart.
### Translations Status, Reporting Errors

View File

@ -4,7 +4,7 @@
// This file has been automatically generated. Please do not edit it manually.
// To regenerate the file, use:
// dart dev/tools/localization/gen_localizations.dart --overwrite
// dart dev/tools/localization/bin/gen_localizations.dart --overwrite
import 'dart:collection';

View File

@ -4,7 +4,7 @@
// This file has been automatically generated. Please do not edit it manually.
// To regenerate run (omit --overwrite to print to console instead of the file):
// dart --enable-asserts dev/tools/localization/gen_date_localizations.dart --overwrite
// dart --enable-asserts dev/tools/localization/bin/gen_date_localizations.dart --overwrite
/// The subset of date symbols supported by the intl package which are also
/// supported by flutter_localizations.

View File

@ -4,7 +4,7 @@
// This file has been automatically generated. Please do not edit it manually.
// To regenerate the file, use:
// dart dev/tools/localization/gen_localizations.dart --overwrite
// dart dev/tools/localization/bin/gen_localizations.dart --overwrite
import 'dart:collection';