From: gnrunge Date: Tue, 22 Sep 2020 23:26:26 +0000 (-0700) Subject: ICU-21028 Modifies ICU data generator so that the CLDR version is X-Git-Tag: cldr/2020-09-22~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f773df26fd65c268765d04b4b6207144555a067c;p=icu ICU-21028 Modifies ICU data generator so that the CLDR version is no longer added to the .txt data files with the exception of the root.txt files. This will drastically limit the number of changed files during a version upgrade because the version change is the only change in many of the data files. ICU-21028 Fixed an indent. ICU-21028 Factor in feedback from review. --- diff --git a/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/LdmlConverter.java b/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/LdmlConverter.java index 29a4966aab4..0b842dcc050 100644 --- a/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/LdmlConverter.java +++ b/tools/cldr/cldr-to-icu/src/main/java/org/unicode/icu/tool/cldrtoicu/LdmlConverter.java @@ -348,7 +348,9 @@ public final class LdmlConverter { }); if (!splitData.getPaths().isEmpty() || isBaseLanguage || dir.includeEmpty()) { - splitData.setVersion(cldrVersion); + if (id.equals("root")) { + splitData.setVersion(cldrVersion); + } write(splitData, outDir, false); writtenLocaleIds.put(dir, id); } @@ -561,7 +563,7 @@ public final class LdmlConverter { } else { // These empty files only exist because the target of an alias has a parent locale // which is itself not in the set of written ICU files. An "indirect alias target". - icuData.setVersion(config.getVersionInfo().getCldrVersion()); + // No need to add data: Just write a resource bundle with an empty top-level table. } write(icuData, dir, false); }