Skip to content
Open
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
2 changes: 2 additions & 0 deletions babel/localedata.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
_windows_reserved_name_re = re.compile("^(con|prn|aux|nul|com[0-9]|lpt[0-9])$", re.I)


CLDR_MAJOR_VERSION=47

def normalize_locale(name: str) -> str | None:
"""Normalize a locale ID by stripping spaces and apply proper casing.

Expand Down
6 changes: 4 additions & 2 deletions scripts/download_import_cldr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
import zipfile
from urllib.request import urlretrieve

URL = 'https://unicode.org/Public/cldr/47/cldr-common-47.zip'
FILENAME = 'cldr-common-47.0.zip'
from babel.localedata import CLDR_MAJOR_VERSION

URL = f'https://unicode.org/Public/cldr/{CLDR_MAJOR_VERSION}/cldr-common-{CLDR_MAJOR_VERSION}.zip'
FILENAME = f'cldr-common-{CLDR_MAJOR_VERSION}.0.zip'
# Via https://unicode.org/Public/cldr/45/hashes/SHASUM512.txt
FILESUM = '3b1eb2a046dae23cf16f611f452833e2a95affb1aa2ae3fa599753d229d152577114c2ff44ca98a7f369fa41dc6f45b0d7a6647653ca79694aacfd3f3be59801'
BLKSIZE = 131072
Expand Down