@@ -137,10 +137,11 @@ public static void main(String[] args) throws IOException {
137
137
138
138
String logDirectory = myOptions .get ("log" ).getValue ();
139
139
140
- System .out .println ("en" );
140
+ System .out .println ("en\t Begin " );
141
141
Births english = new Births ("en" );
142
142
english .writeBirth (logDirectory , "en" , null );
143
- english .writeBirthValues (dataDirectory + "/" + OutdatedPaths .OUTDATED_ENGLISH_DATA );
143
+ String englishDataFile = dataDirectory + "/" + OutdatedPaths .OUTDATED_ENGLISH_DATA ;
144
+ english .writeBirthValues (englishDataFile );
144
145
145
146
Map <Long , Pair <CldrVersion , String >> pathToPrevious = new HashMap <>();
146
147
@@ -194,8 +195,9 @@ public static void main(String[] args) throws IOException {
194
195
if (!ltp .set (fileName ).getRegion ().isEmpty ()) {
195
196
continue ; // skip region locales
196
197
}
197
- // TODO skip default content locales
198
- System .out .println (fileName );
198
+ // TODO skip default content
199
+ System .out .println ();
200
+ System .out .println (fileName + "\t " + "Begin" );
199
201
Births other = new Births (fileName );
200
202
Set <String > newer = other .writeBirth (logDirectory , fileName , english );
201
203
@@ -254,11 +256,15 @@ public static void main(String[] args) throws IOException {
254
256
}
255
257
}
256
258
}
259
+ // give a reminder since the above will be lost
260
+ System .out .println ("Wrote: " + englishDataFile );
257
261
if (errorCount != 0 ) {
258
- throw new IllegalArgumentException ("Done, but " + errorCount + " errors" );
262
+ throw new IllegalArgumentException (
263
+ "Done, but " + errorCount + " errors writing to " + outputDataFile );
259
264
} else {
260
- System .out .println ("Done, no errors" );
265
+ System .out .println ("Done, no errors writing to: " + outputDataFile );
261
266
}
267
+ System .out .println ("Please commit the above two files and start a PR." );
262
268
}
263
269
264
270
static class Births {
@@ -277,20 +283,21 @@ static class Births {
277
283
DisplayAndInputProcessor [] processors = new DisplayAndInputProcessor [factories .length ];
278
284
279
285
for (int i = 0 ; i < factories .length ; ++i ) {
286
+ final CldrVersion ver = CldrVersion .CLDR_VERSIONS_DESCENDING .get (i );
280
287
try {
281
288
files [i ] = factories [i ].make (file , USE_RESOLVED );
282
289
processors [i ] = new DisplayAndInputProcessor (files [i ], false );
283
- } catch (Exception e ) {
284
- // stop when we fail to find
290
+ } catch (SimpleFactory . NoSourceDirectoryException nsd ) {
291
+ // stop when we fail to find a dir
285
292
System .out .println (
286
- "Stopped at "
287
- + file
288
- + ", "
289
- + CldrVersion .CLDR_VERSIONS_DESCENDING .get (i ));
290
- // e.printStackTrace();
293
+ String .format ("%s\t End of source directories at v%s" , file , ver ));
291
294
break ;
295
+ } catch (Throwable t ) {
296
+ throw new RuntimeException (
297
+ "Exception while processing " + file + " v" + ver , t );
292
298
}
293
299
}
300
+ System .out .println (String .format ("%s\t Done" , file ));
294
301
birthToPaths = Relation .of (new TreeMap <CldrVersion , Set <String >>(), TreeSet .class );
295
302
pathToBirthCurrentPrevious = new HashMap <>();
296
303
for (String xpath : files [0 ]) {
0 commit comments