Updating English/Root

Whenever you update English or Root, there is one additional step that needs to be done for the vetting viewer and tests to work properly.

Run GenerateBirth

The tool is in tools/java/org/unicode/cldr/tool/GenerateBirth.java. It requires a set of sources from all previous major CLDR release, trunk, and a generation directory. These three directories must be structured as follows. The tool takes environment parameters for the second two.

cldr (set with -t <target>, default=CldrUtility.BASE_DIRECTORY, set with environment variable -DCLDR_DIR)

... common/ ... tools/ java/ (apps such as GenerateBirth are run from here) ...
CldrUtility.ARCHIVE_DIRECTORY (set with environment variable -DARCHIVE=...) cldr-archive/ cldr-1.1.1/ (content from repos/cldr/tags/release-1-1-1) cldr-1.2.0/ (content from repos/cldr/tags/release-1-2) cldr-1.3.0/ (content from repos/cldr/tags/release-1-3) cldr-1.4.1/ (content from repos/cldr/tags/release-1-4-1) cldr-1.5.1/ (content from repos/cldr/tags/release-1-5-1) cldr-1.6.1/ (content from repos/cldr/tags/release-1-6-1) cldr-1.7.2/ (content from repos/cldr/tags/release-1-7-2) cldr-1.8.1/ (content from repos/cldr/tags/release-1-8-1) cldr-1.9.1/ (content from repos/cldr/tags/release-1-9-1) cldr-2.0.1/ (content from repos/cldr/tags/release-2-0-1) cldr-21.0/ (content from repos/cldr/tags/release-21)
log (set with -l <log>, default=CldrUtility.UTIL_DATA_DIR, set with CLDR_DIR 

Pass an argument for -t to specify the output directory. Takes a few minutes to run (and make sure you have set Java with enough memory)!

The tool generates (among other things) the following two binary files (among others) in the output directory specified with -t: outdata.data and outdatedEnglish.data. Check these into …/cldr/tools/java/org/unicode/cldr/util/data/births/, replacing the previous versions. These files are used to support OutdatedPaths.java.

File Format
outdatedEnglish.data outdated.data
int:size
long:pathId str:oldValue
long:pathId str:oldValue
...
$END$ 
str:locale
int:size
long:pathId
long:pathId
...
str:locale
int:size
long:pathId
long:pathId
$END$ 
~50KB  ~100KB 

Testing

Make sure TestOutdatedPaths.java passes. It may take some modifications, since it depends on the exact data.

Debugging

The tool also generates a bunch of text files in …/cldr-tmp/dropbox/births/ (default CldrUtility.TMP_DIRECTORY + /births) that can be used in debugging.

The format is the following, with fields separated by TABs for import into a spreadsheet.

locale version current-value older-value english-version current-English-value older-English-value xpath

da 2.0.1 Vestafrikansk normaltid vestafrikansk tid 21.0 West Africa Standard Time West Africa Time //ldml/dates/…/standard

So what the above means is that for that path:

  • at version 2.0.1, Danish changed from "vestafrikansk tid" to "Vestafrikansk normaltid"
  • at version 21, English changed from "West Africa Time" to "West Africa Standard Time".

A value of ∅ indicates that there is no value for that version.

Comments