Skip to content

Commit

Permalink
CLDR-17416 v45 BRS validity (2) (#3537)
Browse files Browse the repository at this point in the history
* CLDR-17416 v45 BRS validity (2)

* CLDR-17416 Fix test
  • Loading branch information
macchiati authored Feb 28, 2024
1 parent 8ec0988 commit b873ba0
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 36 deletions.
18 changes: 9 additions & 9 deletions common/validity/currency.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE supplementalData SYSTEM '../../common/dtd/ldmlSupplemental.dtd'>
<!--
Copyright © 1991-2023 Unicode, Inc.
Copyright © 1991-2024 Unicode, Inc.
For terms of use, see http://www.unicode.org/copyright.html
SPDX-License-Identifier: Unicode-DFS-2016
SPDX-License-Identifier: Unicode-3.0
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
GENERATED DATA — do not manually update!
Generated by tool: GenerateValidityXml
Expand All @@ -12,10 +12,10 @@
<supplementalData>
<version number="$Revision$"/>
<idValidity>
<id type='currency' idStatus='regular'> <!-- 154 items -->
AED AFN ALL AMD ANG AOA ARS AUD AWG AZN
<id type='currency' idStatus='regular'> <!-- 153 items -->
AED AFN ALL AMD AOA ARS AUD AWG AZN
BAM BBD BDT BGN BHD BIF BMD BND BOB BRL BSD BTN BWP BYN BZD
CAD CDF CHF CLP CNY COP CRC CUC CUP CVE CZK
CAD CDF CHF CLP CNY COP CRC CUP CVE CZK
DJF DKK DOP DZD
EGP ERN ETB EUR
FJD FKP
Expand All @@ -40,12 +40,12 @@
YER
ZAR ZMW
</id>
<!-- Deprecated values are those that are not legal tender in some country after 2023.
<!-- Deprecated values are those that are not legal tender in some country after 2024.
More detailed usage information needed for some implementations is in supplemental data. -->
<id type='currency' idStatus='deprecated'> <!-- 150 items -->
ADP AFA ALK AOK AON AOR ARA ARL~M ARP ATS AZM
<id type='currency' idStatus='deprecated'> <!-- 152 items -->
ADP AFA ALK ANG AOK AON AOR ARA ARL~M ARP ATS AZM
BAD BAN BEC BEF BEL BGL~M BGO BOL BOP BOV BRB~C BRE BRN BRR BRZ BUK BYB BYR
CHE CHW CLE~F CNH CNX COU CSD CSK CYP
CHE CHW CLE~F CNH CNX COU CSD CSK CUC CYP
DDM DEM
ECS ECV EEK ESA~B ESP
FIM FRF
Expand Down
4 changes: 2 additions & 2 deletions common/validity/language.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE supplementalData SYSTEM '../../common/dtd/ldmlSupplemental.dtd'>
<!--
Copyright © 1991-2022 Unicode, Inc.
Copyright © 1991-2024 Unicode, Inc.
For terms of use, see http://www.unicode.org/copyright.html
SPDX-License-Identifier: Unicode-DFS-2016
SPDX-License-Identifier: Unicode-3.0
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
GENERATED DATA — do not manually update!
Generated by tool: GenerateValidityXml
Expand Down
4 changes: 2 additions & 2 deletions common/validity/region.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE supplementalData SYSTEM '../../common/dtd/ldmlSupplemental.dtd'>
<!--
Copyright © 1991-2023 Unicode, Inc.
Copyright © 1991-2024 Unicode, Inc.
For terms of use, see http://www.unicode.org/copyright.html
SPDX-License-Identifier: Unicode-DFS-2016
SPDX-License-Identifier: Unicode-3.0
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
GENERATED DATA — do not manually update!
Generated by tool: GenerateValidityXml
Expand Down
20 changes: 10 additions & 10 deletions common/validity/script.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE supplementalData SYSTEM '../../common/dtd/ldmlSupplemental.dtd'>
<!--
Copyright © 1991-2022 Unicode, Inc.
Copyright © 1991-2024 Unicode, Inc.
For terms of use, see http://www.unicode.org/copyright.html
SPDX-License-Identifier: Unicode-DFS-2016
SPDX-License-Identifier: Unicode-3.0
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
GENERATED DATA — do not manually update!
Generated by tool: GenerateValidityXml
Expand All @@ -12,33 +12,33 @@
<supplementalData>
<version number="$Revision$"/>
<idValidity>
<id type='script' idStatus='regular'> <!-- 167 items -->
Adlm Aghb Ahom Arab Armi Armn Avst
<id type='script' idStatus='regular'> <!-- 175 items -->
Adlm Aghb Ahom Arab Aran Armi Armn Avst
Bali Bamu Bass Batk Beng Bhks Bopo Brah~i Bugi Buhd
Cakm Cans Cari Cham Cher Chrs Copt Cpmn Cprt Cyrl
Cakm Cans Cari Cham Cher Chrs Copt Cpmn Cprt Cyrl Cyrs
Deva Diak Dogr Dsrt Dupl
Egyp Elba Elym Ethi
Geor Glag Gong Gonm Goth Gran Grek Gujr Guru
Hanb Hang Hani Hano Hans~t Hatr Hebr Hira Hluw Hmng Hmnp Hrkt Hung
Ital
Jamo Java Jpan
Kali Kana Kawi Khar Khmr Khoj Kits Knda Kore Kthi
Lana Laoo Latn Lepc Limb Lina~b Lisu Lyci Lydi
Lana Laoo Latf~g Latn Lepc Limb Lina~b Lisu Lyci Lydi
Mahj Maka Mand Mani Marc Medf Mend Merc Mero Mlym Modi Mong Mroo Mtei Mult Mymr
Nagm Nand Narb Nbat Newa Nkoo Nshu
Ogam Olck Orkh Orya Osge Osma Ougr
Palm Pauc Perm Phag Phli Phlp Phnx Plrd Prti
Rjng Rohg Runr
Samr Sarb Saur Sgnw Shaw Shrd Sidd Sind Sinh Sogd Sogo Sora Soyo Sund Sylo Syrc
Samr Sarb Saur Sgnw Shaw Shrd Sidd Sind Sinh Sogd Sogo Sora Soyo Sund Sylo Syrc Syre Syrj Syrn
Tagb Takr Tale Talu Taml Tang Tavt Telu Tfng Tglg Thaa Thai Tibt Tirh Tnsa Toto
Ugar
Vaii Vith
Wara Wcho
Xpeo Xsux
Yezi Yiii Zanb
Yezi Yiii
Zanb
</id>
<id type='script' idStatus='special'> <!-- 9 items -->
Aran
<id type='script' idStatus='special'> <!-- 7 items -->
Qaag
Zinh Zmth Zsye Zsym Zxxx Zyyy
</id>
Expand Down
4 changes: 2 additions & 2 deletions common/validity/subdivision.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE supplementalData SYSTEM '../../common/dtd/ldmlSupplemental.dtd'>
<!--
Copyright © 1991-2023 Unicode, Inc.
Copyright © 1991-2024 Unicode, Inc.
For terms of use, see http://www.unicode.org/copyright.html
SPDX-License-Identifier: Unicode-DFS-2016
SPDX-License-Identifier: Unicode-3.0
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
GENERATED DATA — do not manually update!
Generated by tool: GenerateValidityXml
Expand Down
4 changes: 2 additions & 2 deletions common/validity/variant.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE supplementalData SYSTEM '../../common/dtd/ldmlSupplemental.dtd'>
<!--
Copyright © 1991-2023 Unicode, Inc.
Copyright © 1991-2024 Unicode, Inc.
For terms of use, see http://www.unicode.org/copyright.html
SPDX-License-Identifier: Unicode-DFS-2016
SPDX-License-Identifier: Unicode-3.0
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
GENERATED DATA — do not manually update!
Generated by tool: GenerateValidityXml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,25 @@ private static void doSubdivisions(Map<String, Info> types) {
"Unknown/Undetermined subdivision codes (ZZZZ) are defined for all regular region codes.");
}

static final Set<String> VARIANTS =
Set.of( // variants
"Aran",
"Cyrs",
"Hans",
"Hant",
"Latf",
"Latg",
"Syre",
"Syrj",
"Syrn",
// composites
"Hanb",
"Jpan",
"Hrkt",
"Kore",
// subsets
"Jamo");

private static void doLstr(Map<String, Info> types) throws IOException {
Set<String> skippedScripts = new TreeSet<>();
for (Entry<LstrType, Map<String, Map<LstrField, String>>> entry : LSTREG.entrySet()) {
Expand Down Expand Up @@ -349,11 +368,10 @@ private static void doLstr(Map<String, Info> types) throws IOException {
break;
case script:
switch (code) {
case "Aran":
// extra specials
case "Qaag":
case "Zsye":
case "Zanb":
case "Zinh":
case "Zsye":
case "Zyyy":
subtype = Status.special;
break;
Expand All @@ -367,7 +385,7 @@ private static void doLstr(Map<String, Info> types) throws IOException {
case regular:
ScriptMetadata.Info scriptInfo =
ScriptMetadata.getInfo(code);
if (scriptInfo == null && !code.equals("Hrkt")) {
if (scriptInfo == null && !VARIANTS.contains(code)) {
skippedScripts.add(code);
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,6 @@ public void TestCldrScriptCodes() {
break; // do nothin
}
}

ImmutableSet<String> variants =
ImmutableSet.of("Cyrs", "Geok", "Latf", "Latg", "Syre", "Syrj", "Syrn");
assertRelation(
"getCLDRScriptCodes contains variants", false, codes, CONTAINS_SOME, variants);
}

public void checkPluralSamples(String... row) {
Expand Down

0 comments on commit b873ba0

Please sign in to comment.