Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLDR-16108 cldr-json: mark -modern packages as deprecated #3517

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1256,11 +1256,11 @@ public void writeReadme(String outputDir, String packageName) throws IOException
outf.println();
} else if (packageName.endsWith(MODERN_TIER_SUFFIX)) {
outf.println(
"This package contains only the set of locales listed as modern coverage. See also the `"
"**Deprecated** This package contains only the set of locales listed as modern coverage. Use `"
+ CLDR_PKG_PREFIX
+ basePackageName
+ FULL_TIER_SUFFIX
+ "` package.");
+ "` and locale coverage data instead. The -modern packages are scheduled to be removed in v46, see [CLDR-16465](https://unicode-org.atlassian.net/browse/CLDR-16465).");
outf.println();
}
outf.println();
Expand Down Expand Up @@ -1356,10 +1356,8 @@ public void writePackageJson(String outputDir, String packageName) throws IOExce

final String basePackageName = getBasePackageName(packageName);
String description = configFileReader.getPackageDescriptions().get(basePackageName);
if (packageName.endsWith(FULL_TIER_SUFFIX)) {
description = description + " (all locales)";
} else if (packageName.endsWith(MODERN_TIER_SUFFIX)) {
description = description + " (modern coverage locales)";
if (packageName.endsWith(MODERN_TIER_SUFFIX)) {
description = description + " (modern only: deprecated)";
}
obj.addProperty("description", description);

Expand Down Expand Up @@ -1572,7 +1570,7 @@ public void writePackageList(String outputDir) throws IOException {
} else {
{
JsonObject packageEntry = new JsonObject();
packageEntry.addProperty("description", e.getValue() + " (basic)");
packageEntry.addProperty("description", e.getValue());
packageEntry.addProperty("tier", "full");
packageEntry.addProperty("name", CLDR_PKG_PREFIX + baseName + FULL_TIER_SUFFIX);
packages.add(packageEntry);
Expand All @@ -1582,17 +1580,7 @@ public void writePackageList(String outputDir) throws IOException {
}
{
JsonObject packageEntry = new JsonObject();
packageEntry.addProperty("description", e.getValue() + " (basic)");
packageEntry.addProperty("tier", "full");
packageEntry.addProperty("name", CLDR_PKG_PREFIX + baseName + FULL_TIER_SUFFIX);
packages.add(packageEntry);
pkgsToDesc.put(
packageEntry.get("name").getAsString(),
packageEntry.get("description").getAsString());
}
{
JsonObject packageEntry = new JsonObject();
packageEntry.addProperty("description", e.getValue() + " (modern)");
packageEntry.addProperty("description", e.getValue() + " modern (deprecated)");
packageEntry.addProperty("tier", "modern");
packageEntry.addProperty(
"name", CLDR_PKG_PREFIX + baseName + MODERN_TIER_SUFFIX);
Expand All @@ -1607,6 +1595,10 @@ public void writePackageList(String outputDir) throws IOException {
for (Map.Entry<String, String> e : pkgsToDesc.entrySet()) {
pkgs.println("### [" + e.getKey() + "](./cldr-json/" + e.getKey() + "/)");
pkgs.println();
if (e.getKey().contains("-modern")) {
pkgs.println(
" - **Note: Deprecated** see [CLDR-16465](https://unicode-org.atlassian.net/browse/CLDR-16465).");
}
pkgs.println(" - " + e.getValue());
pkgs.println(" - " + getNpmBadge(e.getKey()));
pkgs.println();
Expand Down
Loading