Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
7874bca2
Unverified
Commit
7874bca2
authored
Dec 17, 2019
by
Shi-Hao Hong
Committed by
GitHub
Dec 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move localization executables to bin folder (#46251)
parent
7f56a614
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
24 deletions
+26
-24
analyze.dart
dev/bots/analyze.dart
+2
-2
encode_kn_arb_files.dart
dev/tools/localization/bin/encode_kn_arb_files.dart
+2
-2
gen_date_localizations.dart
dev/tools/localization/bin/gen_date_localizations.dart
+4
-4
gen_localizations.dart
dev/tools/localization/bin/gen_localizations.dart
+7
-7
material_localizations.dart
...ages/flutter/lib/src/material/material_localizations.dart
+3
-2
README.md
packages/flutter_localizations/lib/src/l10n/README.md
+5
-4
generated_cupertino_localizations.dart
...tions/lib/src/l10n/generated_cupertino_localizations.dart
+1
-1
generated_date_localizations.dart
...alizations/lib/src/l10n/generated_date_localizations.dart
+1
-1
generated_material_localizations.dart
...ations/lib/src/l10n/generated_material_localizations.dart
+1
-1
No files found.
dev/bots/analyze.dart
View file @
7874bca2
...
...
@@ -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
,
...
...
dev/tools/localization/encode_kn_arb_files.dart
→
dev/tools/localization/
bin/
encode_kn_arb_files.dart
View file @
7874bca2
...
...
@@ -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
))
...
...
dev/tools/localization/gen_date_localizations.dart
→
dev/tools/localization/
bin/
gen_date_localizations.dart
View file @
7874bca2
...
...
@@ -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
'''
);
...
...
dev/tools/localization/gen_localizations.dart
→
dev/tools/localization/
bin/
gen_localizations.dart
View file @
7874bca2
...
...
@@ -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
();
...
...
packages/flutter/lib/src/material/material_localizations.dart
View file @
7874bca2
...
...
@@ -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.
...
...
packages/flutter_localizations/lib/src/l10n/README.md
View file @
7874bca2
...
...
@@ -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
...
...
packages/flutter_localizations/lib/src/l10n/generated_cupertino_localizations.dart
View file @
7874bca2
...
...
@@ -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'
;
...
...
packages/flutter_localizations/lib/src/l10n/generated_date_localizations.dart
View file @
7874bca2
...
...
@@ -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.
...
...
packages/flutter_localizations/lib/src/l10n/generated_material_localizations.dart
View file @
7874bca2
...
...
@@ -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'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment