| 1 |
Babel Changelog |
| 2 |
=============== |
| 3 |
|
| 4 |
Version 2.18.0 |
| 5 |
-------------- |
| 6 |
|
| 7 |
Happy 2026! This release is, coincidentally, also being made from FOSDEM. |
| 8 |
|
| 9 |
We will aspire for a slightly less glacial release cadence in this year; |
| 10 |
there are interesting features in the pipeline. |
| 11 |
|
| 12 |
Features |
| 13 |
~~~~~~~~ |
| 14 |
|
| 15 |
* Core: Add `babel.core.get_cldr_version()` by @akx in :gh:`1242` |
| 16 |
* Core: Use CLDR 47 by @tomasr8 in :gh:`1210` |
| 17 |
* Core: Use canonical IANA zone names in zone_territories by @akx in :gh:`1220` |
| 18 |
* Messages: Improve extract performance via ignoring directories early during os.walk by @akx in :gh:`968` |
| 19 |
* Messages: Merge in per-format keywords and auto_comments by @akx in :gh:`1243` |
| 20 |
* Messages: Update keywords for extraction of dpgettext and dnpgettext by @mardiros in :gh:`1235` |
| 21 |
* Messages: Validate all plurals in Python format checker by @tomasr8 in :gh:`1188` |
| 22 |
* Time: Use standard library `timezone` instead of `FixedOffsetTimezone` by @akx in :gh:`1203` |
| 23 |
|
| 24 |
Bugfixes |
| 25 |
~~~~~~~~ |
| 26 |
|
| 27 |
* Core: Fix formatting for "Empty locale identifier" exception added in #1164 by @akx in :gh:`1184` |
| 28 |
* Core: Improve handling of no-inheritance-marker in timezone data by @akx in :gh:`1194` |
| 29 |
* Core: Make the number pattern regular expression more efficient by @akx in :gh:`1213` |
| 30 |
* Messages: Keep translator comments next to the translation function call by @akx in :gh:`1196` |
| 31 |
* Numbers: Fix KeyError that occurred when formatting compact currencies of exactly one thousand in several locales by @bartbroere in :gh:`1246` |
| 32 |
|
| 33 |
Other improvements |
| 34 |
~~~~~~~~~~~~~~~~~~ |
| 35 |
|
| 36 |
* Core: Avoid unnecessary uses of `map()` by @akx in :gh:`1180` |
| 37 |
* Messages: Have init-catalog create directories too by @akx in :gh:`1244` |
| 38 |
* Messages: Optimizations for read_po by @akx in :gh:`1200` |
| 39 |
* Messages: Use pathlib.Path() in catalog frontend; improve test coverage by @akx in :gh:`1204` |
| 40 |
|
| 41 |
|
| 42 |
Infrastructure and documentation |
| 43 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 44 |
|
| 45 |
* CI: Renovate CI & lint tools by @akx in :gh:`1228` |
| 46 |
* CI: Tighten up CI with Zizmor by @akx in :gh:`1230` |
| 47 |
* CI: make job permissions explicit by @akx in :gh:`1227` |
| 48 |
* Docs: Add SECURITY.md by @akx in :gh:`1229` |
| 49 |
* Docs: Remove u string prefix from docs by @verhovsky in :gh:`1174` |
| 50 |
* Docs: Update dates.rst with current unicode.org tr35 link by @clach04 in :gh:`1189` |
| 51 |
* General: Add some PyPI classifiers by @tomasr8 in :gh:`1186` |
| 52 |
* General: Apply reformatting by hand and with Ruff by @akx in :gh:`1202` |
| 53 |
* General: Test on and declare support for Python 3.14 by @akx in :gh:`1233` |
| 54 |
* Tests: Convert Unittest testcases with setup/teardown to fixtures by @akx in :gh:`1240` |
| 55 |
* Tests: Mark PyPy CI flake as xfail by @akx in :gh:`1197` |
| 56 |
* Tests: Move pytest config to `pyproject.toml` by @tomasr8 in :gh:`1187` |
| 57 |
* Tests: Unwrap most `unittest` test cases to bare functions by @akx in :gh:`1241` |
| 58 |
|
| 59 |
Version 2.17.0 |
| 60 |
-------------- |
| 61 |
|
| 62 |
Happy 2025! This release is being made from FOSDEM 2025, in Brussels, Belgium. |
| 63 |
|
| 64 |
Thank you to all contributors, new and old, |
| 65 |
and here's to another great year of internationalization and localization! |
| 66 |
|
| 67 |
Features |
| 68 |
~~~~~~~~ |
| 69 |
|
| 70 |
* CLDR: Babel now uses CLDR 46, by @tomasr8 in :gh:`1145` |
| 71 |
* Dates: Allow specifying an explicit format in parse_date/parse_time by @tomasr8 in :gh:`1131` |
| 72 |
* Dates: More alternate characters are now supported by `format_skeleton`. By @tomasr8 in :gh:`1122` |
| 73 |
* Dates: Support short and narrow formats for format_timedelta when using `add_direction`, by @akx in :gh:`1163` |
| 74 |
* Messages: .po files now enclose white spaces in filenames like GNU gettext does. By @Dunedan in :gh:`1105`, and @tomasr8 in :gh:`1120` |
| 75 |
* Messages: Initial support for `Message.python_brace_format`, by @tomasr8 in :gh:`1169` |
| 76 |
* Numbers: LC_MONETARY is now preferred when formatting currencies, by @akx in :gh:`1173` |
| 77 |
|
| 78 |
Bugfixes |
| 79 |
~~~~~~~~ |
| 80 |
|
| 81 |
* Dates: Make seconds optional in `parse_time` time formats by @tomasr8 in :gh:`1141` |
| 82 |
* Dates: Replace `str.index` with `str.find` by @tomasr8 in :gh:`1130` |
| 83 |
* Dates: Strip extra leading slashes in `/etc/localtime` by @akx in :gh:`1165` |
| 84 |
* Dates: Week numbering and formatting of dates with week numbers was repaired by @jun66j5 in :gh:`1179` |
| 85 |
* General: Improve handling for `locale=None` by @akx in :gh:`1164` |
| 86 |
* General: Remove redundant assignment in `Catalog.__setitem__` by @tomasr8 in :gh:`1167` |
| 87 |
* Messages: Fix extracted lineno with nested calls, by @dylankiss in :gh:`1126` |
| 88 |
* Messages: Fix of list index out of range when translations is empty, by @gabe-sherman in :gh:`1135` |
| 89 |
* Messages: Fix the way obsolete messages are stored by @tomasr8 in :gh:`1132` |
| 90 |
* Messages: Simplify `read_mo` logic regarding `catalog.charset` by @tomasr8 in :gh:`1148` |
| 91 |
* Messages: Use the first matching method & options, rather than first matching method & last options, by @jpmckinney in :gh:`1121` |
| 92 |
|
| 93 |
Deprecation and compatibility |
| 94 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 95 |
|
| 96 |
* Dates: Fix deprecation warnings for `datetime.utcnow()` by @tomasr8 in :gh:`1119` |
| 97 |
* Docs: Adjust docs/conf.py to add compatibility with sphinx 8 by @hrnciar in :gh:`1155` |
| 98 |
* General: Import `Literal` from the typing module by @tomasr8 in :gh:`1175` |
| 99 |
* General: Replace `OrderedDict` with just `dict` by @tomasr8 in :gh:`1149` |
| 100 |
* Messages: Mark `wraptext` deprecated; use `TextWrapper` directly in `write_po` by @akx in :gh:`1140` |
| 101 |
|
| 102 |
Infrastructure |
| 103 |
~~~~~~~~~~~~~~ |
| 104 |
|
| 105 |
* Add tzdata as dev dependency and sync with tox.ini by @wandrew004 in :gh:`1159` |
| 106 |
* Duplicate test code was deleted by @mattdiaz007 in :gh:`1138` |
| 107 |
* Increase test coverage of the `python_format` checker by @tomasr8 in :gh:`1176` |
| 108 |
* Small cleanups by @akx in :gh:`1160`, :gh:`1166`, :gh:`1170` and :gh:`1172` |
| 109 |
* Update CI to use python 3.13 and Ubuntu 24.04 by @tomasr8 in :gh:`1153` |
| 110 |
|
| 111 |
Version 2.16.0 |
| 112 |
-------------- |
| 113 |
|
| 114 |
Features |
| 115 |
~~~~~~~~ |
| 116 |
|
| 117 |
* CLDR: Upgrade to CLDR 45 by @tomasr8 in :gh:`1077` |
| 118 |
* Lists: Support list format fallbacks by @akx in :gh:`1099` |
| 119 |
* Messages: Initial support for reading mapping configuration as TOML by @akx in :gh:`1108` |
| 120 |
|
| 121 |
Bugfixes |
| 122 |
~~~~~~~~ |
| 123 |
|
| 124 |
* CLDR: Do not allow substituting alternates or drafts in derived locales by @akx in :gh:`1113` |
| 125 |
* Core: Allow falling back to modifier-less locale data by @akx in :gh:`1104` |
| 126 |
* Core: Allow use of importlib.metadata for finding entrypoints by @akx in :gh:`1102` |
| 127 |
* Dates: Avoid crashing on importing localtime when TZ is malformed by @akx in :gh:`1100` |
| 128 |
* Messages: Allow parsing .po files that have an extant but empty Language header by @akx in :gh:`1101` |
| 129 |
* Messages: Fix ``--ignore-dirs`` being incorrectly read (#1094) by @john-psina and @Edwin18 in :gh:`1052` and :gh:`1095` |
| 130 |
* Messages: Make pgettext search plurals when translation is not found by @tomasr8 in :gh:`1085` |
| 131 |
|
| 132 |
Infrastructure |
| 133 |
~~~~~~~~~~~~~~ |
| 134 |
|
| 135 |
* Replace deprecated `ast.Str` with `ast.Constant` by @tomasr8 in :gh:`1083` |
| 136 |
* CI fixes by @akx in :gh:`1080`, :gh:`1097`, :gh:`1103`, :gh:`1107` |
| 137 |
* Test on Python 3.13 beta releases by @akx in |
| 138 |
* Normalize package name to lower-case in setup.py by @akx in :gh:`1110` |
| 139 |
|
| 140 |
Documentation |
| 141 |
~~~~~~~~~~~~~ |
| 142 |
|
| 143 |
* Add a mention to the docs that `format_skeleton(..., fuzzy=True)` may raise by @tomasr8 in :gh:`1106` |
| 144 |
* Two hyperlinks (to CLDR) and some typos by @buhtz in :gh:`1115` |
| 145 |
|
| 146 |
|
| 147 |
Version 2.15.0 |
| 148 |
-------------- |
| 149 |
|
| 150 |
Python version support |
| 151 |
~~~~~~~~~~~~~~~~~~~~~~ |
| 152 |
|
| 153 |
* Babel 2.15.0 will require Python 3.8 or newer. (:gh:`1048`) |
| 154 |
|
| 155 |
Features |
| 156 |
~~~~~~~~ |
| 157 |
|
| 158 |
* CLDR: Upgrade to CLDR 44 (:gh:`1071`) (@akx) |
| 159 |
* Dates: Support for the "fall back to short format" logic for time delta formatting (:gh:`1075`) (@akx) |
| 160 |
* Message: More versatile .po IO functions (:gh:`1068`) (@akx) |
| 161 |
* Numbers: Improved support for alternate spaces when parsing numbers (:gh:`1007`) (@ronnix's first contribution) |
| 162 |
|
| 163 |
Infrastructure |
| 164 |
~~~~~~~~~~~~~~ |
| 165 |
|
| 166 |
* Upgrade GitHub Actions (:gh:`1054`) (@cclauss's first contribution) |
| 167 |
* The Unicode license is now included in `locale-data` and in the documentation (:gh:`1074`) (@akx) |
| 168 |
|
| 169 |
Version 2.14.0 |
| 170 |
-------------- |
| 171 |
|
| 172 |
Upcoming deprecation |
| 173 |
~~~~~~~~~~~~~~~~~~~~ |
| 174 |
|
| 175 |
* This version, Babel 2.14, is the last version of Babel to support Python 3.7. |
| 176 |
Babel 2.15 will require Python 3.8 or newer. |
| 177 |
* We had previously announced Babel 2.13 to have been the last version to support |
| 178 |
Python 3.7, but being able to use CLDR 43 with Python 3.7 was deemed important |
| 179 |
enough to keep supporting the EOL Python version for one more release. |
| 180 |
|
| 181 |
Possibly backwards incompatible changes |
| 182 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 183 |
|
| 184 |
* ``Locale.number_symbols`` will now have first-level keys for each numbering system. |
| 185 |
Since the implicit default numbering system still is ``"latn"``, what had previously |
| 186 |
been e.g. ``Locale.number_symbols['decimal']`` is now ``Locale.number_symbols['latn']['decimal']``. |
| 187 |
* Babel no longer directly depends on either ``distutils`` or ``setuptools``; if you had been |
| 188 |
using the Babel setuptools command extensions, you would need to explicitly depend on ``setuptools`` – |
| 189 |
though given you're running ``setup.py`` you probably already do. |
| 190 |
|
| 191 |
Features |
| 192 |
~~~~~~~~ |
| 193 |
|
| 194 |
* CLDR/Numbers: Add support of local numbering systems for number symbols by @kajte in :gh:`1036` |
| 195 |
* CLDR: Upgrade to CLDR 43 by @rix0rrr in :gh:`1043` |
| 196 |
* Frontend: Allow last_translator to be passed as an option to extract_message by @AivGitHub in :gh:`1044` |
| 197 |
* Frontend: Decouple `pybabel` CLI frontend from distutils/setuptools by @akx in :gh:`1041` |
| 198 |
* Numbers: Improve parsing of malformed decimals by @Olunusib and @akx in :gh:`1042` |
| 199 |
|
| 200 |
Infrastructure |
| 201 |
~~~~~~~~~~~~~~ |
| 202 |
|
| 203 |
* Enforce trailing commas (enable Ruff COM rule and autofix) by @akx in :gh:`1045` |
| 204 |
* CI: use GitHub output formats by @akx in :gh:`1046` |
| 205 |
|
| 206 |
Version 2.13.1 |
| 207 |
-------------- |
| 208 |
|
| 209 |
This is a patch release to fix a few bugs. |
| 210 |
|
| 211 |
Fixes |
| 212 |
~~~~~ |
| 213 |
|
| 214 |
* Fix a typo in ``_locales_to_names`` by @Dl84 in :gh:`1038` (issue :gh:`1037`) |
| 215 |
* Fix ``setuptools`` dependency for Python 3.12 by @opryprin in :gh:`1033` |
| 216 |
|
| 217 |
Version 2.13.0 |
| 218 |
-------------- |
| 219 |
|
| 220 |
Upcoming deprecation (reverted) |
| 221 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 222 |
|
| 223 |
* It was previously announced that this version, Babel 2.13, would be the last version of |
| 224 |
Babel to support Python 3.7. Babel 2.14 will still support Python 3.7. |
| 225 |
|
| 226 |
Features |
| 227 |
~~~~~~~~ |
| 228 |
|
| 229 |
* Add flag to ignore POT-Creation-Date for updates by @joeportela in :gh:`999` |
| 230 |
* Support 't' specifier in keywords by @jeanas in :gh:`1015` |
| 231 |
* Add f-string parsing for Python 3.12 (PEP 701) by @encukou in :gh:`1027` |
| 232 |
|
| 233 |
Fixes |
| 234 |
~~~~~ |
| 235 |
|
| 236 |
* Various typing-related fixes by @akx in :gh:`979`, in :gh:`978`, :gh:`981`, :gh:`983` |
| 237 |
* babel.messages.catalog: deduplicate _to_fuzzy_match_key logic by @akx in :gh:`980` |
| 238 |
* Freeze format_time() tests to a specific date to fix test failures by @mgorny in :gh:`998` |
| 239 |
* Spelling and grammar fixes by @scop in :gh:`1008` |
| 240 |
* Renovate lint tools by @akx in :gh:`1017`, :gh:`1028` |
| 241 |
* Use SPDX license identifier by @vargenau in :gh:`994` |
| 242 |
* Use aware UTC datetimes internally by @scop in :gh:`1009` |
| 243 |
|
| 244 |
New Contributors |
| 245 |
~~~~~~~~~~~~~~~~ |
| 246 |
|
| 247 |
* @mgorny made their first contribution in :gh:`998` |
| 248 |
* @vargenau made their first contribution in :gh:`994` |
| 249 |
* @joeportela made their first contribution in :gh:`999` |
| 250 |
* @encukou made their first contribution in :gh:`1027` |
| 251 |
|
| 252 |
Version 2.12.1 |
| 253 |
-------------- |
| 254 |
|
| 255 |
Fixes |
| 256 |
~~~~~ |
| 257 |
|
| 258 |
* Version 2.12.0 was missing the ``py.typed`` marker file. Thanks to Alex Waygood for the fix! :gh:`975` |
| 259 |
* The copyright year in all files was bumped to 2023. |
| 260 |
|
| 261 |
Version 2.12.0 |
| 262 |
-------------- |
| 263 |
|
| 264 |
Deprecations & breaking changes |
| 265 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 266 |
|
| 267 |
* Python 3.6 is no longer supported (:gh:`919`) - Aarni Koskela |
| 268 |
* The `get_next_timezone_transition` function is no more (:gh:`958`) - Aarni Koskela |
| 269 |
* `Locale.parse()` will no longer return `None`; it will always return a Locale or raise an exception. |
| 270 |
Passing in `None`, though technically allowed by the typing, will raise. (:gh:`966`) |
| 271 |
|
| 272 |
New features |
| 273 |
~~~~~~~~~~~~ |
| 274 |
|
| 275 |
* CLDR: Babel now uses CLDR 42 (:gh:`951`) - Aarni Koskela |
| 276 |
* Dates: `pytz` is now optional; Babel will prefer it but will use `zoneinfo` when available. (:gh:`940`) - @ds-cbo |
| 277 |
* General: Babel now ships type annotations, thanks to Jonah Lawrence's work in multiple PRs. |
| 278 |
* Locales: @modifiers are now retained when parsing locales (:gh:`947`) - martin f. krafft |
| 279 |
* Messages: JavaScript template string expression extraction is now smarter. (:gh:`939`) - Johannes Wilm |
| 280 |
* Numbers: NaN and Infinity are now better supported (:gh:`955`) - Jonah Lawrence |
| 281 |
* Numbers: Short compact currency formats are now supported (:gh:`926`) - Jonah Lawrence |
| 282 |
* Numbers: There's now a `Format.compact_decimal` utility function. (:gh:`921`) - Jonah Lawrence |
| 283 |
|
| 284 |
Bugfixes |
| 285 |
~~~~~~~~ |
| 286 |
|
| 287 |
* Dates: The cache for parsed datetime patterns is now bounded (:gh:`967`) - Aarni Koskela |
| 288 |
* Messages: Fuzzy candidate matching accuracy is improved (:gh:`970`) - Jean Abou Samra |
| 289 |
* Numbers: Compact singular formats and patterns with no numbers work correctly (:gh:`930`, :gh:`932`) - Jonah Lawrence, Jun Omae |
| 290 |
|
| 291 |
Improvements & cleanup |
| 292 |
~~~~~~~~~~~~~~~~~~~~~~ |
| 293 |
|
| 294 |
* Dates: `babel.dates.UTC` is now an alias for `datetime.timezone.utc` (:gh:`957`) - Aarni Koskela |
| 295 |
* Dates: `babel.localtime` was slightly cleaned up. (:gh:`952`) - Aarni Koskela |
| 296 |
* Documentation: Documentation was improved by Maciej Olko, Jonah Lawrence, lilinjie, and Aarni Koskela. |
| 297 |
* Infrastructure: Babel is now being linted with pre-commit and ruff. - Aarni Koskela |
| 298 |
|
| 299 |
Version 2.11.0 |
| 300 |
-------------- |
| 301 |
|
| 302 |
Upcoming deprecation |
| 303 |
~~~~~~~~~~~~~~~~~~~~ |
| 304 |
|
| 305 |
* This version, Babel 2.11, is the last version of Babel to support Python 3.6. |
| 306 |
Babel 2.12 will require Python 3.7 or newer. |
| 307 |
|
| 308 |
Improvements |
| 309 |
~~~~~~~~~~~~ |
| 310 |
|
| 311 |
* Support for hex escapes in JavaScript string literals :gh:`877` - Przemyslaw Wegrzyn |
| 312 |
* Add support for formatting decimals in compact form :gh:`909` - Jonah Lawrence |
| 313 |
* Adapt parse_date to handle ISO dates in ASCII format :gh:`842` - Eric L. |
| 314 |
* Use `ast` instead of `eval` for Python string extraction :gh:`915` - Aarni Koskela |
| 315 |
* This also enables extraction from static f-strings. |
| 316 |
F-strings with expressions are silently ignored (but won't raise an error as they used to). |
| 317 |
|
| 318 |
Infrastructure |
| 319 |
~~~~~~~~~~~~~~ |
| 320 |
|
| 321 |
* Tests: Use regular asserts and ``pytest.raises()`` :gh:`875` – Aarni Koskela |
| 322 |
* Wheels are now built in GitHub Actions :gh:`888` – Aarni Koskela |
| 323 |
* Small improvements to the CLDR downloader script :gh:`894` – Aarni Koskela |
| 324 |
* Remove antiquated `__nonzero__` methods :gh:`896` - Nikita Sobolev |
| 325 |
* Remove superfluous `__unicode__` declarations :gh:`905` - Lukas Juhrich |
| 326 |
* Mark package compatible with Python 3.11 :gh:`913` - Aarni Koskela |
| 327 |
* Quiesce pytest warnings :gh:`916` - Aarni Koskela |
| 328 |
|
| 329 |
Bugfixes |
| 330 |
~~~~~~~~ |
| 331 |
|
| 332 |
* Use email.Message for pofile header parsing instead of the deprecated ``cgi.parse_header`` function. :gh:`876` – Aarni Koskela |
| 333 |
* Remove determining time zone via systemsetup on macOS :gh:`914` - Aarni Koskela |
| 334 |
|
| 335 |
Documentation |
| 336 |
~~~~~~~~~~~~~ |
| 337 |
|
| 338 |
* Update Python versions in documentation :gh:`898` - Raphael Nestler |
| 339 |
* Align BSD-3 license with OSI template :gh:`912` - Lukas Kahwe Smith |
| 340 |
|
| 341 |
Version 2.10.3 |
| 342 |
-------------- |
| 343 |
|
| 344 |
This is a bugfix release for Babel 2.10.2, which was mistakenly packaged with outdated locale data. |
| 345 |
|
| 346 |
Thanks to Michał Górny for pointing this out and Jun Omae for verifying. |
| 347 |
|
| 348 |
This and future Babel PyPI packages will be built by a more automated process, |
| 349 |
which should make problems like this less likely to occur. |
| 350 |
|
| 351 |
Version 2.10.2 |
| 352 |
-------------- |
| 353 |
|
| 354 |
This is a bugfix release for Babel 2.10.1. |
| 355 |
|
| 356 |
* Fallback count="other" format in format_currency() (:gh:`872`) - Jun Omae |
| 357 |
* Fix get_period_id() with ``dayPeriodRule`` across 0:00 (:gh:`871`) - Jun Omae |
| 358 |
* Add support for ``b`` and ``B`` period symbols in time format (:gh:`869`) - Jun Omae |
| 359 |
* chore(docs/typo): Fixes a minor typo in a function comment (:gh:`864`) - Frank Harrison |
| 360 |
|
| 361 |
Version 2.10.1 |
| 362 |
-------------- |
| 363 |
|
| 364 |
This is a bugfix release for Babel 2.10.0. |
| 365 |
|
| 366 |
* Messages: Fix ``distutils`` import. Regressed in :gh:`843`. (:gh:`852`) - Nehal J Wani |
| 367 |
* The wheel file is no longer marked as universal, since Babel only supports Python 3. |
| 368 |
|
| 369 |
Version 2.10.0 |
| 370 |
-------------- |
| 371 |
|
| 372 |
Upcoming deprecation |
| 373 |
~~~~~~~~~~~~~~~~~~~~ |
| 374 |
|
| 375 |
* The ``get_next_timezone_transition()`` function is marked deprecated in this version and will be removed |
| 376 |
likely as soon as Babel 2.11. No replacement for this function is planned; based on discussion in |
| 377 |
:gh:`716`, it's likely the function is not used in any real code. (:gh:`852`) - Aarni Koskela, Paul Ganssle |
| 378 |
|
| 379 |
Improvements |
| 380 |
~~~~~~~~~~~~ |
| 381 |
|
| 382 |
* CLDR: Upgrade to CLDR 41.0. (:gh:`853`) - Aarni Koskela |
| 383 |
|
| 384 |
* The ``c`` and ``e`` plural form operands introduced in CLDR 40 are parsed, but otherwise unsupported. (:gh:`826`) |
| 385 |
* Non-nominative forms of units are currently ignored. |
| 386 |
|
| 387 |
* Messages: Implement ``--init-missing`` option for ``pybabel update`` (:gh:`785`) - ruro |
| 388 |
* Messages: For ``extract``, you can now replace the built-in ``.*`` / ``_*`` ignored directory patterns |
| 389 |
with ones of your own. (:gh:`832`) - Aarni Koskela, Kinshuk Dua |
| 390 |
* Messages: Add ``--check`` to verify if catalogs are up-to-date (:gh:`831`) - Krzysztof Jagiełło |
| 391 |
* Messages: Add ``--header-comment`` to override default header comment (:gh:`720`) - Mohamed Hafez Morsy, Aarni Koskela |
| 392 |
* Dates: ``parse_time`` now supports 12-hour clock, and is better at parsing partial times. |
| 393 |
(:gh:`834`) - Aarni Koskela, David Bauer, Arthur Jovart |
| 394 |
* Dates: ``parse_date`` and ``parse_time`` now raise ``ParseError``, a subclass of ``ValueError``, in certain cases. |
| 395 |
(:gh:`834`) - Aarni Koskela |
| 396 |
* Dates: ``parse_date`` and ``parse_time`` now accept the ``format`` parameter. |
| 397 |
(:gh:`834`) - Juliette Monsel, Aarni Koskela |
| 398 |
|
| 399 |
Infrastructure |
| 400 |
~~~~~~~~~~~~~~ |
| 401 |
|
| 402 |
* The internal ``babel/_compat.py`` module is no more (:gh:`808`) - Hugo van Kemenade |
| 403 |
* Python 3.10 is officially supported (:gh:`809`) - Hugo van Kemenade |
| 404 |
* There's now a friendly GitHub issue template. (:gh:`800`) – Álvaro Mondéjar Rubio |
| 405 |
* Don't use the deprecated format_number function internally or in tests - Aarni Koskela |
| 406 |
* Add GitHub URL for PyPi (:gh:`846`) - Andrii Oriekhov |
| 407 |
* Python 3.12 compatibility: Prefer setuptools imports to distutils imports (:gh:`843`) - Aarni Koskela |
| 408 |
* Python 3.11 compatibility: Add deprecations to l*gettext variants (:gh:`835`) - Aarni Koskela |
| 409 |
* CI: Babel is now tested with PyPy 3.7. (:gh:`851`) - Aarni Koskela |
| 410 |
|
| 411 |
Bugfixes |
| 412 |
~~~~~~~~ |
| 413 |
|
| 414 |
* Date formatting: Allow using ``other`` as fallback form (:gh:`827`) - Aarni Koskela |
| 415 |
* Locales: ``Locale.parse()`` normalizes variant tags to upper case (:gh:`829`) - Aarni Koskela |
| 416 |
* A typo in the plural format for Maltese is fixed. (:gh:`796`) - Lukas Winkler |
| 417 |
* Messages: Catalog date parsing is now timezone independent. (:gh:`701`) - rachele-collin |
| 418 |
* Messages: Fix duplicate locations when writing without lineno (:gh:`837`) - Sigurd Ljødal |
| 419 |
* Messages: Fix missing trailing semicolon in plural form headers (:gh:`848`) - farhan5900 |
| 420 |
* CLI: Fix output of ``--list-locales`` to not be a bytes repr (:gh:`845`) - Morgan Wahl |
| 421 |
|
| 422 |
Documentation |
| 423 |
~~~~~~~~~~~~~ |
| 424 |
|
| 425 |
* Documentation is now correctly built again, and up to date (:gh:`830`) - Aarni Koskela |
| 426 |
|
| 427 |
|
| 428 |
Version 2.9.1 |
| 429 |
------------- |
| 430 |
|
| 431 |
Bugfixes |
| 432 |
~~~~~~~~ |
| 433 |
|
| 434 |
* The internal locale-data loading functions now validate the name of the locale file to be loaded and only |
| 435 |
allow files within Babel's data directory. Thank you to Chris Lyne of Tenable, Inc. for discovering the issue! |
| 436 |
|
| 437 |
Version 2.9.0 |
| 438 |
------------- |
| 439 |
|
| 440 |
Upcoming version support changes |
| 441 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 442 |
|
| 443 |
* This version, Babel 2.9, is the last version of Babel to support Python 2.7, Python 3.4, and Python 3.5. |
| 444 |
|
| 445 |
Improvements |
| 446 |
~~~~~~~~~~~~ |
| 447 |
|
| 448 |
* CLDR: Use CLDR 37 – Aarni Koskela (:gh:`734`) |
| 449 |
* Dates: Handle ZoneInfo objects in get_timezone_location, get_timezone_name - Alessio Bogon (:gh:`741`) |
| 450 |
* Numbers: Add group_separator feature in number formatting - Abdullah Javed Nesar (:gh:`726`) |
| 451 |
|
| 452 |
Bugfixes |
| 453 |
~~~~~~~~ |
| 454 |
|
| 455 |
* Dates: Correct default Format().timedelta format to 'long' to mute deprecation warnings – Aarni Koskela |
| 456 |
* Import: Simplify iteration code in "import_cldr.py" – Felix Schwarz |
| 457 |
* Import: Stop using deprecated ElementTree methods "getchildren()" and "getiterator()" – Felix Schwarz |
| 458 |
* Messages: Fix unicode printing error on Python 2 without TTY. – Niklas Hambüchen |
| 459 |
* Messages: Introduce invariant that _invalid_pofile() takes unicode line. – Niklas Hambüchen |
| 460 |
* Tests: fix tests when using Python 3.9 – Felix Schwarz |
| 461 |
* Tests: Remove deprecated 'sudo: false' from Travis configuration – Jon Dufresne |
| 462 |
* Tests: Support Py.test 6.x – Aarni Koskela |
| 463 |
* Utilities: LazyProxy: Handle AttributeError in specified func – Nikiforov Konstantin (:gh:`724`) |
| 464 |
* Utilities: Replace usage of parser.suite with ast.parse – Miro Hrončok |
| 465 |
|
| 466 |
Documentation |
| 467 |
~~~~~~~~~~~~~ |
| 468 |
|
| 469 |
* Update parse_number comments – Brad Martin (:gh:`708`) |
| 470 |
* Add __iter__ to Catalog documentation – @CyanNani123 |
| 471 |
|
| 472 |
Version 2.8.1 |
| 473 |
------------- |
| 474 |
|
| 475 |
This is solely a patch release to make running tests on Py.test 6+ possible. |
| 476 |
|
| 477 |
Bugfixes |
| 478 |
~~~~~~~~ |
| 479 |
|
| 480 |
* Support Py.test 6 - Aarni Koskela (:gh:`747`, :gh:`750`, :gh:`752`) |
| 481 |
|
| 482 |
Version 2.8.0 |
| 483 |
------------- |
| 484 |
|
| 485 |
Improvements |
| 486 |
~~~~~~~~~~~~ |
| 487 |
|
| 488 |
* CLDR: Upgrade to CLDR 36.0 - Aarni Koskela (:gh:`679`) |
| 489 |
* Messages: Don't even open files with the "ignore" extraction method - @sebleblanc (:gh:`678`) |
| 490 |
|
| 491 |
Bugfixes |
| 492 |
~~~~~~~~ |
| 493 |
|
| 494 |
* Numbers: Fix formatting very small decimals when quantization is disabled - Lev Lybin, @miluChen (:gh:`662`) |
| 495 |
* Messages: Attempt to sort all messages – Mario Frasca (:gh:`651`, :gh:`606`) |
| 496 |
|
| 497 |
Docs |
| 498 |
~~~~ |
| 499 |
|
| 500 |
* Add years to changelog - Romuald Brunet |
| 501 |
* Note that installation requires pytz - Steve (Gadget) Barnes |
| 502 |
|
| 503 |
Version 2.7.0 |
| 504 |
------------- |
| 505 |
|
| 506 |
Possibly incompatible changes |
| 507 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 508 |
|
| 509 |
These may be backward incompatible in some cases, as some more-or-less internal |
| 510 |
APIs have changed. Please feel free to file issues if you bump into anything |
| 511 |
strange and we'll try to help! |
| 512 |
|
| 513 |
* General: Internal uses of ``babel.util.odict`` have been replaced with |
| 514 |
``collections.OrderedDict`` from The Python standard library. |
| 515 |
|
| 516 |
Improvements |
| 517 |
~~~~~~~~~~~~ |
| 518 |
|
| 519 |
* CLDR: Upgrade to CLDR 35.1 - Alberto Mardegan, Aarni Koskela (:gh:`626`, :gh:`643`) |
| 520 |
* General: allow anchoring path patterns to the start of a string - Brian Cappello (:gh:`600`) |
| 521 |
* General: Bumped version requirement on pytz - @chrisbrake (:gh:`592`) |
| 522 |
* Messages: `pybabel compile`: exit with code 1 if errors were encountered - Aarni Koskela (:gh:`647`) |
| 523 |
* Messages: Add omit-header to update_catalog - Cédric Krier (:gh:`633`) |
| 524 |
* Messages: Catalog update: keep user comments from destination by default - Aarni Koskela (:gh:`648`) |
| 525 |
* Messages: Skip empty message when writing mo file - Cédric Krier (:gh:`564`) |
| 526 |
* Messages: Small fixes to avoid crashes on badly formatted .po files - Bryn Truscott (:gh:`597`) |
| 527 |
* Numbers: `parse_decimal()` `strict` argument and `suggestions` - Charly C (:gh:`590`) |
| 528 |
* Numbers: don't repeat suggestions in parse_decimal strict - Serban Constantin (:gh:`599`) |
| 529 |
* Numbers: implement currency formatting with long display names - Luke Plant (:gh:`585`) |
| 530 |
* Numbers: parse_decimal(): assume spaces are equivalent to non-breaking spaces when not in strict mode - Aarni Koskela (:gh:`649`) |
| 531 |
* Performance: Cache locale_identifiers() - Aarni Koskela (:gh:`644`) |
| 532 |
|
| 533 |
Bugfixes |
| 534 |
~~~~~~~~ |
| 535 |
|
| 536 |
* CLDR: Skip alt=... for week data (minDays, firstDay, weekendStart, weekendEnd) - Aarni Koskela (:gh:`634`) |
| 537 |
* Dates: Fix wrong weeknumber for 31.12.2018 - BT-sschmid (:gh:`621`) |
| 538 |
* Locale: Avoid KeyError trying to get data on WindowsXP - mondeja (:gh:`604`) |
| 539 |
* Locale: get_display_name(): Don't attempt to concatenate variant information to None - Aarni Koskela (:gh:`645`) |
| 540 |
* Messages: pofile: Add comparison operators to _NormalizedString - Aarni Koskela (:gh:`646`) |
| 541 |
* Messages: pofile: don't crash when message.locations can't be sorted - Aarni Koskela (:gh:`646`) |
| 542 |
|
| 543 |
Tooling & docs |
| 544 |
~~~~~~~~~~~~~~ |
| 545 |
|
| 546 |
* Docs: Remove all references to deprecated easy_install - Jon Dufresne (:gh:`610`) |
| 547 |
* Docs: Switch print statement in docs to print function - NotAFile |
| 548 |
* Docs: Update all pypi.python.org URLs to pypi.org - Jon Dufresne (:gh:`587`) |
| 549 |
* Docs: Use https URLs throughout project where available - Jon Dufresne (:gh:`588`) |
| 550 |
* Support: Add testing and document support for Python 3.7 - Jon Dufresne (:gh:`611`) |
| 551 |
* Support: Test on Python 3.8-dev - Aarni Koskela (:gh:`642`) |
| 552 |
* Support: Using ABCs from collections instead of collections.abc is deprecated. - Julien Palard (:gh:`609`) |
| 553 |
* Tests: Fix conftest.py compatibility with pytest 4.3 - Miro Hrončok (:gh:`635`) |
| 554 |
* Tests: Update pytest and pytest-cov - Miro Hrončok (:gh:`635`) |
| 555 |
|
| 556 |
Version 2.6.0 |
| 557 |
------------- |
| 558 |
|
| 559 |
Possibly incompatible changes |
| 560 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 561 |
|
| 562 |
These may be backward incompatible in some cases, as some more-or-less internal APIs have changed. |
| 563 |
Please feel free to file issues if you bump into anything strange and we'll try to help! |
| 564 |
|
| 565 |
* Numbers: Refactor decimal handling code and allow bypass of decimal quantization. (@kdeldycke) (PR :gh:`538`) |
| 566 |
* Messages: allow processing files that are in locales unknown to Babel (@akx) (PR :gh:`557`) |
| 567 |
* General: Drop support for EOL Python 2.6 and 3.3 (@hugovk) (PR :gh:`546`) |
| 568 |
|
| 569 |
Other changes |
| 570 |
~~~~~~~~~~~~~ |
| 571 |
|
| 572 |
* CLDR: Use CLDR 33 (@akx) (PR :gh:`581`) |
| 573 |
* Lists: Add support for various list styles other than the default (@akx) (:gh:`552`) |
| 574 |
* Messages: Add new PoFileError exception (@Bedrock02) (PR :gh:`532`) |
| 575 |
* Times: Simplify Linux distro specific explicit timezone setting search (@scop) (PR :gh:`528`) |
| 576 |
|
| 577 |
Bugfixes |
| 578 |
~~~~~~~~ |
| 579 |
|
| 580 |
* CLDR: avoid importing alt=narrow currency symbols (@akx) (PR :gh:`558`) |
| 581 |
* CLDR: ignore non-Latin numbering systems (@akx) (PR :gh:`579`) |
| 582 |
* Docs: Fix improper example for date formatting (@PTrottier) (PR :gh:`574`) |
| 583 |
* Tooling: Fix some deprecation warnings (@akx) (PR :gh:`580`) |
| 584 |
|
| 585 |
Tooling & docs |
| 586 |
~~~~~~~~~~~~~~ |
| 587 |
|
| 588 |
* Add explicit signatures to some date autofunctions (@xmo-odoo) (PR :gh:`554`) |
| 589 |
* Include license file in the generated wheel package (@jdufresne) (PR :gh:`539`) |
| 590 |
* Python 3.6 invalid escape sequence deprecation fixes (@scop) (PR :gh:`528`) |
| 591 |
* Test and document all supported Python versions (@jdufresne) (PR :gh:`540`) |
| 592 |
* Update copyright header years and authors file (@akx) (PR :gh:`559`) |
| 593 |
|
| 594 |
|
| 595 |
Version 2.5.3 |
| 596 |
------------- |
| 597 |
|
| 598 |
This is a maintenance release that reverts undesired API-breaking changes that slipped into 2.5.2 |
| 599 |
(see :gh:`550`). |
| 600 |
|
| 601 |
It is based on v2.5.1 (f29eccd) with commits 7cedb84, 29da2d2 and edfb518 cherry-picked on top. |
| 602 |
|
| 603 |
Version 2.5.2 |
| 604 |
------------- |
| 605 |
|
| 606 |
Bugfixes |
| 607 |
~~~~~~~~ |
| 608 |
|
| 609 |
* Revert the unnecessary PyInstaller fixes from 2.5.0 and 2.5.1 (:gh:`533`) (@yagebu) |
| 610 |
|
| 611 |
Version 2.5.1 |
| 612 |
------------- |
| 613 |
|
| 614 |
Minor Improvements and bugfixes |
| 615 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 616 |
|
| 617 |
* Use a fixed datetime to avoid test failures (:gh:`520`) (@narendravardi) |
| 618 |
* Parse multi-line __future__ imports better (:gh:`519`) (@akx) |
| 619 |
* Fix validate_currency docstring (:gh:`522`) |
| 620 |
* Allow normalize_locale and exists to handle various unexpected inputs (:gh:`523`) (@suhojm) |
| 621 |
* Make PyInstaller support more robust (:gh:`525`, :gh:`526`) (@thijstriemstra, @akx) |
| 622 |
|
| 623 |
|
| 624 |
Version 2.5.0 |
| 625 |
------------- |
| 626 |
|
| 627 |
New Features |
| 628 |
~~~~~~~~~~~~ |
| 629 |
|
| 630 |
* Numbers: Add currency utilities and helpers (:gh:`491`) (@kdeldycke) |
| 631 |
* Support PyInstaller (:gh:`500`, :gh:`505`) (@wodo) |
| 632 |
|
| 633 |
Minor Improvements and bugfixes |
| 634 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 635 |
|
| 636 |
* Dates: Add __str__ to DateTimePattern (:gh:`515`) (@sfermigier) |
| 637 |
* Dates: Fix an invalid string to bytes comparison when parsing TZ files on Py3 (:gh:`498`) (@rowillia) |
| 638 |
* Dates: Formatting zero-padded components of dates is faster (:gh:`517`) (@akx) |
| 639 |
* Documentation: Fix "Good Commits" link in CONTRIBUTING.md (:gh:`511`) (@naryanacharya6) |
| 640 |
* Documentation: Fix link to Python gettext module (:gh:`512`) (@Linkid) |
| 641 |
* Messages: Allow both dash and underscore separated locale identifiers in pofiles (:gh:`489`, :gh:`490`) (@akx) |
| 642 |
* Messages: Extract Python messages in nested gettext calls (:gh:`488`) (@sublee) |
| 643 |
* Messages: Fix in-place editing of dir list while iterating (:gh:`476`, :gh:`492`) (@MarcDufresne) |
| 644 |
* Messages: Stabilize sort order (:gh:`482`) (@xavfernandez) |
| 645 |
* Time zones: Honor the no-inherit marker for metazone names (:gh:`405`) (@akx) |
| 646 |
|
| 647 |
|
| 648 |
Version 2.4.0 |
| 649 |
------------- |
| 650 |
|
| 651 |
New Features |
| 652 |
~~~~~~~~~~~~ |
| 653 |
|
| 654 |
Some of these changes might break your current code and/or tests. |
| 655 |
|
| 656 |
* CLDR: CLDR 29 is now used instead of CLDR 28 (:gh:`405`) (@akx) |
| 657 |
* Messages: Add option 'add_location' for location line formatting (:gh:`438`, :gh:`459`) (@rrader, @alxpy) |
| 658 |
* Numbers: Allow full control of decimal behavior (:gh:`410`) (@etanol) |
| 659 |
|
| 660 |
Minor Improvements and bugfixes |
| 661 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 662 |
|
| 663 |
* Documentation: Improve Date Fields descriptions (:gh:`450`) (@ldwoolley) |
| 664 |
* Documentation: Typo fixes and documentation improvements (:gh:`406`, :gh:`412`, :gh:`403`, :gh:`440`, :gh:`449`, :gh:`463`) (@zyegfryed, @adamchainz, @jwilk, @akx, @roramirez, @abhishekcs10) |
| 665 |
* Messages: Default to UTF-8 source encoding instead of ISO-8859-1 (:gh:`399`) (@asottile) |
| 666 |
* Messages: Ensure messages are extracted in the order they were passed in (:gh:`424`) (@ngrilly) |
| 667 |
* Messages: Message extraction for JSX files is improved (:gh:`392`, :gh:`396`, :gh:`425`) (@karloskar, @georgschoelly) |
| 668 |
* Messages: PO file reading supports multi-line obsolete units (:gh:`429`) (@mbirtwell) |
| 669 |
* Messages: Python message extractor respects unicode_literals in __future__ (:gh:`427`) (@sublee) |
| 670 |
* Messages: Roundtrip Language headers (:gh:`420`) (@kruton) |
| 671 |
* Messages: units before obsolete units are no longer erroneously marked obsolete (:gh:`452`) (@mbirtwell) |
| 672 |
* Numbers: `parse_pattern` now preserves the full original pattern (:gh:`414`) (@jtwang) |
| 673 |
* Numbers: Fix float conversion in `extract_operands` (:gh:`435`) (@akx) |
| 674 |
* Plurals: Fix plural forms for Czech and Slovak locales (:gh:`373`) (@ykshatroff) |
| 675 |
* Plurals: More plural form fixes based on Mozilla and CLDR references (:gh:`431`) (@mshenfield) |
| 676 |
|
| 677 |
|
| 678 |
Internal improvements |
| 679 |
~~~~~~~~~~~~~~~~~~~~~ |
| 680 |
|
| 681 |
* Local times are constructed correctly in tests (:gh:`411`) (@etanol) |
| 682 |
* Miscellaneous small improvements (:gh:`437`) (@scop) |
| 683 |
* Regex flags are extracted from the regex strings (:gh:`462`) (@singingwolfboy) |
| 684 |
* The PO file reader is now a class and has seen some refactoring (:gh:`429`, :gh:`452`) (@mbirtwell) |
| 685 |
|
| 686 |
|
| 687 |
Version 2.3.4 |
| 688 |
------------- |
| 689 |
|
| 690 |
(Bugfix release, released on April 22th 2016) |
| 691 |
|
| 692 |
Bugfixes |
| 693 |
~~~~~~~~ |
| 694 |
|
| 695 |
* CLDR: The lxml library is no longer used for CLDR importing, so it should not cause strange failures either. Thanks to @aronbierbaum for the bug report and @jtwang for the fix. (:gh:`393`) |
| 696 |
* CLI: Every last single CLI usage regression should now be gone, and both distutils and stand-alone CLIs should work as they have in the past. Thanks to @paxswill and @ajaeger for bug reports. (:gh:`389`) |
| 697 |
|
| 698 |
Version 2.3.3 |
| 699 |
------------- |
| 700 |
|
| 701 |
(Bugfix release, released on April 12th 2016) |
| 702 |
|
| 703 |
Bugfixes |
| 704 |
~~~~~~~~ |
| 705 |
|
| 706 |
* CLI: Usage regressions that had snuck in between 2.2 and 2.3 should be no more. (:gh:`386`) Thanks to @ajaeger, @sebdiem and @jcristovao for bug reports and patches. |
| 707 |
|
| 708 |
Version 2.3.2 |
| 709 |
------------- |
| 710 |
|
| 711 |
(Bugfix release, released on April 9th 2016) |
| 712 |
|
| 713 |
Bugfixes |
| 714 |
~~~~~~~~ |
| 715 |
|
| 716 |
* Dates: Period (am/pm) formatting was broken in certain locales (namely zh_TW). Thanks to @jun66j5 for the bug report. (:gh:`378`, :gh:`379`) |
| 717 |
|
| 718 |
Version 2.3.1 |
| 719 |
------------- |
| 720 |
|
| 721 |
(Bugfix release because of deployment problems, released on April 8th 2016) |
| 722 |
|
| 723 |
Version 2.3 |
| 724 |
----------- |
| 725 |
|
| 726 |
(Feature release, released on April 8th 2016) |
| 727 |
|
| 728 |
Internal improvements |
| 729 |
~~~~~~~~~~~~~~~~~~~~~ |
| 730 |
|
| 731 |
* The CLI frontend and Distutils commands use a shared implementation (:gh:`311`) |
| 732 |
* PyPy3 is supported (:gh:`343`) |
| 733 |
|
| 734 |
Features |
| 735 |
~~~~~~~~ |
| 736 |
|
| 737 |
* CLDR: Add an API for territory language data (:gh:`315`) |
| 738 |
* Core: Character order and measurement system data is imported and exposed (:gh:`368`) |
| 739 |
* Dates: Add an API for time interval formatting (:gh:`316`) |
| 740 |
* Dates: More pattern formats and lengths are supported (:gh:`347`) |
| 741 |
* Dates: Period IDs are imported and exposed (:gh:`349`) |
| 742 |
* Dates: Support for date-time skeleton formats has been added (:gh:`265`) |
| 743 |
* Dates: Timezone formatting has been improved (:gh:`338`) |
| 744 |
* Messages: JavaScript extraction now supports dotted names, ES6 template strings and JSX tags (:gh:`332`) |
| 745 |
* Messages: npgettext is recognized by default (:gh:`341`) |
| 746 |
* Messages: The CLI learned to accept multiple domains (:gh:`335`) |
| 747 |
* Messages: The extraction commands now accept filenames in addition to directories (:gh:`324`) |
| 748 |
* Units: A new API for unit formatting is implemented (:gh:`369`) |
| 749 |
|
| 750 |
Bugfixes |
| 751 |
~~~~~~~~ |
| 752 |
|
| 753 |
* Core: Mixed-case locale IDs work more reliably (:gh:`361`) |
| 754 |
* Dates: S...S formats work correctly now (:gh:`360`) |
| 755 |
* Messages: All messages are now sorted correctly if sorting has been specified (:gh:`300`) |
| 756 |
* Messages: Fix the unexpected behavior caused by catalog header updating (e0e7ef1) (:gh:`320`) |
| 757 |
* Messages: Gettext operands are now generated correctly (:gh:`295`) |
| 758 |
* Messages: Message extraction has been taught to detect encodings better (:gh:`274`) |
| 759 |
|
| 760 |
Version 2.2 |
| 761 |
----------- |
| 762 |
|
| 763 |
(Feature release, released on January 2nd 2016) |
| 764 |
|
| 765 |
Bugfixes |
| 766 |
~~~~~~~~ |
| 767 |
|
| 768 |
* General: Add __hash__ to Locale. (:gh:`303`) (2aa8074) |
| 769 |
* General: Allow files with BOM if they're UTF-8 (:gh:`189`) (da87edd) |
| 770 |
* General: localedata directory is now locale-data (:gh:`109`) (2d1882e) |
| 771 |
* General: odict: Fix pop method (0a9e97e) |
| 772 |
* General: Removed uses of datetime.date class from .dat files (:gh:`174`) (94f6830) |
| 773 |
* Messages: Fix plural selection for Chinese (531f666) |
| 774 |
* Messages: Fix typo and add semicolon in plural_forms (5784501) |
| 775 |
* Messages: Flatten NullTranslations.files into a list (ad11101) |
| 776 |
* Times: FixedOffsetTimezone: fix display of negative offsets (d816803) |
| 777 |
|
| 778 |
Features |
| 779 |
~~~~~~~~ |
| 780 |
|
| 781 |
* CLDR: Update to CLDR 28 (:gh:`292`) (9f7f4d0) |
| 782 |
* General: Add __copy__ and __deepcopy__ to LazyProxy. (a1cc3f1) |
| 783 |
* General: Add official support for Python 3.4 and 3.5 |
| 784 |
* General: Improve odict performance by making key search O(1) (6822b7f) |
| 785 |
* Locale: Add an ordinal_form property to Locale (:gh:`270`) (b3f3430) |
| 786 |
* Locale: Add support for list formatting (37ce4fa, be6e23d) |
| 787 |
* Locale: Check inheritance exceptions first (3ef0d6d) |
| 788 |
* Messages: Allow file locations without line numbers (:gh:`279`) (79bc781) |
| 789 |
* Messages: Allow passing a callable to `extract()` (:gh:`289`) (3f58516) |
| 790 |
* Messages: Support 'Language' header field of PO files (:gh:`76`) (3ce842b) |
| 791 |
* Messages: Update catalog headers from templates (e0e7ef1) |
| 792 |
* Numbers: Properly load and expose currency format types (:gh:`201`) (df676ab) |
| 793 |
* Numbers: Use cdecimal by default when available (b6169be) |
| 794 |
* Numbers: Use the CLDR's suggested number of decimals for format_currency (:gh:`139`) (201ed50) |
| 795 |
* Times: Add format_timedelta(format='narrow') support (edc5eb5) |
| 796 |
|
| 797 |
Version 2.1 |
| 798 |
----------- |
| 799 |
|
| 800 |
(Bugfix/minor feature release, released on September 25th 2015) |
| 801 |
|
| 802 |
- Parse and honour the locale inheritance exceptions |
| 803 |
(:gh:`97`) |
| 804 |
- Fix Locale.parse using ``global.dat`` incompatible types |
| 805 |
(:gh:`174`) |
| 806 |
- Fix display of negative offsets in ``FixedOffsetTimezone`` |
| 807 |
(:gh:`214`) |
| 808 |
- Improved odict performance which is used during localization file |
| 809 |
build, should improve compilation time for large projects |
| 810 |
- Add support for "narrow" format for ``format_timedelta`` |
| 811 |
- Add universal wheel support |
| 812 |
- Support 'Language' header field in .PO files |
| 813 |
(fixes :gh:`76`) |
| 814 |
- Test suite enhancements (coverage, broken tests fixed, etc) |
| 815 |
- Documentation updated |
| 816 |
|
| 817 |
Version 2.0 |
| 818 |
----------- |
| 819 |
|
| 820 |
(Released on July 27th 2015, codename Second Coming) |
| 821 |
|
| 822 |
- Added support for looking up currencies that belong to a territory |
| 823 |
through the :func:`babel.numbers.get_territory_currencies` |
| 824 |
function. |
| 825 |
- Improved Python 3 support. |
| 826 |
- Fixed some broken tests for timezone behavior. |
| 827 |
- Improved various smaller things for dealing with dates. |
| 828 |
|
| 829 |
Version 1.4 |
| 830 |
----------- |
| 831 |
|
| 832 |
(bugfix release, release date to be decided) |
| 833 |
|
| 834 |
- Fixed a bug that caused deprecated territory codes not being |
| 835 |
converted properly by the subtag resolving. This for instance |
| 836 |
showed up when trying to use ``und_UK`` as a language code |
| 837 |
which now properly resolves to ``en_GB``. |
| 838 |
- Fixed a bug that made it impossible to import the CLDR data |
| 839 |
from scratch on windows systems. |
| 840 |
|
| 841 |
Version 1.3 |
| 842 |
----------- |
| 843 |
|
| 844 |
(bugfix release, released on July 29th 2013) |
| 845 |
|
| 846 |
- Fixed a bug in likely-subtag resolving for some common locales. |
| 847 |
This primarily makes ``zh_CN`` work again which was broken |
| 848 |
due to how it was defined in the likely subtags combined with |
| 849 |
our broken resolving. This fixes :gh:`37`. |
| 850 |
- Fixed a bug that caused pybabel to break when writing to stdout |
| 851 |
on Python 3. |
| 852 |
- Removed a stray print that was causing issues when writing to |
| 853 |
stdout for message catalogs. |
| 854 |
|
| 855 |
Version 1.2 |
| 856 |
----------- |
| 857 |
|
| 858 |
(bugfix release, released on July 27th 2013) |
| 859 |
|
| 860 |
- Included all tests in the tarball. Previously the include |
| 861 |
skipped past recursive folders. |
| 862 |
- Changed how tests are invoked and added separate standalone |
| 863 |
test command. This simplifies testing of the package for |
| 864 |
linux distributors. |
| 865 |
|
| 866 |
Version 1.1 |
| 867 |
----------- |
| 868 |
|
| 869 |
(bugfix release, released on July 27th 2013) |
| 870 |
|
| 871 |
- added dummy version requirements for pytz so that it installs |
| 872 |
on pip 1.4. |
| 873 |
- Included tests in the tarball. |
| 874 |
|
| 875 |
Version 1.0 |
| 876 |
----------- |
| 877 |
|
| 878 |
(Released on July 26th 2013, codename Revival) |
| 879 |
|
| 880 |
- support python 2.6, 2.7, 3.3+ and pypy - drop all other versions |
| 881 |
- use tox for testing on different pythons |
| 882 |
- Added support for the locale plural rules defined by the CLDR. |
| 883 |
- Added `format_timedelta` function to support localized formatting of |
| 884 |
relative times with strings such as "2 days" or "1 month" (:trac:`126`). |
| 885 |
- Fixed negative offset handling of Catalog._set_mime_headers (:trac:`165`). |
| 886 |
- Fixed the case where messages containing square brackets would break with |
| 887 |
an unpack error. |
| 888 |
- updated to CLDR 23 |
| 889 |
- Make the CLDR import script work with Python 2.7. |
| 890 |
- Fix various typos. |
| 891 |
- Sort output of list-locales. |
| 892 |
- Make the POT-Creation-Date of the catalog being updated equal to |
| 893 |
POT-Creation-Date of the template used to update (:trac:`148`). |
| 894 |
- Use a more explicit error message if no option or argument (command) is |
| 895 |
passed to pybabel (:trac:`81`). |
| 896 |
- Keep the PO-Revision-Date if it is not the default value (:trac:`148`). |
| 897 |
- Make --no-wrap work by reworking --width's default and mimic xgettext's |
| 898 |
behaviour of always wrapping comments (:trac:`145`). |
| 899 |
- Add --project and --version options for commandline (:trac:`173`). |
| 900 |
- Add a __ne__() method to the Local class. |
| 901 |
- Explicitly sort instead of using sorted() and don't assume ordering |
| 902 |
(Jython compatibility). |
| 903 |
- Removed ValueError raising for string formatting message checkers if the |
| 904 |
string does not contain any string formatting (:trac:`150`). |
| 905 |
- Fix Serbian plural forms (:trac:`213`). |
| 906 |
- Small speed improvement in format_date() (:trac:`216`). |
| 907 |
- Fix so frontend.CommandLineInterface.run does not accumulate logging |
| 908 |
handlers (:trac:`227`, reported with initial patch by dfraser) |
| 909 |
- Fix exception if environment contains an invalid locale setting |
| 910 |
(:trac:`200`) |
| 911 |
- use cPickle instead of pickle for better performance (:trac:`225`) |
| 912 |
- Only use bankers round algorithm as a tie breaker if there are two nearest |
| 913 |
numbers, round as usual if there is only one nearest number (:trac:`267`, |
| 914 |
patch by Martin) |
| 915 |
- Allow disabling cache behaviour in LazyProxy (:trac:`208`, initial patch |
| 916 |
from Pedro Algarvio) |
| 917 |
- Support for context-aware methods during message extraction (:trac:`229`, |
| 918 |
patch from David Rios) |
| 919 |
- "init" and "update" commands support "--no-wrap" option (:trac:`289`) |
| 920 |
- fix formatting of fraction in format_decimal() if the input value is a float |
| 921 |
with more than 7 significant digits (:trac:`183`) |
| 922 |
- fix format_date() with datetime parameter (:trac:`282`, patch from Xavier |
| 923 |
Morel) |
| 924 |
- fix format_decimal() with small Decimal values (:trac:`214`, patch from |
| 925 |
George Lund) |
| 926 |
- fix handling of messages containing '\\n' (:trac:`198`) |
| 927 |
- handle irregular multi-line msgstr (no "" as first line) gracefully |
| 928 |
(:trac:`171`) |
| 929 |
- parse_decimal() now returns Decimals not floats, API change (:trac:`178`) |
| 930 |
- no warnings when running setup.py without installed setuptools (:trac:`262`) |
| 931 |
- modified Locale.__eq__ method so Locales are only equal if all of their |
| 932 |
attributes (language, territory, script, variant) are equal |
| 933 |
- resort to hard-coded message extractors/checkers if pkg_resources is |
| 934 |
installed but no egg-info was found (:trac:`230`) |
| 935 |
- format_time() and format_datetime() now accept also floats (:trac:`242`) |
| 936 |
- add babel.support.NullTranslations class similar to gettext.NullTranslations |
| 937 |
but with all of Babel's new gettext methods (:trac:`277`) |
| 938 |
- "init" and "update" commands support "--width" option (:trac:`284`) |
| 939 |
- fix 'input_dirs' option for setuptools integration (:trac:`232`, initial |
| 940 |
patch by Étienne Bersac) |
| 941 |
- ensure .mo file header contains the same information as the source .po file |
| 942 |
(:trac:`199`) |
| 943 |
- added support for get_language_name() on the locale objects. |
| 944 |
- added support for get_territory_name() on the locale objects. |
| 945 |
- added support for get_script_name() on the locale objects. |
| 946 |
- added pluralization support for currency names and added a '¤¤¤' |
| 947 |
pattern for currencies that includes the full name. |
| 948 |
- depend on pytz now and wrap it nicer. This gives us improved support |
| 949 |
for things like timezone transitions and an overall nicer API. |
| 950 |
- Added support for explicit charset to PO file reading. |
| 951 |
- Added experimental Python 3 support. |
| 952 |
- Added better support for returning timezone names. |
| 953 |
- Don't throw away a Catalog's obsolete messages when updating it. |
| 954 |
- Added basic likelySubtag resolving when doing locale parsing and no |
| 955 |
match can be found. |
| 956 |
|
| 957 |
|
| 958 |
Version 0.9.6 |
| 959 |
------------- |
| 960 |
|
| 961 |
(released on March 17th 2011) |
| 962 |
|
| 963 |
- Backport r493-494: documentation typo fixes. |
| 964 |
- Make the CLDR import script work with Python 2.7. |
| 965 |
- Fix various typos. |
| 966 |
- Fixed Python 2.3 compatibility (:trac:`146`, :trac:`233`). |
| 967 |
- Sort output of list-locales. |
| 968 |
- Make the POT-Creation-Date of the catalog being updated equal to |
| 969 |
POT-Creation-Date of the template used to update (:trac:`148`). |
| 970 |
- Use a more explicit error message if no option or argument (command) is |
| 971 |
passed to pybabel (:trac:`81`). |
| 972 |
- Keep the PO-Revision-Date if it is not the default value (:trac:`148`). |
| 973 |
- Make --no-wrap work by reworking --width's default and mimic xgettext's |
| 974 |
behaviour of always wrapping comments (:trac:`145`). |
| 975 |
- Fixed negative offset handling of Catalog._set_mime_headers (:trac:`165`). |
| 976 |
- Add --project and --version options for commandline (:trac:`173`). |
| 977 |
- Add a __ne__() method to the Local class. |
| 978 |
- Explicitly sort instead of using sorted() and don't assume ordering |
| 979 |
(Python 2.3 and Jython compatibility). |
| 980 |
- Removed ValueError raising for string formatting message checkers if the |
| 981 |
string does not contain any string formatting (:trac:`150`). |
| 982 |
- Fix Serbian plural forms (:trac:`213`). |
| 983 |
- Small speed improvement in format_date() (:trac:`216`). |
| 984 |
- Fix number formatting for locales where CLDR specifies alt or draft |
| 985 |
items (:trac:`217`) |
| 986 |
- Fix bad check in format_time (:trac:`257`, reported with patch and tests by |
| 987 |
jomae) |
| 988 |
- Fix so frontend.CommandLineInterface.run does not accumulate logging |
| 989 |
handlers (:trac:`227`, reported with initial patch by dfraser) |
| 990 |
- Fix exception if environment contains an invalid locale setting |
| 991 |
(:trac:`200`) |
| 992 |
|
| 993 |
|
| 994 |
Version 0.9.5 |
| 995 |
------------- |
| 996 |
|
| 997 |
(released on April 6th 2010) |
| 998 |
|
| 999 |
- Fixed the case where messages containing square brackets would break with |
| 1000 |
an unpack error. |
| 1001 |
- Backport of r467: Fuzzy matching regarding plurals should *NOT* be checked |
| 1002 |
against len(message.id) because this is always 2, instead, it's should be |
| 1003 |
checked against catalog.num_plurals (:trac:`212`). |
| 1004 |
|
| 1005 |
|
| 1006 |
Version 0.9.4 |
| 1007 |
------------- |
| 1008 |
|
| 1009 |
(released on August 25th 2008) |
| 1010 |
|
| 1011 |
- Currency symbol definitions that is defined with choice patterns in the |
| 1012 |
CLDR data are no longer imported, so the symbol code will be used instead. |
| 1013 |
- Fixed quarter support in date formatting. |
| 1014 |
- Fixed a serious memory leak that was introduces by the support for CLDR |
| 1015 |
aliases in 0.9.3 (:trac:`128`). |
| 1016 |
- Locale modifiers such as "@euro" are now stripped from locale identifiers |
| 1017 |
when parsing (:trac:`136`). |
| 1018 |
- The system locales "C" and "POSIX" are now treated as aliases for |
| 1019 |
"en_US_POSIX", for which the CLDR provides the appropriate data. Thanks to |
| 1020 |
Manlio Perillo for the suggestion. |
| 1021 |
- Fixed JavaScript extraction for regular expression literals (:trac:`138`) |
| 1022 |
and concatenated strings. |
| 1023 |
- The `Translation` class in `babel.support` can now manage catalogs with |
| 1024 |
different message domains, and exposes the family of `d*gettext` functions |
| 1025 |
(:trac:`137`). |
| 1026 |
|
| 1027 |
|
| 1028 |
Version 0.9.3 |
| 1029 |
------------- |
| 1030 |
|
| 1031 |
(released on July 9th 2008) |
| 1032 |
|
| 1033 |
- Fixed invalid message extraction methods causing an UnboundLocalError. |
| 1034 |
- Extraction method specification can now use a dot instead of the colon to |
| 1035 |
separate module and function name (:trac:`105`). |
| 1036 |
- Fixed message catalog compilation for locales with more than two plural |
| 1037 |
forms (:trac:`95`). |
| 1038 |
- Fixed compilation of message catalogs for locales with more than two plural |
| 1039 |
forms where the translations were empty (:trac:`97`). |
| 1040 |
- The stripping of the comment tags in comments is optional now and |
| 1041 |
is done for each line in a comment. |
| 1042 |
- Added a JavaScript message extractor. |
| 1043 |
- Updated to CLDR 1.6. |
| 1044 |
- Fixed timezone calculations when formatting datetime and time values. |
| 1045 |
- Added a `get_plural` function into the plurals module that returns the |
| 1046 |
correct plural forms for a locale as tuple. |
| 1047 |
- Added support for alias definitions in the CLDR data files, meaning that |
| 1048 |
the chance for items missing in certain locales should be greatly reduced |
| 1049 |
(:trac:`68`). |
| 1050 |
|
| 1051 |
|
| 1052 |
Version 0.9.2 |
| 1053 |
------------- |
| 1054 |
|
| 1055 |
(released on February 4th 2008) |
| 1056 |
|
| 1057 |
- Fixed catalogs' charset values not being recognized (:trac:`66`). |
| 1058 |
- Numerous improvements to the default plural forms. |
| 1059 |
- Fixed fuzzy matching when updating message catalogs (:trac:`82`). |
| 1060 |
- Fixed bug in catalog updating, that in some cases pulled in translations |
| 1061 |
from different catalogs based on the same template. |
| 1062 |
- Location lines in PO files do no longer get wrapped at hyphens in file |
| 1063 |
names (:trac:`79`). |
| 1064 |
- Fixed division by zero error in catalog compilation on empty catalogs |
| 1065 |
(:trac:`60`). |
| 1066 |
|
| 1067 |
|
| 1068 |
Version 0.9.1 |
| 1069 |
------------- |
| 1070 |
|
| 1071 |
(released on September 7th 2007) |
| 1072 |
|
| 1073 |
- Fixed catalog updating when a message is merged that was previously simple |
| 1074 |
but now has a plural form, for example by moving from `gettext` to |
| 1075 |
`ngettext`, or vice versa. |
| 1076 |
- Fixed time formatting for 12 am and 12 pm. |
| 1077 |
- Fixed output encoding of the `pybabel --list-locales` command. |
| 1078 |
- MO files are now written in binary mode on windows (:trac:`61`). |
| 1079 |
|
| 1080 |
|
| 1081 |
Version 0.9 |
| 1082 |
----------- |
| 1083 |
|
| 1084 |
(released on August 20th 2007) |
| 1085 |
|
| 1086 |
- The `new_catalog` distutils command has been renamed to `init_catalog` for |
| 1087 |
consistency with the command-line frontend. |
| 1088 |
- Added compilation of message catalogs to MO files (:trac:`21`). |
| 1089 |
- Added updating of message catalogs from POT files (:trac:`22`). |
| 1090 |
- Support for significant digits in number formatting. |
| 1091 |
- Apply proper "banker's rounding" in number formatting in a cross-platform |
| 1092 |
manner. |
| 1093 |
- The number formatting functions now also work with numbers represented by |
| 1094 |
Python `Decimal` objects (:trac:`53`). |
| 1095 |
- Added extensible infrastructure for validating translation catalogs. |
| 1096 |
- Fixed the extractor not filtering out messages that didn't validate against |
| 1097 |
the keyword's specification (:trac:`39`). |
| 1098 |
- Fixed the extractor raising an exception when encountering an empty string |
| 1099 |
msgid. It now emits a warning to stderr. |
| 1100 |
- Numerous Python message extractor fixes: it now handles nested function |
| 1101 |
calls within a gettext function call correctly, uses the correct line number |
| 1102 |
for multi-line function calls, and other small fixes (tickets :trac:`38` and |
| 1103 |
:trac:`39`). |
| 1104 |
- Improved support for detecting Python string formatting fields in message |
| 1105 |
strings (:trac:`57`). |
| 1106 |
- CLDR upgraded to the 1.5 release. |
| 1107 |
- Improved timezone formatting. |
| 1108 |
- Implemented scientific number formatting. |
| 1109 |
- Added mechanism to lookup locales by alias, for cases where browsers insist |
| 1110 |
on including only the language code in the `Accept-Language` header, and |
| 1111 |
sometimes even the incorrect language code. |
| 1112 |
|
| 1113 |
|
| 1114 |
Version 0.8.1 |
| 1115 |
------------- |
| 1116 |
|
| 1117 |
(released on July 2nd 2007) |
| 1118 |
|
| 1119 |
- `default_locale()` would fail when the value of the `LANGUAGE` environment |
| 1120 |
variable contained multiple language codes separated by colon, as is |
| 1121 |
explicitly allowed by the GNU gettext tools. As the `default_locale()` |
| 1122 |
function is called at the module level in some modules, this bug would |
| 1123 |
completely break importing these modules on systems where `LANGUAGE` is set |
| 1124 |
that way. |
| 1125 |
- The character set specified in PO template files is now respected when |
| 1126 |
creating new catalog files based on that template. This allows the use of |
| 1127 |
characters outside the ASCII range in POT files (:trac:`17`). |
| 1128 |
- The default ordering of messages in generated POT files, which is based on |
| 1129 |
the order those messages are found when walking the source tree, is no |
| 1130 |
longer subject to differences between platforms; directory and file names |
| 1131 |
are now always sorted alphabetically. |
| 1132 |
- The Python message extractor now respects the special encoding comment to be |
| 1133 |
able to handle files containing non-ASCII characters (:trac:`23`). |
| 1134 |
- Added ``N_`` (gettext noop) to the extractor's default keywords. |
| 1135 |
- Made locale string parsing more robust, and also take the script part into |
| 1136 |
account (:trac:`27`). |
| 1137 |
- Added a function to list all locales for which locale data is available. |
| 1138 |
- Added a command-line option to the `pybabel` command which prints out all |
| 1139 |
available locales (:trac:`24`). |
| 1140 |
- The name of the command-line script has been changed from just `babel` to |
| 1141 |
`pybabel` to avoid a conflict with the OpenBabel project (:trac:`34`). |
| 1142 |
|
| 1143 |
|
| 1144 |
Version 0.8 |
| 1145 |
----------- |
| 1146 |
|
| 1147 |
(released on June 20th 2007) |
| 1148 |
|
| 1149 |
- First public release |