Skip to content

Commit 75960f3

Browse files
authored
Cleanup in localizations code (flutter#20018)
The following changes are made by this PR: * Translation bundles now implement MaterialLocalizations directly, and are public so that they can be directly extended. * The list of supported languages is now a generated constant. * The icuShortTimePattern/TimeOfDayFormat values are now pre-parsed. * Various other changes for consistency with the style guide and the rest of the codebase, e.g. the class names don't use `_`, the `path` library is imported as such, more dartdocs, fewer `// ignore`s, validation using exceptions. This reduces our technical debt benchmark.
1 parent a96fb44 commit 75960f3

File tree

14 files changed

+10277
-3446
lines changed

14 files changed

+10277
-3446
lines changed

dev/tools/gen_date_localizations.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
/// package for the subset of locales supported by the flutter_localizations
77
/// package.
88
///
9-
/// The extracted data is written into packages/flutter_localizations/lib/src/l10n/date_localizations.dart.
9+
/// The extracted data is written into:
10+
/// packages/flutter_localizations/lib/src/l10n/date_localizations.dart
1011
///
1112
/// ## Usage
1213
///
@@ -89,7 +90,7 @@ Future<Null> main(List<String> rawArgs) async {
8990
});
9091
buffer.writeln('};');
9192

92-
// Note: code that uses datePatterns expects it to contain values of type
93+
// Code that uses datePatterns expects it to contain values of type
9394
// Map<String, String> not Map<String, dynamic>.
9495
buffer.writeln('const Map<String, Map<String, String>> datePatterns = const <String, Map<String, String>> {');
9596
patternFiles.forEach((String locale, File data) {

0 commit comments

Comments
 (0)