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-17274 XCG translations #3471

Merged
merged 4 commits into from
Feb 1, 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
1 change: 1 addition & 0 deletions common/bcp47/currency.xml
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ For terms of use, see http://www.unicode.org/copyright.html
<type name="xbc" description="European Unit of Account (XBC)" since="1.9"/>
<type name="xbd" description="European Unit of Account (XBD)" since="1.9"/>
<type name="xcd" description="East Caribbean Dollar"/>
<type name="xcg" description="Caribbean Guilder"/>
<type name="xdr" description="Special Drawing Rights" since="1.9"/>
<type name="xeu" description="European Currency Unit" since="1.9"/>
<type name="xfo" description="French Gold Franc" since="1.9"/>
Expand Down
5 changes: 5 additions & 0 deletions common/main/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6486,6 +6486,11 @@ annotations.
<displayName count="one">East Caribbean dollar</displayName>
<displayName count="other">East Caribbean dollars</displayName>
</currency>
<currency type="XCG">
<displayName>Caribbean guilder</displayName>
<displayName count="one">Caribbean guilder</displayName>
<displayName count="other">Caribbean guilders</displayName>
</currency>
<currency type="XDR">
<displayName>Special Drawing Rights</displayName>
<displayName count="one">special drawing rights</displayName>
Expand Down
7 changes: 7 additions & 0 deletions common/main/es.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7494,6 +7494,13 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<symbol>XCD</symbol>
<symbol alt="narrow">↑↑↑</symbol>
</currency>
<currency type="XCG">
<displayName>florín caribeño</displayName>
<displayName count="one">florín caribeño</displayName>
<displayName count="other">florines caribeños</displayName>
<symbol>↑↑↑</symbol>
<symbol alt="narrow">↑↑↑</symbol>
</currency>
<currency type="XDR">
<displayName>derechos especiales de giro</displayName>
</currency>
Expand Down
7 changes: 7 additions & 0 deletions common/main/fr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9820,6 +9820,13 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<symbol>XCD</symbol>
<symbol alt="narrow">↑↑↑</symbol>
</currency>
<currency type="XCG">
<displayName>florin caribéen</displayName>
<displayName count="one">florin caribéen</displayName>
<displayName count="other">florins caribéens</displayName>
<symbol>↑↑↑</symbol>
<symbol alt="narrow">↑↑↑</symbol>
</currency>
<currency type="XDR">
<displayName>droit de tirage spécial</displayName>
<displayName count="one">droit de tirage spécial</displayName>
Expand Down
7 changes: 7 additions & 0 deletions common/main/nl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15252,6 +15252,13 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<symbol>↑↑↑</symbol>
<symbol alt="narrow">↑↑↑</symbol>
</currency>
<currency type="XCG">
<displayName>Caribische gulden</displayName>
<displayName count="one">↑↑↑</displayName>
<displayName count="other">↑↑↑</displayName>
<symbol>↑↑↑</symbol>
<symbol alt="narrow">Cg</symbol>
</currency>
<currency type="XDR">
<displayName>Special Drawing Rights</displayName>
<displayName count="one">↑↑↑</displayName>
Expand Down
3 changes: 3 additions & 0 deletions common/main/root.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4516,6 +4516,9 @@ Warnings: All cp values have U+FE0F characters removed. See /annotationsDerived/
<symbol>EC$</symbol>
<symbol alt="narrow">$</symbol>
</currency>
<currency type="XCG">
<symbol>Cg.</symbol>
</currency>
<currency type="XOF">
<symbol>F CFA</symbol>
</currency>
Expand Down
6 changes: 4 additions & 2 deletions common/supplemental/supplementalData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ The printed version of ISO-4217:2001
<currency iso4217="PTE" from="1911-05-22" to="1975-07-05"/>
</region>
<region iso3166="CW">
<currency iso4217="ANG" from="2010-10-10"/>
<currency iso4217="XCG" from="2024-03-31"/>
<currency iso4217="ANG" from="2010-10-10" to="2024-06-31"/>
</region>
<region iso3166="CX">
<currency iso4217="AUD" from="1966-02-14"/>
Expand Down Expand Up @@ -995,7 +996,8 @@ The printed version of ISO-4217:2001
<currency iso4217="SVC" from="1919-11-11" to="2001-01-01"/>
</region>
<region iso3166="SX">
<currency iso4217="ANG" from="2010-10-10"/>
<currency iso4217="XCG" from="2024-03-31"/>
<currency iso4217="ANG" from="2010-10-10" to="2024-06-31"/>
</region>
<region iso3166="SY">
<currency iso4217="SYP" from="1948-01-01"/>
Expand Down
2 changes: 1 addition & 1 deletion common/validity/currency.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
UAH UGX USD UYU UZS
VES VND VUV
WST
XAF XCD XOF XPF
XAF XCD XCG XOF XPF
YER
ZAR ZMW
</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.EnumMap;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
Expand Down Expand Up @@ -1484,4 +1485,15 @@ public boolean isLstregDeprecated(String type, String code) {
Map<String, String> lStregData = getLStreg().get(type).get(code);
return lStregData.get("Deprecated") != null;
}

