diff options
author | Aarni Koskela <akx@iki.fi> | 2019-12-31 11:06:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-31 11:06:04 +0200 |
commit | 30355cadf58fc26fe87064a04901a321225df273 (patch) | |
tree | 3f8b1a58f291ac2310bc227fe70ddf85136961e4 | |
parent | 521fd3a3aa7d5605f5b5a10e9c50d85c7aa7af61 (diff) | |
parent | d4a7c266ba119ee8564a14575a60948f723a15cb (diff) | |
download | babel-30355cadf58fc26fe87064a04901a321225df273.tar.gz |
Merge pull request #679 from python-babel/cldr-36
CLDR 36
-rw-r--r-- | babel/units.py | 12 | ||||
-rwxr-xr-x | scripts/download_import_cldr.py | 6 | ||||
-rwxr-xr-x | scripts/import_cldr.py | 6 |
3 files changed, 13 insertions, 11 deletions
diff --git a/babel/units.py b/babel/units.py index e58bf81..89c4913 100644 --- a/babel/units.py +++ b/babel/units.py @@ -88,12 +88,12 @@ def format_unit(value, measurement_unit, length='long', format=None, locale=LC_N >>> format_unit(1, 'length-meter', locale='ro_RO') u'1 metru' - >>> format_unit(0, 'length-picometer', locale='cy') - u'0 picometr' - >>> format_unit(2, 'length-picometer', locale='cy') - u'2 bicometr' - >>> format_unit(3, 'length-picometer', locale='cy') - u'3 phicometr' + >>> format_unit(0, 'length-mile', locale='cy') + u'0 mi' + >>> format_unit(1, 'length-mile', locale='cy') + u'1 filltir' + >>> format_unit(3, 'length-mile', locale='cy') + u'3 milltir' >>> format_unit(15, 'length-horse', locale='fi') Traceback (most recent call last): diff --git a/scripts/download_import_cldr.py b/scripts/download_import_cldr.py index f118c69..434b04f 100755 --- a/scripts/download_import_cldr.py +++ b/scripts/download_import_cldr.py @@ -13,9 +13,9 @@ except ImportError: from urllib import urlretrieve -URL = 'https://unicode.org/Public/cldr/35.1/core.zip' -FILENAME = 'cldr-core-35.1.zip' -FILESUM = 'e2ede8cb8f9c29157e281ee9e696ce540a72c598841bed595a406b710eea87b0' +URL = 'http://unicode.org/Public/cldr/36/core.zip' +FILENAME = 'cldr-core-36.zip' +FILESUM = '07279e56c1f4266d140b907ef3ec379dce0a99542303a9628562ac5fe460ba43' BLKSIZE = 131072 diff --git a/scripts/import_cldr.py b/scripts/import_cldr.py index 4188055..8993b68 100755 --- a/scripts/import_cldr.py +++ b/scripts/import_cldr.py @@ -77,8 +77,10 @@ def error(message, *args): def need_conversion(dst_filename, data_dict, source_filename): with open(source_filename, 'rb') as f: blob = f.read(4096) - version = int(re.search(b'version number="\\$Revision: (\\d+)', - blob).group(1)) + version_match = re.search(b'version number="\\$Revision: (\\d+)', blob) + if not version_match: # CLDR 36.0 was shipped without proper revision numbers + return True + version = int(version_match.group(1)) data_dict['_version'] = version if not os.path.isfile(dst_filename): |