CLDR's JSON data is now maintained in a git repository, outside of CLDR's SVN. To regenerate the JSON, do the following (you must have GitHub access to the unicode-cldr organization). You also need - “github-release” and a github key - go get it from https://github.com/aktau/github-release
- cd <CLDR_DIR>
- # get the latest, or whatever tag
- svn up
- mkdir git
- cd git
- # I started with ‘RP=“cldr-core cldr-units-modern … “ - YMMV. I'm not sure how best to initially populate this.
- RP="cldr-cal-buddhist-full cldr-cal-buddhist-modern cldr-cal-chinese-full cldr-cal-chinese-modern cldr-cal-coptic-full cldr-cal-coptic-modern cldr-cal-dangi-full cldr-cal-dangi-modern cldr-cal-ethiopic-full cldr-cal-ethiopic-modern cldr-cal-hebrew-full cldr-cal-hebrew-modern cldr-cal-indian-full cldr-cal-indian-modern cldr-cal-islamic-full cldr-cal-islamic-modern cldr-cal-japanese-full cldr-cal-japanese-modern cldr-cal-persian-full cldr-cal-persian-modern cldr-cal-roc-full cldr-cal-roc-modern cldr-core cldr-dates-full cldr-dates-modern cldr-json cldr-localenames-full cldr-localenames-modern cldr-misc-full cldr-misc-modern cldr-numbers-full cldr-numbers-modern cldr-rbnf cldr-segments-modern cldr-units-full cldr-units-modern"
- # clone all repos. just get one depth, we don’t need all data locally.
- for repo in ${RP}; do git clone --depth=1 git@github.com:unicode-cldr/${repo}.git; done
- # make a branch ‘for-30’ for everything.
- for repo in ${RP}; do (cd $repo ; git checkout -b for-30 ) ; done
- # now, let’s update some data
- cd cldr-json
- # At this point, please update README.md as appropriate
- # this will clear out data in ../cldr-*/
- ant clean
- # Rebuild data - takes ~40min on an 8-core 2.5 GHz Intel Core i7
- ant
- cd ..
- # Check the data
- (TBD: How to test?)
-
- # commit the data, push branch ( for beta )
- for repo in ${RP}; do (echo $repo ; cd $repo ; git commit -m 'Generate CLDR 30 data from r13032' --all ; git push ) ; done
- # merge from branch and push signed tag to master
- for repo in $(ls); do ( cd $repo && git checkout master && git merge for-30 && git branch -d for-30 && git tag -s -m 'CLDR 30 from r13034' 30.0.0 && git push --tags && git push ); done
- # release the repos! This will create a 'github release' with .zip and .tgz files for each tag.
- for repo in $(ls); do ( github-release 2>/dev/null >/dev/null info -u unicode-cldr -r ${repo} -t 30.0.0 || ( echo missing $repo ; github-release release --user unicode-cldr --repo ${repo} --tag 30.0.0 --name 30.0.0 --description "CLDR 30 @r13034 - see http://cldr.unicode.org/index/downloads/cldr-30" ) ); done
|
|