/** get prospective currencies. Only needed for a few tests */
public Set<String> getOncomingCurrencies() {
Set<String> result = new HashSet<>();
for (Entry<String, List<String>> entry : getCodeData(CodeType.currency).entrySet()) {
if (entry.getValue().get(3).equals("P")) {
result.add(entry.getKey());
}
}
return result;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# = I for intermediate (introduced and obsoleted after ISO 4217:2001(E/F))
# = O for obsolete in 2001 (Table A.3 of ISO 4217:2001(E/F))
# = X for non-ISO in 2001 (Table A.3 of ISO 4217:2001(E/F), with *)
# = P for codes that will be in current, customary use, but the 'from' date is in the future.
currency | XAG | Silver | ZZ | (no country) | C
currency | XAU | Gold | ZZ | (no country) | C
currency | XBA | Bond Markets Units European Composite Unit (EURCO) | ZZ | (no country) | C
Expand Down Expand Up @@ -402,3 +403,5 @@ currency | STD | Dobra | ST | SÃO TOME AND PRINCIPE | O
currency | VEF | Bolivar Fuerte | VE | VENEZUELA | O
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
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="2023-01-01">
<ISO_4217 Pblshd="2024-01-01">
<CcyTbl>
<CcyNtry>
<CtryNm>AFGHANISTAN</CtryNm>
Expand Down Expand Up @@ -434,8 +434,8 @@
</CcyNtry>
<CcyNtry>
<CtryNm>CURAÇAO</CtryNm>
<CcyNm>Netherlands Antillean Guilder</CcyNm>
<Ccy>ANG</Ccy>
<CcyNm>Caribbean Guilder</CcyNm>
<Ccy>XCG</Ccy>
<CcyNbr>532</CcyNbr>
<CcyMnrUnts>2</CcyMnrUnts>
</CcyNtry>
Expand Down Expand Up @@ -1486,13 +1486,6 @@
<CcyNbr>690</CcyNbr>
<CcyMnrUnts>2</CcyMnrUnts>
</CcyNtry>
<CcyNtry>
<CtryNm>SIERRA LEONE</CtryNm>
<CcyNm>Leone</CcyNm>
<Ccy>SLL</Ccy>
<CcyNbr>694</CcyNbr>
<CcyMnrUnts>2</CcyMnrUnts>
</CcyNtry>
<CcyNtry>
<CtryNm>SIERRA LEONE</CtryNm>
<CcyNm>Leone</CcyNm>
Expand All @@ -1509,8 +1502,8 @@
</CcyNtry>
<CcyNtry>
<CtryNm>SINT MAARTEN (DUTCH PART)</CtryNm>
<CcyNm>Netherlands Antillean Guilder</CcyNm>
<Ccy>ANG</Ccy>
<CcyNm>Caribbean Guilder</CcyNm>
<Ccy>XCG</Ccy>
<CcyNbr>532</CcyNbr>
<CcyMnrUnts>2</CcyMnrUnts>
</CcyNtry>
Expand Down
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="2023-01-01">
<ISO_4217 Pblshd="2024-01-01">
<HstrcCcyTbl>
<HstrcCcyNtry>
<CtryNm>AFGHANISTAN</CtryNm>
Expand Down Expand Up @@ -799,6 +799,13 @@
<CcyNbr>978</CcyNbr>
<WthdrwlDt>2006-10</WthdrwlDt>
</HstrcCcyNtry>
<HstrcCcyNtry>
<CtryNm>SIERRA LEONE</CtryNm>
<CcyNm>Leone</CcyNm>
<Ccy>SLL</Ccy>
<CcyNbr>694</CcyNbr>
<WthdrwlDt>2023-12</WthdrwlDt>
</HstrcCcyNtry>
<HstrcCcyNtry>
<CtryNm>SLOVAKIA</CtryNm>
<CcyNm>Slovak Koruna</CcyNm>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,35 @@
import org.unicode.cldr.tool.LikelySubtags;
import org.unicode.cldr.tool.PluralMinimalPairs;
import org.unicode.cldr.tool.PluralRulesFactory;
import org.unicode.cldr.util.*;
import org.unicode.cldr.util.Builder;
import org.unicode.cldr.util.CLDRConfig;
import org.unicode.cldr.util.CLDRFile;
import org.unicode.cldr.util.CLDRFile.WinningChoice;
import org.unicode.cldr.util.CLDRLocale;
import org.unicode.cldr.util.CLDRURLS;
import org.unicode.cldr.util.CldrUtility;
import org.unicode.cldr.util.DateConstants;
import org.unicode.cldr.util.GrammarInfo;
import org.unicode.cldr.util.GrammarInfo.GrammaticalFeature;
import org.unicode.cldr.util.GrammarInfo.GrammaticalScope;
import org.unicode.cldr.util.GrammarInfo.GrammaticalTarget;
import org.unicode.cldr.util.Iso3166Data;
import org.unicode.cldr.util.Iso639Data;
import org.unicode.cldr.util.Iso639Data.Scope;
import org.unicode.cldr.util.IsoCurrencyParser;
import org.unicode.cldr.util.LanguageTagCanonicalizer;
import org.unicode.cldr.util.LanguageTagParser;
import org.unicode.cldr.util.Level;
import org.unicode.cldr.util.LocaleNames;
import org.unicode.cldr.util.Organization;
import org.unicode.cldr.util.Pair;
import org.unicode.cldr.util.PluralRanges;
import org.unicode.cldr.util.PreferredAndAllowedHour;
import org.unicode.cldr.util.PreferredAndAllowedHour.HourStyle;
import org.unicode.cldr.util.StandardCodes;
import org.unicode.cldr.util.StandardCodes.CodeType;
import org.unicode.cldr.util.StandardCodes.LstrType;
import org.unicode.cldr.util.SupplementalDataInfo;
import org.unicode.cldr.util.SupplementalDataInfo.BasicLanguageData;
import org.unicode.cldr.util.SupplementalDataInfo.BasicLanguageData.Type;
import org.unicode.cldr.util.SupplementalDataInfo.ContainmentStyle;
Expand All @@ -73,6 +93,7 @@
import org.unicode.cldr.util.SupplementalDataInfo.PluralType;
import org.unicode.cldr.util.SupplementalDataInfo.PopulationData;
import org.unicode.cldr.util.SupplementalDataInfo.SampleList;
import org.unicode.cldr.util.Validity;
import org.unicode.cldr.util.Validity.Status;

public class TestSupplementalInfo extends TestFmwkPlus {
Expand Down Expand Up @@ -1453,6 +1474,7 @@ public void TestCompleteness() {
public void TestSupplementalCurrency() {
IsoCurrencyParser isoCodes = IsoCurrencyParser.getInstance();
Set<String> currencyCodes = STANDARD_CODES.getGoodAvailableCodes("currency");
Set<String> oncomingCurrencyCodes = STANDARD_CODES.getOncomingCurrencies();
Relation<String, Pair<String, CurrencyDateInfo>> nonModernCurrencyCodes =
Relation.of(
new TreeMap<String, Set<Pair<String, CurrencyDateInfo>>>(), TreeSet.class);
Expand Down Expand Up @@ -1529,6 +1551,7 @@ public void TestSupplementalCurrency() {
logln("Modern Codes: " + modernCurrencyCodes.size() + "\t" + modernCurrencyCodes);
Set<String> missing = new TreeSet<>(isoCurrenciesToCountries.keySet());
missing.removeAll(modernCurrencyCodes.keySet());
missing.removeAll(oncomingCurrencyCodes);
Set<String> recentMissing = new TreeSet<>(missing);
recentMissing.retainAll(recentModernCurrencyCodes.keySet());
if (recentMissing.size() != 0) {
Expand All @@ -1544,7 +1567,7 @@ public void TestSupplementalCurrency() {
if (missing.size() != 0) {
errln(
"Codes in ISO 4217 but not current tender in CLDR "
+ "(may need to update "
+ "(may need to update as per"
+ CLDRURLS.UPDATING_CURRENCY_CODES
+ " ): "
+ currencyDateRelationToString(nonModernCurrencyCodes, missing));
Expand Down
Loading