Skip to content

Commit

Permalink
ICU-22773 Migrate the CLDR conversion tool to Maven
Browse files Browse the repository at this point in the history
  • Loading branch information
mihnita committed Dec 9, 2024
1 parent 3b9c0fc commit 2fa8a09
Show file tree
Hide file tree
Showing 32 changed files with 1,346 additions and 1,113 deletions.
2 changes: 1 addition & 1 deletion .github/adaboost.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// © 2022 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
// Generated using tools/cldr/cldr-to-icu/
//
// Include Japanese adaboost model.
{
Expand Down
2 changes: 1 addition & 1 deletion .github/lstm_for_th_my.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// © 2021 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
// Generated using tools/cldr/cldr-to-icu/build-icu-data.xml
// Generated using tools/cldr/cldr-to-icu/
//
// Include Burmese and Thai lstm models.
{
Expand Down
216 changes: 114 additions & 102 deletions docs/processes/cldr-icu.md

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion docs/processes/release/tasks/versions.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@ need to be correspondingly updated. See below for more files to be updated and s
[icu4c/source/data/misc/icuver.txt](https://github.com/unicode-org/icu/blob/main/icu4c/source/data/misc/icuver.txt)
needs to be updated with the correct version number for ICU and its data.

#### Since ICU 77

The tool takes the `icuVersion` and `icuDataVersion` from the official ICU APIs.
(from the icu4j listed as a dependency of the tool, usually the one you just built from the `icu4j` folder).

If you need values different than that, you can specify them as the command line parameters (`--icuVersion` and `--icuDataVersion`).

#### Since ICU 68

In
Expand Down Expand Up @@ -212,8 +219,18 @@ The command requires a version number string that follows the typical Java / Mav
6. cldr-to-icu build tool has a dependency on the icu4j packages which needs to be updated in [`tools/cldr/cldr-to-icu/pom.xml`](https://github.com/unicode-org/icu/blob/main/tools/cldr/cldr-to-icu/pom.xml). Please update it to match the version that was updated in `icu4j/pom.xml` in the steps above.
`<version>74.0.1-SNAPSHOT</version>`
```xml
version>74.0.1-SNAPSHOT</version>
```

Since ICU 77 this moved to a property:
```xml
<icu4j.version>77.0.1-SNAPSHOT</icu4j.version>
```
Which can be easily be set from command line:
```sh
mvn versions:set-property -Dproperty=icu4j.version -DnewVersion=77.1 -f $ICU_DIR/tools/cldr/cldr-to-icu
```

#### Until ICU 73 (inclusive)

Expand Down
2 changes: 2 additions & 0 deletions icu4c/source/data/unidata/changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,8 @@ copying that version number into the $ICU_SRC/.bazeliskrc config file.
- run Unicode Tools GenerateUnihanCollators & GenerateUnihanCollatorFiles,
check CLDR diffs, copy to CLDR, test CLDR, ... as documented there
- generate ICU zh collation data
WARNING: outdated, don't do this, follow the tools/cldr/cldr-to-icu/README.md file!
--- Old text from here:
instructions inspired by
https://github.com/unicode-org/icu/blob/main/tools/cldr/cldr-to-icu/README.txt and
https://github.com/unicode-org/icu/blob/main/icu4c/source/data/cldr-icu-readme.txt
Expand Down
13 changes: 4 additions & 9 deletions tools/cldr/.gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# Exclude the Maven local repository but keep the lib directory and the top-level readme, scripts and build config.
/lib/**
!/lib/README.txt
!/lib/install-cldr-jars.sh
!/lib/pom.xml

# Ignore the default Maven target directory.
/cldr-to-icu/target

# Eclipse IDE generated files
.classpath
.project
.settings/
21 changes: 1 addition & 20 deletions tools/cldr/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<!-- This build file is intended to become the single mechanism for working with CLDR
code and data when building ICU data.
Eventually it will encompass:
* Building ICU data form CLDR data via cldr-to-icu.
* Building the CLDR libraries needed to support ICU data conversion.
Expand Down Expand Up @@ -70,23 +70,4 @@
<delete dir="${testDataDir4J}"/>
</target>

<!-- Builds the ICU data, using the Ant build file in the cldr-to-icu directory and passing.
through any specified arguments for controlling the build. If you need more control when
building ICU data (such as incrementally building parts of the data), you should use the
build-icu-data.xml file directly. -->
<target name="build-icu-data">
<ant dir="cldr-to-icu" antfile="build-icu-data.xml" target="all" inheritAll="true"/>
</target>

<!-- Deletes generated ICU data by invoking "clean" in cldr-to-icu/build-icu-data.xml -->
<target name="clean-icu-data">
<ant dir="cldr-to-icu" antfile="build-icu-data.xml" target="clean" inheritAll="true"/>
</target>

<!-- Installs the CLDR library dependencies needed for building ICU data. -->
<target name="install-cldr-libs" depends="init-args">
<exec dir="lib" executable="install-cldr-jars.sh" resolveexecutable="true" failonerror="true">
<arg line="${cldrDir}"/>
</exec>
</target>
</project>
31 changes: 0 additions & 31 deletions tools/cldr/cldr-to-icu/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions tools/cldr/cldr-to-icu/.project

This file was deleted.

5 changes: 0 additions & 5 deletions tools/cldr/cldr-to-icu/.settings/org.eclipse.jdt.core.prefs

This file was deleted.

5 changes: 0 additions & 5 deletions tools/cldr/cldr-to-icu/.settings/org.eclipse.jdt.ui.prefs

This file was deleted.

4 changes: 0 additions & 4 deletions tools/cldr/cldr-to-icu/.settings/org.eclipse.m2e.core.prefs

This file was deleted.

Loading

0 comments on commit 2fa8a09

Please sign in to comment.