Skip to content
Merged
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
36 changes: 34 additions & 2 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Babel is written and maintained by the Babel team and various contributors:
- Felix Schwarz
- Pedro Algarvio
- Jeroen Ruigrok van der Werven
- Tomas R.
- Philip Jenvey
- benselme
- Isaac Jurado
- Tomas R.
- Tobias Bieniek
- Erick Wilder
- Jonah Lawrence
Expand All @@ -29,12 +29,18 @@ Babel is written and maintained by the Babel team and various contributors:
- Sachin Paliwal
- Alex Willmer
- Daniel Neuhäuser
- Maximilian Moser
- Miro Hrončok
- Cédric Krier
- Luke Plant
- Jennifer Wang
- Lukas Balaga
- sudheesh001
- 陈志谦
- Vineeth Sai Varikuntla
- Denys
- Harshit Gupta
- xmo-odoo
- Jean Abou Samra
- Niklas Hambüchen
- Changaco
Expand All @@ -50,6 +56,33 @@ Babel is written and maintained by the Babel team and various contributors:
- Arturas Moskvinas
- Leonardo Pistone
- Hyunjun Kim
- 0718lol
- Vinodkumarreddy178
- Parsnip37
- Kayokoi
- Jay Hemnani
- Tanveer Singh
- Berkay Pehlivan
- agu2347
- Bing Gao
- Christopher Krah
- Syrinx.
- Parijat Biswas
- Jeff
- Sai Asish Y
- Sreekant Baheti
- Kadir Can Ozden
- Apoorva Verma
- David Castro
- Adam Žurek
- Skytuhua
- nawaaaar
- Yushion Yang
- Himanshu Kumar
- theman6660
- Gyanu Mayank
- Paul Bozin
- trillian
- Bart Broere
- Guillaume Gauvrit
- clach04
Expand Down Expand Up @@ -123,7 +156,6 @@ Babel is written and maintained by the Babel team and various contributors:
- Chris
- Charly C
- PTrottier
- xmo-odoo
- StevenJ
- Jungmo Ku
- Simeon Visser
Expand Down
85 changes: 85 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,91 @@
Babel Changelog
===============

Version 2.19.0
--------------

This release brings CLDR 49, new `pybabel concat` and `pybabel merge` commands,
command configuration via `pyproject.toml`, and a large number of bug fixes,
many of them from first-time contributors (and large language models).
Thank you all!

Babel now requires Python 3.9 or newer, and is built with a PEP 517 process
using Hatch instead of the legacy setup.py. This in particular may be of interest
to downstream packagers.

Features
~~~~~~~~

* Core: Accept `C` and `POSIX` in `Locale.parse` by @gyanu2507 in :gh:`1340`
* Core: Add support for other systemic aliases specified in CLDR `root.xml` by @akx in :gh:`1310`
* Core: Use CLDR 49 by @tomasr8 in :gh:`1427` (and CLDR 48.2 by @akx in :gh:`1302`)
* Dates: Add the Julian day (`g`) date pattern by @tomasr8 in :gh:`1445`
* Dates: Parse two-digit years relative to today in `parse_date` by @jayhemnani9910 in :gh:`1449`
* Dates: Support CLDR 48 relative date formats by @akx in :gh:`1306`
* Dates: Support a localized UTC alt in `get_timezone_gmt` by @tomasr8 in :gh:`1433`
* Messages: Add `pybabel concat` and `pybabel merge` commands by @soft-suroleb in :gh:`1161`, with follow-ups by @akx in :gh:`1316`
* Messages: Extract parametrized gettext calls from JavaScript files by @adaamz in :gh:`1221`
* Messages: Read default command configuration from `pyproject.toml` by @max-moser in :gh:`1290`
* Messages: Update plural rules from CLDR data by @akx in :gh:`1303` and :gh:`1309`
* Messages: Validate `msgid_plural` against `msgstr[0]` for languages with `nplurals=1` by @tomasr8 in :gh:`1198`
* Messages: Validate star width and precision arguments in Python format strings by @ice-pring in :gh:`1402`
* Messages: Warn when skipping an f-string with substitutions during extraction by @ColinHouse in :gh:`1350`
* Units: Implement long/narrow -> short fallback by @trillllian in :gh:`1225`

Bugfixes
~~~~~~~~

