Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CLDR 46 #1145

Merged
merged 5 commits into from
Nov 15, 2024
Merged

Use CLDR 46 #1145

merged 5 commits into from
Nov 15, 2024

Conversation

tomasr8
Copy link
Member

@tomasr8 tomasr8 commented Nov 4, 2024

CLDR 46 is out now, let's upgrade.

Looking at the release notes, I don't think there's anything we need to update in babel, but another pair of eyes would be nice :)

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.28%. Comparing base (f1c8633) to head (640926c).
Report is 5 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1145      +/-   ##
==========================================
- Coverage   91.31%   91.28%   -0.04%     
==========================================
  Files          27       27              
  Lines        4618     4623       +5     
==========================================
+ Hits         4217     4220       +3     
- Misses        401      403       +2     
Flag Coverage Δ
macos-12-3.10 90.04% <ø> (-0.04%) ⬇️
macos-12-3.11 89.98% <ø> (-0.04%) ⬇️
macos-12-3.12 90.20% <ø> (-0.04%) ⬇️
macos-12-3.13-dev 89.72% <ø> (-0.04%) ⬇️
macos-12-3.8 89.97% <ø> (-0.04%) ⬇️
macos-12-3.9 89.97% <ø> (-0.04%) ⬇️
macos-12-pypy3.10 90.04% <ø> (-0.04%) ⬇️
ubuntu-22.04-3.10 90.07% <ø> (-0.04%) ⬇️
ubuntu-22.04-3.11 90.00% <ø> (-0.04%) ⬇️
ubuntu-22.04-3.12 90.22% <ø> (-0.04%) ⬇️
ubuntu-22.04-3.13-dev 89.74% <ø> (-0.04%) ⬇️
ubuntu-22.04-3.8 90.00% <ø> (-0.04%) ⬇️
ubuntu-22.04-3.9 90.00% <ø> (-0.04%) ⬇️
ubuntu-22.04-pypy3.10 90.07% <ø> (-0.04%) ⬇️
windows-2022-3.10 90.19% <ø> (-0.04%) ⬇️
windows-2022-3.11 90.12% <ø> (-0.04%) ⬇️
windows-2022-3.12 90.34% <ø> (-0.04%) ⬇️
windows-2022-3.13-dev 89.86% <ø> (-0.04%) ⬇️
windows-2022-3.8 90.11% <ø> (-0.04%) ⬇️
windows-2022-3.9 90.11% <ø> (-0.04%) ⬇️
windows-2022-pypy3.10 90.19% <ø> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@akx
Copy link
Member

akx commented Nov 5, 2024

Looking at the release notes,

Added alt='official' to represent cases where an official value differs from the customary value.

may require changes in the importer (probably to ignore "official" in favor of the customary value).

When upgrading the CLDR, I've generally run the importer with the -j flag with the old CLDR so it zoops out human-readable JSON, move it aside, then do the same with the new CLDR and diff for interesting changes in languages I know in e.g. Beyond Compare or your other favorite diff tool.

Added units: portion-per-1e9 (aka per-billion), night (for hotel stays), light-speed (as an internal prefix for light-second, light-minute, etc.)

Could be fun to see if (some of) these are supported in some locales and add some unit formatting tests for them.

The new emoji search stuff would also be nice to incorporate in some form (but that'd be a follow-up feature PR).

@tomasr8
Copy link
Member Author

tomasr8 commented Nov 6, 2024

Looking at the release notes,

Added alt='official' to represent cases where an official value differs from the customary value.

may require changes in the importer (probably to ignore "official" in favor of the customary value).

I'll try to see if there's some recommendation which value should be used in case both are present.

When upgrading the CLDR, I've generally run the importer with the -j flag with the old CLDR so it zoops out human-readable JSON, move it aside, then do the same with the new CLDR and diff for interesting changes in languages I know in e.g. Beyond Compare or your other favorite diff tool.

Thanks for the tip! I'll try that :)

Added units: portion-per-1e9 (aka per-billion), night (for hotel stays), light-speed (as an internal prefix for light-second, light-minute, etc.)

Could be fun to see if (some of) these are supported in some locales and add some unit formatting tests for them.

I'll check if there are any and try to add some tests

The new emoji search stuff would also be nice to incorporate in some form (but that'd be a follow-up feature PR).

Agreed, but yeah probably as a separate issue, I didn't really dig into that too much yet

@tomasr8
Copy link
Member Author

tomasr8 commented Nov 9, 2024

The only alt="official" that I found is in localeDisplayNames:

<language type="mus">Muscogee</language>
<language type="mus" alt="official">Mvskoke</language>

We already ignore languages with the alt attribute, but I added a test for it just in case.
Based on the discussion here, I think it's safe to keep using the customary value: https://unicode-org.atlassian.net/browse/CLDR-17761

I also added tests for the new units - I didn't know where to put them, so I created a new file test_units.py for them.

@tomasr8
Copy link
Member Author

tomasr8 commented Nov 9, 2024

Forgot to add, in the two locales I checked with the -j flag, I didn't see any large differences besides the new units, some timezone updates and spelling changes.

@akx akx added this to the Babel 2.17 milestone Nov 10, 2024
Copy link
Member

@akx akx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff, thank you!

@akx akx merged commit 740ee3d into python-babel:master Nov 15, 2024
25 of 26 checks passed
@tomasr8 tomasr8 deleted the cldr46 branch November 15, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants