Skip to content

Commit

Permalink
Merge pull request #679 from python-babel/cldr-36
Browse files Browse the repository at this point in the history
CLDR 36
  • Loading branch information
akx committed Dec 31, 2019
2 parents 521fd3a + d4a7c26 commit 30355ca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
12 changes: 6 additions & 6 deletions babel/units.py
Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions scripts/download_import_cldr.py
Expand Up @@ -13,9 +13,9 @@
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


Expand Down
6 changes: 4 additions & 2 deletions scripts/import_cldr.py
Expand Up @@ -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):
Expand Down

0 comments on commit 30355ca

Please sign in to comment.