ShowLocaleCoverage

The ShowLocaleCoverage program is used to:
  1. check that we have reached full modern coverage for the CLDR org locales (while ST is running)
  2. generate raw material for two different charts on the release page: growth and coverage
Make sure that you have an archive of all CLDR versions set correctly. It should be directory containing each of the cldr versions, like:
  • cldr-26.0
    • common
      • bcp47
      • casing
      • collation
      • ...
    • keyboards
  • cldr-25.0
    • common
    • keyboards
  • ...
  • cldr-1.1.1
    • common
      • dtd
      • main
The directories in each release will vary. Make sure that you have the keyboards directory for as many as have it.

Then make sure that you have the the following settings
 -DARCHIVE=<that-directory>
 -DCLDR_GEN_DIR=<output-directory>

You might also need to bump up your memory in Eclipse, since it reads all versions of CLDR, and all the files (except regional variants).

You can set this up globally in Eclipse using Preferences... [search for Installed JREs] > Edit (on yours), or set them in the configuration of the programs

Growth Graph

Go into Eclipse in the Run Configuration… for ShowLocaleCoverage and set up the arguments for the right directory.

Required:
-g to select growth

While the ST is active:
  • Set up Eclipse with the project: svn+ssh://unicode.org/repos/cldr-vetdata
  • use -d {workspace}cldr-vetdata/vxml:common
Optional: Useful for debugging the tool, making sure the directories are set up
-f xxx to filter to just some locales (matching the regex xxx). 
Reset the DEBUG switch at the top of the file

Generates CLDRPaths.GEN_DIRECTORY + "statistics/showLocaleGrowth.txt" (you can override the target directory with -t ddd). 

It should look something like the following (tab delimited). Make sure that the first version is correct for the release page you are generating (eg, "26" below).

0 1 ...
26 0.9997070026369763 0.9991212653778558 ...
25 0.656414762741652 0.6407852329329036 ...
...
12 0.31370826010544817 0.30852622326399065 ...


Create a copy of the latest growth chart spreadsheet, such as CLDR v28 Growth to a new version CLDR vXX Growth. Share with the CLDR group. Open the copy, and go to the tab RawData (look at the bottom) of the spreadsheet. Select cell A1.

Open showLocaleCoverage.txt, select all (^A) and copy. Go to the spreadsheet and paste (with ^-shift-V, or "paste values only").

Switch to the first tab, and you should see a nice chart. Embed it as below.

Coverage

Similar to the Growth chart. Copy CLDR v28 Coverage (or the latest version) to a new version CLDR vXX CoverageShare with the CLDR group

Run ShowLocaleCoverage in Eclipse except don't use the -g option. 

Generates CLDRPaths.GEN_DIRECTORY + "statistics/showLocaleCoverage.txt" (you can override the target directory with -t ddd). 

The results look like:

Code Com? English Name Native Name Script Sublocales Strings modern % modern UC% moderate % moderate UC% basic % basic UC% Core*Core* Missing
...
da C* Danish dansk Latn 2 10594 0.9997070026369763 0.9997070026369763 0.33000000000000007 0.33000000000000007 0.16 0.16 1.0
...
de C* German Deutsch Latn 6 11127 0.9991212653778558 0.9991212653778558 0.33 0.33 0.16 0.16 1.0
...

Copy this as you did for Growth, into the Raw Data section. Select Column H sorting (triangle in column head), and sort Z-A. 

Switch tabs to REFORMATTED, and check that it has the same number of rows as Raw Data. If not, copy the last row downwards.

Switch tabs to the first one, and review the chart.

Find out where the moderate target% and the basic target% should be (look at the plateaux).

Go back to REFORMATTED, and reset all the items in those columns (eg to 26.6% and 9%).

Switch to the first tab, and you should see a nice chart. Embed it as below.

Checking Full Coverage

[TBD] This should be incorporated into ST next time.

It has a list of the failing items, and links to the ST for each one. Note that it also includes sr-Latin, even though that is post-generated, so remove those. Tongan is a volunteer language, so you can ignore those also.

Generates in {workspace}/cldr-aux/charts/26/supplemental/locale_coverage.html

Check this into CLDR, and it will show up on the dev charts.

Embedding

To embed a chart into a release page, open for editing, then Insert > Chart. Pick the chart that you just made.

Use:

  • no border
  • no title
  • width: 800
  • height: 450


Comments