Skip to content

Commit 3cb2496

Browse files
committed
Import CLDR 42
1 parent cf405e2 commit 3cb2496

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

scripts/download_import_cldr.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import zipfile
1010
from urllib.request import urlretrieve
1111

12-
URL = 'http://unicode.org/Public/cldr/41/cldr-common-41.0.zip'
13-
FILENAME = 'cldr-common-41.0.zip'
14-
# Via https://unicode.org/Public/cldr/41/hashes/SHASUM512
15-
FILESUM = 'c64f3338e292962817b043dd11e9c47f533c9b70d432f83e80654e20f4937c72b37e66a60485df43f734b1ff94ebf0452547a063076917889303c9653b4d6ce5'
12+
URL = 'http://unicode.org/Public/cldr/42/cldr-common-42.0.zip'
13+
FILENAME = 'cldr-common-42.0.zip'
14+
# Via https://unicode.org/Public/cldr/42/hashes/SHASUM512
15+
FILESUM = '315448fe6a9ac2d5a6a7fd1a27b38c5db30fed053654a803d50e3a8d06aa08ad153e8e57089fa094c561f41a54f37eecda0701b47a1813879902be71945aa38a'
1616
BLKSIZE = 131072
1717

1818

scripts/import_cldr.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,10 @@ def parse_currency_formats(data, tree):
925925
)
926926
elif child.tag == 'pattern':
927927
pattern_type = child.attrib.get('type')
928+
if child.attrib.get('draft') or child.attrib.get('alt'):
929+
# Skip drafts and alternates.
930+
# The `noCurrency` alternate for currencies was added in CLDR 42.
931+
continue
928932
pattern = numbers.parse_pattern(str(child.text))
929933
if pattern_type:
930934
# This is a compact currency format, see:

0 commit comments

Comments
 (0)