diff --git a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/GenerateBirth.java b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/GenerateBirth.java index af55971ced9..79caf934818 100644 --- a/tools/cldr-code/src/main/java/org/unicode/cldr/tool/GenerateBirth.java +++ b/tools/cldr-code/src/main/java/org/unicode/cldr/tool/GenerateBirth.java @@ -137,10 +137,11 @@ public static void main(String[] args) throws IOException { String logDirectory = myOptions.get("log").getValue(); - System.out.println("en"); + System.out.println("en\tBegin"); Births english = new Births("en"); english.writeBirth(logDirectory, "en", null); - english.writeBirthValues(dataDirectory + "/" + OutdatedPaths.OUTDATED_ENGLISH_DATA); + String englishDataFile = dataDirectory + "/" + OutdatedPaths.OUTDATED_ENGLISH_DATA; + english.writeBirthValues(englishDataFile); Map> pathToPrevious = new HashMap<>(); @@ -194,8 +195,9 @@ public static void main(String[] args) throws IOException { if (!ltp.set(fileName).getRegion().isEmpty()) { continue; // skip region locales } - // TODO skip default content locales - System.out.println(fileName); + // TODO skip default content + System.out.println(); + System.out.println(fileName + "\t" + "Begin"); Births other = new Births(fileName); Set newer = other.writeBirth(logDirectory, fileName, english); @@ -254,11 +256,15 @@ public static void main(String[] args) throws IOException { } } } + // give a reminder since the above will be lost + System.out.println("Wrote: " + englishDataFile); if (errorCount != 0) { - throw new IllegalArgumentException("Done, but " + errorCount + " errors"); + throw new IllegalArgumentException( + "Done, but " + errorCount + " errors writing to " + outputDataFile); } else { - System.out.println("Done, no errors"); + System.out.println("Done, no errors writing to: " + outputDataFile); } + System.out.println("Please commit the above two files and start a PR."); } static class Births { @@ -277,20 +283,21 @@ static class Births { DisplayAndInputProcessor[] processors = new DisplayAndInputProcessor[factories.length]; for (int i = 0; i < factories.length; ++i) { + final CldrVersion ver = CldrVersion.CLDR_VERSIONS_DESCENDING.get(i); try { files[i] = factories[i].make(file, USE_RESOLVED); processors[i] = new DisplayAndInputProcessor(files[i], false); - } catch (Exception e) { - // stop when we fail to find + } catch (SimpleFactory.NoSourceDirectoryException nsd) { + // stop when we fail to find a dir System.out.println( - "Stopped at " - + file - + ", " - + CldrVersion.CLDR_VERSIONS_DESCENDING.get(i)); - // e.printStackTrace(); + String.format("%s\tEnd of source directories at v%s", file, ver)); break; + } catch (Throwable t) { + throw new RuntimeException( + "Exception while processing " + file + " v" + ver, t); } } + System.out.println(String.format("%s\tDone", file)); birthToPaths = Relation.of(new TreeMap>(), TreeSet.class); pathToBirthCurrentPrevious = new HashMap<>(); for (String xpath : files[0]) { diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/births/outdated.data b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/births/outdated.data index 4d13d1170c5..f14740d4cdd 100644 Binary files a/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/births/outdated.data and b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/births/outdated.data differ diff --git a/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/births/outdatedEnglish.data b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/births/outdatedEnglish.data index 8a8f5f50b61..6ec536e152a 100644 Binary files a/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/births/outdatedEnglish.data and b/tools/cldr-code/src/main/resources/org/unicode/cldr/util/data/births/outdatedEnglish.data differ