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

Do not allow substituting alternates or drafts in derived locales #1113

Closed akx closed 3 months ago

akx commented 3 months ago

For more coverage, we've allowed using alternate or draft values when no officially accepted values have been present.

However, non-global (i.e. e.g. de_CH locales) may have an alternate spelling for what would be an alternate in the parent locale (and that alternate hasn't been imported into the parent), and the import would have then accepted the alternate from the child locale as a non-alternate.

Fixes #1112.

codecov[bot] commented 3 months ago

Codecov Report

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

Project coverage is 91.21%. Comparing base (d3346ee) to head (cb8220b).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1113 +/- ## ======================================= Coverage 91.21% 91.21% ======================================= Files 27 27 Lines 4496 4496 ======================================= Hits 4101 4101 Misses 395 395 ``` | [Flag](https://app.codecov.io/gh/python-babel/babel/pull/1113/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/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.99% <ø> (ø)` | | | [macos-12-3.11](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.99% <ø> (ø)` | | | [macos-12-3.12](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.16% <ø> (ø)` | | | [macos-12-3.13-dev](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.67% <ø> (ø)` | | | [macos-12-3.8](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.91% <ø> (ø)` | | | [macos-12-3.9](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.91% <ø> (ø)` | | | [macos-12-pypy3.10](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.99% <ø> (ø)` | | | [ubuntu-22.04-3.10](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.01% <ø> (ø)` | | | [ubuntu-22.04-3.11](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.01% <ø> (ø)` | | | [ubuntu-22.04-3.12](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.19% <ø> (ø)` | | | [ubuntu-22.04-3.13-dev](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.70% <ø> (ø)` | | | [ubuntu-22.04-3.8](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.93% <ø> (ø)` | | | [ubuntu-22.04-3.9](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.93% <ø> (ø)` | | | [ubuntu-22.04-pypy3.10](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.01% <ø> (ø)` | | | [windows-2022-3.10](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.13% <ø> (ø)` | | | [windows-2022-3.11](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.13% <ø> (ø)` | | | [windows-2022-3.12](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.31% <ø> (ø)` | | | [windows-2022-3.13-dev](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `89.82% <ø> (ø)` | | | [windows-2022-3.8](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.06% <ø> (ø)` | | | [windows-2022-3.9](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.06% <ø> (ø)` | | | [windows-2022-pypy3.10](https://app.codecov.io/gh/python-babel/babel/pull/1113/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python-babel) | `90.13% <ø> (ø)` | | 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.