]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Import CLDR 42
authorAarni Koskela <akx@iki.fi>
Fri, 20 Jan 2023 14:24:51 +0000 (16:24 +0200)
committerAarni Koskela <akx@iki.fi>
Fri, 20 Jan 2023 14:41:36 +0000 (16:41 +0200)
scripts/download_import_cldr.py
scripts/import_cldr.py

index ab455ac14cb178e396d1e9148a136dbdec1ef843..c08c7fc08d01b4fcff226ec0e6f26f8d500f1120 100755 (executable)
@@ -9,10 +9,10 @@ import sys
 import zipfile
 from urllib.request import urlretrieve
 
-URL = 'http://unicode.org/Public/cldr/41/cldr-common-41.0.zip'
-FILENAME = 'cldr-common-41.0.zip'
-# Via https://unicode.org/Public/cldr/41/hashes/SHASUM512
-FILESUM = 'c64f3338e292962817b043dd11e9c47f533c9b70d432f83e80654e20f4937c72b37e66a60485df43f734b1ff94ebf0452547a063076917889303c9653b4d6ce5'
+URL = 'http://unicode.org/Public/cldr/42/cldr-common-42.0.zip'
+FILENAME = 'cldr-common-42.0.zip'
+# Via https://unicode.org/Public/cldr/42/hashes/SHASUM512
+FILESUM = '315448fe6a9ac2d5a6a7fd1a27b38c5db30fed053654a803d50e3a8d06aa08ad153e8e57089fa094c561f41a54f37eecda0701b47a1813879902be71945aa38a'
 BLKSIZE = 131072
 
 
index 5630ba8961cd40945c7495f991593a84c5b726c7..5d40e818a43d40c3c4cfb2125e8dcd0bf1e5a1c7 100755 (executable)
@@ -925,6 +925,10 @@ def parse_currency_formats(data, tree):
                         )
                     elif child.tag == 'pattern':
                         pattern_type = child.attrib.get('type')
+                        if child.attrib.get('draft') or child.attrib.get('alt'):
+                            # Skip drafts and alternates.
+                            # The `noCurrency` alternate for currencies was added in CLDR 42.
+                            continue
                         pattern = numbers.parse_pattern(str(child.text))
                         if pattern_type:
                             # This is a compact currency format, see: