Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: packages/intl/tool/generate_locale_data_files.dart

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « packages/intl/test/plural_test.dart ('k') | packages/logging/.gitignore » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /// A utility program to take locale data represented as a Dart map whose keys
6 * A utility program to take locale data represented as a Dart map whose keys 6 /// are locale names and write it into individual JSON files named by locale.
7 * are locale names and write it into individual JSON files named by locale. 7 /// This should be run any time the locale data changes.
8 * This should be run any time the locale data changes. 8 ///
9 * 9 /// The files are written under "data/dates", in two subdirectories, "symbols"
10 * The files are written under "data/dates", in two subdirectories, "symbols" 10 /// and "patterns". In "data/dates" it will also generate "locale_list.dart",
11 * and "patterns". In "data/dates" it will also generate "locale_list.dart", 11 /// which is sourced by the date_symbol_data... files.
12 * which is sourced by the date_symbol_data... files.
13 */
14 12
15 import '../lib/date_symbol_data_local.dart'; 13 import 'package:intl/date_symbol_data_local.dart';
16 import '../lib/date_time_patterns.dart'; 14 import 'package:intl/date_time_patterns.dart';
17 import '../lib/intl.dart'; 15 import 'package:intl/intl.dart';
18 import 'dart:convert'; 16 import 'dart:convert';
19 import 'dart:io'; 17 import 'dart:io';
20 import '../test/data_directory.dart'; 18 import '../test/data_directory.dart';
21 import 'package:path/path.dart' as path; 19 import 'package:path/path.dart' as path;
22 20
23 main() { 21 main() {
24 initializeDateFormatting("en_IGNORED", null); 22 initializeDateFormatting("en_IGNORED", null);
25 writeSymbolData(); 23 writeSymbolData();
26 writePatternData(); 24 writePatternData();
27 writeLocaleList(); 25 writeLocaleList();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 void writePatterns(locale, patterns) { 67 void writePatterns(locale, patterns) {
70 var file = new File(path.join(dataDirectory, 'patterns', '${locale}.json')); 68 var file = new File(path.join(dataDirectory, 'patterns', '${locale}.json'));
71 file.openWrite() 69 file.openWrite()
72 ..write(JSON.encode(patterns)) 70 ..write(JSON.encode(patterns))
73 ..close(); 71 ..close();
74 } 72 }
75 73
76 void writeToJSON(dynamic data, IOSink out) { 74 void writeToJSON(dynamic data, IOSink out) {
77 out.write(JSON.encode(data.serializeToMap())); 75 out.write(JSON.encode(data.serializeToMap()));
78 } 76 }
OLDNEW
« no previous file with comments | « packages/intl/test/plural_test.dart ('k') | packages/logging/.gitignore » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698