* Core: Fix locale data corruption across locales by memoizing resolved data per instance by @akx in :gh:`1299`
* Core: Key time zone names by canonical IANA zone IDs by @akx in :gh:`1417`
* Dates: Fix `get_timezone_gmt` hour for negative fractional offsets by @vineethsaivs in :gh:`1291`
* Dates: Handle 12 AM and 12 PM correctly in `parse_time` by @simpleqt in :gh:`1366`
* Dates: Preserve fractional timedelta seconds until formatting by @nawaaaaaAaar in :gh:`1401`
* Dates: Preserve the original skeleton name in the `KeyError` raised by fuzzy `format_skeleton` by @SAY-5 in :gh:`1275`
* Dates: Raise `ParseError` instead of a bare `ValueError` from `parse_date` and `parse_time` by @binggao1230 in :gh:`1282`
* Dates: Return a location without a region when the locale has no name for it by @simpleqt in :gh:`1405`
* Dates: Truncate fractional seconds per UTS 35 instead of rounding by @vineethsaivs in :gh:`1292`
* Messages: Decode message context when reading MO files by @akx in :gh:`1305`
* Messages: Don't crash on blank `PO-Revision-Date` / `POT-Creation-Date` headers by @agu2347 in :gh:`1293`
* Messages: Fix `Catalog.is_identical` for context-specific messages by @akx in :gh:`1428`
* Messages: Fix comparisons between messages and other types by @wozhenbang2004 in :gh:`1483`
* Messages: Fix several JavaScript extraction issues: line numbers on CRLF files (@apoorva-01 in :gh:`1288`), Unicode code point escapes (@theman6660 in :gh:`1394`), vertical-tab escapes (@Dcastroro in :gh:`1409`) and source encoding in template strings (@tanveerchana in :gh:`1443`)
* Messages: Fix Python extraction of byte strings (@bysiber in :gh:`1259`) and calls within square brackets (@denyshon in :gh:`1336`)
* Messages: Keep explicitly declared plural forms without a locale by @akx in :gh:`1318`
* Messages: Preserve nonconsecutive repeated comment lines in PO files by @berkay-byte in :gh:`1348`
* Messages: Unescape the C escapes GNU gettext writes in PO files by @chrikrah in :gh:`1425`
* Numbers: Select compact decimal patterns (@Sreekant13 in :gh:`1301`) and plural forms (@0718lol in :gh:`1430`) from the rounded value
* Plural: Normalize negative inputs in generated JavaScript plural rules by @parijat1222q in :gh:`1414`
* Units: Resolve deprecated short unit identifiers through their replacements by @jdotc1 in :gh:`1408`

Other improvements
~~~~~~~~~~~~~~~~~~

* Core: Cache validity of locale names by @xmo-odoo in :gh:`1254`
* Messages: Speed up MO file writing and PO location lookups by @harshitgupta31415 in :gh:`1376` and :gh:`1389`

Deprecation and compatibility
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* General: Drop support for Python 3.8 by @akx in :gh:`1435`
* Messages: Deprecate the public functions of `babel.messages.jslexer` by @akx in :gh:`1459`

Infrastructure and documentation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* CI: Add a benchmark suite and CodSpeed by @akx in :gh:`1300`
* CI: Add artifact attestations and GitHub draft release creation to the publish workflow by @akx in :gh:`1393`
* CI: Pin all GitHub Actions tools, including first-party ones, by @akx in :gh:`1265`
* CI: Update OS runners and PyPy versions by @tomasr8 in :gh:`1456`, :gh:`1457` and :gh:`1462`
* Docs: Document locale identifier casing and parsing by @himanshu748 in :gh:`1372`
* Docs: Extend the security policy by @akx in :gh:`1349`
* Docs: Improve documentation by @akx in :gh:`1256`
* Docs: Link, markup and typo fixes by @Skytuhua in :gh:`1412`, @tomasr8 in :gh:`1431` and :gh:`1432`, @Vinodkumarreddy178 in :gh:`1477` and @Parsnip37 in :gh:`1481`
* General: Code cleanups by @akx in :gh:`1304` and :gh:`1319`
* General: Remove the License trove classifier by @akx in :gh:`1332`
* General: Switch to PEP 517 build with Hatch by @akx in :gh:`1226`
* General: Test on and declare support for Python 3.15 by @akx in :gh:`1296`
* Tests: Test suite cleanups and fixes by @akx in :gh:`1257`, :gh:`1320` and :gh:`1322`, @denyshon in :gh:`1353` and @tomasr8 in :gh:`1455`

Version 2.18.0
--------------

Expand Down
2 changes: 1 addition & 1 deletion babel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
parse_locale,
)

__version__ = '2.18.0'
__version__ = '2.19.0'

__all__ = [
'Locale',
Expand Down
2 changes: 1 addition & 1 deletion scripts/dump_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion scripts/dump_global.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion scripts/import_cldr.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/frontend/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/frontend/test_compile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/frontend/test_concat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/frontend/test_extract.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/frontend/test_frontend.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/frontend/test_init.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/frontend/test_merge.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/test_catalog.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/test_checkers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/test_extract.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/test_extract_python.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/test_mofile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/test_plurals.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/test_pofile.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/test_pofile_read.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/messages/test_pofile_write.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dates.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/test_localedata.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/test_numbers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/test_numbers_format_decimal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/test_numbers_parsing.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plural.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/test_plural_rule_parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
2 changes: 1 addition & 1 deletion tests/test_util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2007-2011 Edgewall Software, 2013-2025 the Babel team
# Copyright (C) 2007-2011 Edgewall Software, 2013-2026 the Babel team
# All rights reserved.
#
# This software is licensed as described in the file LICENSE, which
Expand Down
Loading