Skip to content

Commit

Permalink
CLDR 38.1.0 (#20)
Browse files Browse the repository at this point in the history
* cldr 38.1 beta update

v38.1.0-BETA (tagged "beta" in npm)
generated from cldr-staging 1acbe10c8af48794cbe9966cb9a6cea92cee6004
generated from cldr tools f7d6d55ca3073b209d3bf2dd9fcf15d28c259e16

* improve build script cldr-generate-json.sh

* create zipfiles

* generate cldr-segments-full and also annotations

* build scripts WIP (-V temporarily dropped)

* Update reflecting CLDR-14313 fixes

Reflecting commit c0060510ce98a43f1c8c8541afe48f3cbf442632 on CLDR
(see unicode-org/cldr#888 for its destination)

Summary of changes:
    - These items are now arrays instead of strings:
      - supplemental/calendarPreferenceData
      - supplemental/weekData (now grouped by territory)
    - Previously MISSING data now added
      - cldr-core/dayPeriods.json:    dayPeriodRuleSet-type-selection"
      - cldr-core/units.json:         unitConstants, unitQuantities
      - cldr-core/unitsMetadata.json: unit deprecations

* segments packaging missed

* script improvements: MATCH

* warn if you have a local-config.sh

* getting ready to build 38.1.0-BETA4

* update packaging 38.1.0-BETA4

* update license and versioning per CLDR-11059

CLDR tool source: unicode-org/cldr#972

Note, 'Currie' was dropped somehow with this generation, so I excluded that:
unicode-org/cldr#970 (comment)

* bump proposed tag to 38.1.0

* version regen to 38.1.0
  • Loading branch information
srl295 committed Jan 27, 2021
1 parent 1f1d0f3 commit f321d77
Show file tree
Hide file tree
Showing 572 changed files with 3,545,580 additions and 782 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -4,3 +4,5 @@
.DS_Store
*.zip
*.asc
/dist
local-config.sh
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -31,7 +31,10 @@ Now, only the `cldr-json` repo will be used, and it will contain all data in a s
2. Check out the [`cldr`](https://github.com/unicode-org/cldr) repo as a sibling to this one and set it up so maven builds are possible.
3. Run the script `cldr-generate-json.sh`
4. Data will be updated in the `cldr-json` subdirectory.
5. npm packages can be updated as well. Each sub-subdirectory is an npm package.
5. Run the script `cldr-generate-zips.sh`
6. npm packages can be updated as well. Each sub-subdirectory is an npm package.

See `cldr-config.sh` for customization options.

See [Updating JSON Data](http://cldr.unicode.org/development/updating-codes/updating-json-data)
for detailed instructions.
Expand Down
29 changes: 29 additions & 0 deletions cldr-config.sh
@@ -0,0 +1,29 @@
#!/bin/sh

# Don't modify this file for temporary changes.
# create an executable ./local-config.sh and it will be used instead.

# where CLDR is
CLDR_DIR=../cldr

# output of generated JSON
OUT=./cldr-json

# input data, assumed to be in a parallel repo
# <https://github.com/unicode-org/cldr-staging.git>
INDATA=../cldr-staging/production

# output of .zip files
DIST=./dist

# which types to generate
TYPES="supplemental segments rbnf main annotations"

# Only these files
MATCH='.*'

# what draft status to consider
DRAFTSTATUS="contributed"

# override the version number of CLDR
VERSION="38.1.0"
37 changes: 31 additions & 6 deletions cldr-generate-json.sh
Expand Up @@ -5,11 +5,15 @@
#
# Creates JSON data under ./cldr-json in this directory.

CLDR_DIR=../cldr
OUT=./cldr-json
INDATA=../cldr-staging/production
. ./cldr-config.sh
if [ -x ./local-config.sh ];
then
echo "Using local-config.sh"
. ./local-config.sh
fi

mkdir -p -v ${OUT}
# for now, seed has to exist.
mkdir -p -v ${OUT} ${INDATA}/seed/main ${INDATA}/seed/annotations ${DIST}
MAIN_CLASS=org.unicode.cldr.json.Ldml2JsonConverter
export MAVEN_OPTS="-Xmx8192m -XX:MaxPermSize=1024m -Dexec.cleanupDaemonThreads=false -Dexec.mainClass=${MAIN_CLASS}"
MVN="mvn --file=${CLDR_DIR}/tools/pom.xml"
Expand All @@ -19,6 +23,27 @@ MVN_EXEC="${MVN} -DCLDR_DIR=${INDATA} exec:java -pl cldr-code"
set -x
${MVN_COMPILE} || exit 1

for type in supplemental segments rbnf main; do
${MVN_EXEC} -Dexec.args="-p true -o false -r true -t ${type} -d ${OUT} -s contributed" || exit 1
for type in ${TYPES}; do
${MVN_EXEC} -Dexec.args="-m ${MATCH} -p true -o true -r true -t ${type} -d ${OUT} -s ${DRAFTSTATUS} -V ${VERSION}" || exit 1
done

echo "Finshed converting '${TYPES}' to ${OUT}"

if [ -x ./local-config.sh ];
then
echo "REMINDER: you have a local-config.sh - may not be a standard build"
fi

## Example options for the generator:
#[-p, true, -o, false, -r, true, -t, supplemental, -d, ./cldr-json, -s, contributed]
#-c commondir ≝ /Users/srl295/src/cldr-staging/production/common/
#-d destdir ≔ ./cldr-json
#-m match ≝ .*
#-t type ≔ supplemental
#-r resolved ≔ true
#-s draftstatus ≔ contributed
#-l coverage ≝ optional
#-n fullnumbers ≝ false
#-o other ≔ false
#-p packages ≔ true
#-i identity ≝ true
19 changes: 19 additions & 0 deletions cldr-generate-zip.sh
@@ -0,0 +1,19 @@
#!/bin/bash
#
# Copyright © 1991-2020 Unicode, Inc. All rights reserved. Distributed under
# the Terms of Use in http://www.unicode.org/copyright.html.
#
# Creates JSON data under ./cldr-json in this directory.

. ./cldr-config.sh
if [ -x ./local-config.sh ];
then
echo "Using local-config.sh"
. ./local-config.sh
fi

set -x
( cd ${OUT} && zip -r cldr-${VERSION}-json-full.zip ../LICENSE cldr-core cldr-rbnf cldr-*-full )
( cd ${OUT} && zip -r cldr-${VERSION}-json-modern.zip ../LICENSE cldr-core cldr-rbnf cldr-*-modern )

mv -v ${OUT}/*.zip ${DIST}/

0 comments on commit f321d77

Please sign in to comment.