python-babel / babel

The official repository for Babel, the Python Internationalization Library
http://babel.pocoo.org/
BSD 3-Clause "New" or "Revised" License
1.34k stars 448 forks source link

Use CLDR 46 #1145

Closed tomasr8 closed 2 weeks ago

tomasr8 commented 4 weeks ago

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 :)

codecov[bot] commented 4 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | Coverage Δ | | |---|---|---| | [macos-12-3.10](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.04% <ø> (-0.04%)` | :arrow_down: | | [macos-12-3.11](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.98% <ø> (-0.04%)` | :arrow_down: | | [macos-12-3.12](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.20% <ø> (-0.04%)` | :arrow_down: | | [macos-12-3.13-dev](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.72% <ø> (-0.04%)` | :arrow_down: | | [macos-12-3.8](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.97% <ø> (-0.04%)` | :arrow_down: | | [macos-12-3.9](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.97% <ø> (-0.04%)` | :arrow_down: | | [macos-12-pypy3.10](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.04% <ø> (-0.04%)` | :arrow_down: | | [ubuntu-22.04-3.10](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.07% <ø> (-0.04%)` | :arrow_down: | | [ubuntu-22.04-3.11](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.00% <ø> (-0.04%)` | :arrow_down: | | [ubuntu-22.04-3.12](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.22% <ø> (-0.04%)` | :arrow_down: | | [ubuntu-22.04-3.13-dev](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.74% <ø> (-0.04%)` | :arrow_down: | | [ubuntu-22.04-3.8](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.00% <ø> (-0.04%)` | :arrow_down: | | [ubuntu-22.04-3.9](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.00% <ø> (-0.04%)` | :arrow_down: | | [ubuntu-22.04-pypy3.10](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.07% <ø> (-0.04%)` | :arrow_down: | | [windows-2022-3.10](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.19% <ø> (-0.04%)` | :arrow_down: | | [windows-2022-3.11](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.12% <ø> (-0.04%)` | :arrow_down: | | [windows-2022-3.12](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.34% <ø> (-0.04%)` | :arrow_down: | | [windows-2022-3.13-dev](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.86% <ø> (-0.04%)` | :arrow_down: | | [windows-2022-3.8](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.11% <ø> (-0.04%)` | :arrow_down: | | [windows-2022-3.9](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.11% <ø> (-0.04%)` | :arrow_down: | | [windows-2022-pypy3.10](https://app.codecov.io/gh/python-babel/babel/pull/1145/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.19% <ø> (-0.04%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

akx commented 4 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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.