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-17751 add ZWG, drop ZWL #3956

Merged
merged 7 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion common/bcp47/currency.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,9 @@ For terms of use, see http://www.unicode.org/copyright.html
<type name="zrn" description="Zairean New Zaire (1993-1998)"/>
<type name="zrz" description="Zairean Zaire (1971-1993)"/>
<type name="zwd" description="Zimbabwean Dollar (1980-2008)"/>
<type name="zwl" description="Zimbabwean Dollar (2009)" since="1.9"/>
<type name="zwl" description="Zimbabwean Dollar (2009-2024)" since="1.9"/>
<type name="zwr" description="Zimbabwean Dollar (2008)" since="1.9"/>
<type name="zwg" description="Zimbabwean Gold" since="46"/>
</key>
</keyword>
</ldmlBCP47>
11 changes: 8 additions & 3 deletions common/main/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6636,10 +6636,15 @@ annotations.
<displayName count="one">Zimbabwean dollar (1980–2008)</displayName>
<displayName count="other">Zimbabwean dollars (1980–2008)</displayName>
</currency>
<currency type="ZWG">
<displayName>Zimbabwean Gold</displayName>
<displayName count="one">Zimbabwean gold</displayName>
<displayName count="other">Zimbabwean gold</displayName>
</currency>
<currency type="ZWL">
<displayName>Zimbabwean Dollar (2009)</displayName>
<displayName count="one">Zimbabwean dollar (2009)</displayName>
<displayName count="other">Zimbabwean dollars (2009)</displayName>
<displayName>Zimbabwean Dollar (2009–2024)</displayName>
<displayName count="one">Zimbabwean dollar (2009–2024)</displayName>
<displayName count="other">Zimbabwean dollars (2009–2024)</displayName>
</currency>
<currency type="ZWR">
<displayName>Zimbabwean Dollar (2008)</displayName>
Expand Down
3 changes: 2 additions & 1 deletion common/supplemental/supplementalData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1180,8 +1180,9 @@ The printed version of ISO-4217:2001
<currency iso4217="ZRZ" from="1971-10-27" to="1993-11-01"/>
</region>
<region iso3166="ZW">
<currency iso4217="ZWG" from="2024-06-25"/>
<currency iso4217="USD" from="2009-04-12"/>
<currency iso4217="ZWL" from="2009-02-02" to="2009-04-12"/>
<currency iso4217="ZWL" from="2009-02-02" to="2024-08-31"/>
<currency iso4217="ZWR" from="2008-08-01" to="2009-02-02"/>
<currency iso4217="ZWD" from="1980-04-18" to="2008-08-01"/>
<currency iso4217="RHD" from="1970-02-17" to="1980-04-18"/>
Expand Down
4 changes: 2 additions & 2 deletions common/validity/currency.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<supplementalData>
<version number="$Revision$"/>
<idValidity>
<id type='currency' idStatus='regular'> <!-- 154 items -->
<id type='currency' idStatus='regular'> <!-- 155 items -->
AED AFN ALL AMD ANG 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 CUP CVE CZK
Expand All @@ -38,7 +38,7 @@
WST
XAF XCD XCG XOF XPF
YER
ZAR ZMW
ZAR ZMW ZWG
</id>
<!-- 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. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,10 @@ private int getMaxDistance(Set<String> paths, Multiset<String> values) {
values.clear();
Set<CheckLogicalGroupings.Fingerprint> fingerprints = new HashSet<>();
for (String path1 : paths) {
final String pathValue =
CheckLogicalGroupings.cleanSpaces(
pathToCheck.contentEquals(path1)
? value
: cldrFile.getWinningValue(path1));
final String valueToCheck =
pathToCheck.contentEquals(path1) ? value : cldrFile.getWinningValue(path1);
if (valueToCheck == null) continue;
final String pathValue = CheckLogicalGroupings.cleanSpaces(valueToCheck);
values.add(pathValue);
fingerprints.add(CheckLogicalGroupings.Fingerprint.make(pathValue));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,7 @@ public class ISOCurrencyHandler extends XMLFileReader.SimpleHandler {
// to the ISO 4217 Maintenance agency attempting to get them removed. Once that happens,
// we can remove these as well.
// SVC - El Salvador Colon - not used anymore ( uses USD instead )
// ZWL - Last Zimbabwe Dollar - abandoned due to hyper-inflation.
Set<String> KNOWN_BAD_ISO_DATA_CODES = new TreeSet<>(Arrays.asList("SVC", "ZWL"));
Set<String> KNOWN_BAD_ISO_DATA_CODES = new TreeSet<>(Arrays.asList("SVC"));
String country_code;
String currency_name;
String alphabetic_code;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,4 @@ currency | UYW | Uruguayan Nominal Wage Index Unit | UY | URUGUAY | F
currency | VED | Bolívar Soberano | VE | VENEZUALA | F
currency | XCG | Caribbean Guilder | CW | CURAÇAO | P
currency | XCG | Caribbean Guilder | SX | SINT MAARTEN | P
currency | ZWG | Zimbabwean Gold | ZW | ZIMBABWE | P
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ISO_4217 Pblshd="2024-01-01">
<ISO_4217 Pblshd="2024-06-25">
<CcyTbl>
<CcyNtry>
<CtryNm>AFGHANISTAN</CtryNm>
Expand Down Expand Up @@ -434,8 +434,8 @@
</CcyNtry>
<CcyNtry>
<CtryNm>CURAÇAO</CtryNm>
<CcyNm>Caribbean Guilder</CcyNm>
<Ccy>XCG</Ccy>
<CcyNm>Netherlands Antillean Guilder</CcyNm>
<Ccy>ANG</Ccy>
<CcyNbr>532</CcyNbr>
<CcyMnrUnts>2</CcyMnrUnts>
</CcyNtry>
Expand Down Expand Up @@ -1502,8 +1502,8 @@
</CcyNtry>
<CcyNtry>
<CtryNm>SINT MAARTEN (DUTCH PART)</CtryNm>
<CcyNm>Caribbean Guilder</CcyNm>
<Ccy>XCG</Ccy>
<CcyNm>Netherlands Antillean Guilder</CcyNm>
<Ccy>ANG</Ccy>
<CcyNbr>532</CcyNbr>
<CcyMnrUnts>2</CcyMnrUnts>
</CcyNtry>
Expand Down Expand Up @@ -1882,6 +1882,13 @@
<CcyNbr>932</CcyNbr>
<CcyMnrUnts>2</CcyMnrUnts>
</CcyNtry>
<CcyNtry>
<CtryNm>ZIMBABWE</CtryNm>
<CcyNm>Zimbabwe Gold</CcyNm>
<Ccy>ZWG</Ccy>
<CcyNbr>924</CcyNbr>
<CcyMnrUnts>2</CcyMnrUnts>
</CcyNtry>
<CcyNtry>
<CtryNm>ZZ01_Bond Markets Unit European_EURCO</CtryNm>
<CcyNm>Bond Markets Unit European Composite Unit (EURCO)</CcyNm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
import static org.junit.jupiter.params.provider.Arguments.arguments;

import java.util.Set;
Expand Down Expand Up @@ -98,6 +99,12 @@ public void testModernCurrencies(final String code) {
"//ldml/numbers/currencies/currency[@type=\"%s\"]/symbol", code),
"und");
final Level expect = Level.MODERN;
assumeFalse(
code.equals("ZWL") && CLDRFile.GEN_VERSION.equals("46"),
"Skipping ZWL for CLDR 46");
assumeFalse(
code.equals("ZWG") && CLDRFile.GEN_VERSION.equals("46"),
"Skipping ZWG for CLDR 46");
assertTrue(
expect.isAtLeast(l),
() ->
Expand Down
Loading