summaryrefslogtreecommitdiff
path: root/babel
Commit message (Collapse)AuthorAgeFilesLines
* Minor cleanups (#948)Aarni Koskela2023-01-1810-16/+40
| | | | | * Add __all__s to be cleaner about re-exports * Move timezone_getter to conftest * Apply spelling corrections suggested by codespell
* Unify datetime imports (#945)Aarni Koskela2023-01-189-150/+223
| | | Co-authored-by: Jonah Lawrence <jonah@freshidea.com>
* Implement zoneinfo support and make pytz optional (#940)DS/Charlie2023-01-117-96/+198
|
* Add type annotations (#934)Jonah Lawrence2023-01-1121-504/+957
| | | | | | | Refs e.g. https://github.com/python/typeshed/pull/9455 Co-authored-by: Spencer Brown <spencerb21@live.com> Co-authored-by: Aarni Koskela <akx@iki.fi>
* Enable pre-commit (#943)Aarni Koskela2023-01-111-1/+1
| | | | | | | * Update pre-commit config syntax * CI: run pre-commit * CI: set up pip caching
* fix typo (#941)lilinjie2023-01-091-1/+1
| | | Signed-off-by: lilinjie <lilinjie@uniontech.com>
* Fix compact singular formats and patterns with no numbers (#932)Jonah Lawrence2023-01-061-6/+13
|
* Improved javascript template string expression extracting (#939)Johannes Wilm2023-01-062-8/+55
| | | | Co-authored-by: Rik <gitaarik@posteo.net> Co-authored-by: Aarni Koskela <akx@iki.fi>
* Replace %/.format/concatenation with f-strings where feasible (#927)Aarni Koskela2022-11-2315-178/+133
| | | Original conversion suggestions via flynt, edited by hand.
* Cast number to Decimal in _get_compact_format (#930)Jonah Lawrence2022-11-231-2/+4
| | | | * fix rounding modes by using Decimal instead of float
* feat: Support for short compact currency formats (#926)Jonah Lawrence2022-11-043-6/+68
| | | | Co-authored-by: Jun Omae (大前 潤) <42682+jun66j5@users.noreply.github.com>
* Remove vestigial Python 2 `long` check (#925)Aarni Koskela2022-11-021-8/+1
|
* feat: Add `Format.compact_decimal` utility (#921)Jonah Lawrence2022-11-021-1/+12
|
* Become 2.11.0v2.11.0Aarni Koskela2022-11-011-1/+1
|
* Quiesce pytest warnings (#916)Aarni Koskela2022-11-011-2/+2
| | | | | | | * Skip doctest of deprecated format_number * Don't return from test_compatible_classes_in_global_and_localedata * Renovate conftest (and require pytest 6+)
* Use `ast` instead of `eval` for string extractionAarni Koskela2022-11-011-9/+26
| | | | | | | | This is safer (as we don't actually execute anything), and allows us to parse f-strings too. Closes #769 (supersedes it) Refs #715 (doesn't add an error yet, but doesn't crash on f-strings)
* Adapt parse_date to handle ISO dates in ASCII formatEric L2022-10-311-3/+17
|
* Add support for compact decimal formats (#909)Jonah Lawrence2022-10-312-0/+69
|
* Remove determining time zone via systemsetup on macOSAarni Koskela2022-10-311-24/+0
| | | | | | | | | | | | According to https://truesecdev.wordpress.com/2015/04/09/hidden-backdoor-api-to-root-privileges-in-apple-os-x/comment-page-1/ the `systemsetup` command has required superuser privileges since macOS 10.8.5 (which has been EOL for over 6 years at the time of writing). We shouldn't expect to use a codepath that requires a helper tool that requires su in any regular use; IOW, _if_ a Babel user had ever reached this path without having been superuser, it would have failed anyway on any currently supported version of macOS. Closes #895 (supersedes it).
* Support for hex escapes in JavaScript string literalsPrzemyslaw Wegrzyn2022-10-311-0/+13
|
* Remove superfluous `__unicode__` declarationsLukas Juhrich2022-09-272-6/+0
| | | | | The `__unicode__` protocol is not used in python3, and furthermore the `unicode()` builtin does not exist anymore.
* Remove `__nonzero__` methods (#896)Nikita Sobolev2022-08-212-4/+2
|
* Remove some deprecated ImportError guardsAarni Koskela2022-07-131-5/+2
|
* Merge branch '2.10-maint'Aarni Koskela2022-06-161-1/+1
|\
| * Become 2.10.3v2.10.3Aarni Koskela2022-06-161-1/+1
| |
| * Become 2.10.2v2.10.2Aarni Koskela2022-06-141-1/+1
| |
* | Become 2.10.2Aarni Koskela2022-06-141-1/+1
| |
* | Use email.Message for pofile header parsingAarni Koskela2022-05-101-3/+9
|/ | | | | | cgi.parse_header is due to be deprecated Fixes #873
* Merge pull request #869 from jun66j5/date-period-symbolsAarni Koskela2022-05-101-8/+41
|\ | | | | Add support for `b` and `B` period symbols in time format
| * Improve doctest for `DateTimeFormat.format_period`Jun Omae2022-05-101-9/+9
| |
| * Use `... if expr else ...`Jun Omae2022-05-101-1/+1
| |
| * Add support for `b` and `B` period symbols in time formatJun Omae2022-04-291-8/+41
| |
* | Fix up some Python2-isms using pyupgradeAarni Koskela2022-05-1022-65/+37
| |
* | Fix get_period_id() with `dayPeriodRule` across 0:00Jun Omae2022-05-101-0/+16
| |
* | Fallback count="other" format in format_currency()Jun Omae2022-05-101-1/+5
|/
* chore(docs/typo): Fixes a minor typo in a function commentFrank Harrison2022-04-261-1/+1
|
* Become 2.10.1v2.10.1Aarni Koskela2022-04-201-1/+1
|
* Fix import statement in messages/frontend.pyNehal J Wani2022-04-201-1/+1
| | | | Resolves #858
* Become 2.10.0v2.10.0Aarni Koskela2022-04-201-1/+1
|
* allow header_comment to be passed as an option to extract_message (#720)Mohamed Morsy2022-04-121-2/+6
| | | | | Fixes #82 Co-authored-by: Aarni Koskela <akx@iki.fi>
* Deprecate get_next_timezone_transition()Aarni Koskela2022-04-081-0/+20
| | | | | | In preparation of removing the hard dependency on pytz Refs #716
* Provide a way of checking if the catalogs are up-to-date (#831)Krzysztof Jagiełło2022-04-082-3/+59
|
* Fix output of --list-locales to not be a bytes reprMorgan Wahl2022-04-081-5/+1
| | | | Co-authored-by: Aarni Koskela <akx@iki.fi>
* plural: parse new c, e operands (otherwise unsupported though)Aarni Koskela2022-04-081-9/+22
|
* Adjust tests for CLDR 40 dataAarni Koskela2022-04-081-2/+2
|
* Plural-Forms: Fix missing trailing semicolonfarhan59002022-04-082-6/+6
| | | | | | | | Adds missing semicolon in the code that generates the header that is Catalog.plural_forms as well as in plural.to_gettext function. Also modifies all the concerning test cases as well as test data files. Closes https://github.com/python-babel/babel/issues/836
* Merge pull request #835 from akx/gettext-deprecationsAarni Koskela2022-04-081-13/+17
|\ | | | | Gettext deprecation fixes (for Python 3.11 compatibility)
| * Don't assume `_output_charset` is a thing (it's not on Python 3.11)Aarni Koskela2022-01-281-13/+5
| | | | | | | | Fixes #819
| * Add deprecations to l*gettext variantsAarni Koskela2022-01-281-0/+12
| |
* | Prefer setuptools imports to distutils importsAarni Koskela2022-04-081-40/+54
| | | | | | | | | | | | | | The non-conditional imports have been around for 6 to 17 years, so they should be safe in conservative situations too. Refs #824