Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Replace babel.localedata.locale_identifiers cache with LRU cache | Aarni Koskela | 2023-02-07 | 1 | -8/+5 |
| | |||||
* | Keep @modifiers when parsing locales (#947) | martin f. krafft | 2023-01-26 | 1 | -2/+4 |
| | | | | | | | | | | | | | | | | | Locale modifiers ("@variants") are described in the GNU gettext documentation like this: > The ‘@variant’ can denote any kind of characteristics that is not > already implied by the language ll and the country CC. […] It can also > denote a dialect of the language, … Wherein Babel previously would discard these, this patch stores the modifier information in the `Locale` objects, handling string representation accordingly. Resolves: #946 Signed-off-by: martin f. krafft <madduck@madduck.net> Co-authored-by: Aarni Koskela <akx@iki.fi> | ||||
* | Support for formatting NaN, Infinity (#955) | Jonah Lawrence | 2023-01-25 | 1 | -0/+10 |
| | |||||
* | Remove redundant tests for babel.support (#954) | Aarni Koskela | 2023-01-20 | 1 | -38/+4 |
| | | | The doctests test the exact same things. | ||||
* | Adjust tests for CLDR 42 | Aarni Koskela | 2023-01-20 | 5 | -23/+27 |
| | | | | | | | The space changes around English seem to be on purpose, see: * https://unicode-org.atlassian.net/browse/CLDR-14032 * https://github.com/unicode-org/cldr/commit/a83026ab8c8fa6ed88f1047c4d0c6089f88b7e5d | ||||
* | Add test for #942 | Aarni Koskela | 2023-01-20 | 1 | -0/+4 |
| | |||||
* | Enable E741 (ambiguous variable name) lint | Aarni Koskela | 2023-01-18 | 3 | -39/+39 |
| | |||||
* | Apply some small miscellaneous formatting fixes | Aarni Koskela | 2023-01-18 | 6 | -34/+36 |
| | |||||
* | Apply ruff UP025 (unicode literal prefix) fix | Aarni Koskela | 2023-01-18 | 13 | -420/+420 |
| | |||||
* | Apply ruff SIM300 (de-yoda) fixes | Aarni Koskela | 2023-01-18 | 1 | -5/+4 |
| | |||||
* | Apply ruff I category fixes | Aarni Koskela | 2023-01-18 | 15 | -27/+49 |
| | |||||
* | Apply ruff E category fixes | Aarni Koskela | 2023-01-18 | 4 | -13/+14 |
| | |||||
* | Apply ruff C category fixes | Aarni Koskela | 2023-01-18 | 1 | -15/+9 |
| | |||||
* | Renovate formatting in test_checkers and test_frontend (#950) | Aarni Koskela | 2023-01-18 | 2 | -204/+147 |
| | |||||
* | Minor cleanups (#948) | Aarni Koskela | 2023-01-18 | 5 | -35/+31 |
| | | | | | * Add __all__s to be cleaner about re-exports * Move timezone_getter to conftest * Apply spelling corrections suggested by codespell | ||||
* | Implement zoneinfo support and make pytz optional (#940) | DS/Charlie | 2023-01-11 | 3 | -93/+108 |
| | |||||
* | Fix compact singular formats and patterns with no numbers (#932) | Jonah Lawrence | 2023-01-06 | 1 | -1/+6 |
| | |||||
* | Improved javascript template string expression extracting (#939) | Johannes Wilm | 2023-01-06 | 1 | -0/+39 |
| | | | | 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 Koskela | 2022-11-23 | 6 | -16/+17 |
| | | | Original conversion suggestions via flynt, edited by hand. | ||||
* | feat: Support for short compact currency formats (#926) | Jonah Lawrence | 2022-11-04 | 2 | -0/+34 |
| | | | | Co-authored-by: Jun Omae (大前 潤) <42682+jun66j5@users.noreply.github.com> | ||||
* | feat: Add `Format.compact_decimal` utility (#921) | Jonah Lawrence | 2022-11-02 | 1 | -0/+5 |
| | |||||
* | Quiesce pytest warnings (#916) | Aarni Koskela | 2022-11-01 | 1 | -1/+1 |
| | | | | | | | * 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 extraction | Aarni Koskela | 2022-11-01 | 1 | -0/+27 |
| | | | | | | | | 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) | ||||
* | Add support for compact decimal formats (#909) | Jonah Lawrence | 2022-10-31 | 1 | -0/+33 |
| | |||||
* | Support for hex escapes in JavaScript string literals | Przemyslaw Wegrzyn | 2022-10-31 | 1 | -0/+2 |
| | |||||
* | Use email.Message for pofile header parsing | Aarni Koskela | 2022-05-10 | 1 | -0/+11 |
| | | | | | | cgi.parse_header is due to be deprecated Fixes #873 | ||||
* | tests: Use pytest.raises() decorator where applicable | Aarni Koskela | 2022-05-10 | 2 | -19/+17 |
| | |||||
* | tests: Use regular asserts instead of unittest functions | Aarni Koskela | 2022-05-10 | 10 | -879/+639 |
| | | | | | | Automated conversion initially applied with https://github.com/warlo/codemod-unittest-to-pytest-asserts, followed by some manual changes for brevity. | ||||
* | Merge pull request #869 from jun66j5/date-period-symbols | Aarni Koskela | 2022-05-10 | 1 | -1/+1 |
|\ | | | | | Add support for `b` and `B` period symbols in time format | ||||
| * | Add support for `b` and `B` period symbols in time format | Jun Omae | 2022-04-29 | 1 | -1/+1 |
| | | |||||
* | | Fix up some Python2-isms using pyupgrade | Aarni Koskela | 2022-05-10 | 21 | -28/+4 |
| | | |||||
* | | Fix get_period_id() with `dayPeriodRule` across 0:00 | Jun Omae | 2022-05-10 | 1 | -0/+3 |
| | | |||||
* | | Fallback count="other" format in format_currency() | Jun Omae | 2022-05-10 | 1 | -0/+6 |
|/ | |||||
* | Add test for issue 798 | Aarni Koskela | 2022-04-20 | 1 | -0/+4 |
| | |||||
* | allow header_comment to be passed as an option to extract_message (#720) | Mohamed Morsy | 2022-04-12 | 1 | -0/+9 |
| | | | | | Fixes #82 Co-authored-by: Aarni Koskela <akx@iki.fi> | ||||
* | Update tests for CLDR 41 | Aarni Koskela | 2022-04-08 | 1 | -1/+1 |
| | |||||
* | Provide a way of checking if the catalogs are up-to-date (#831) | Krzysztof Jagiełło | 2022-04-08 | 1 | -1/+59 |
| | |||||
* | Fix output of --list-locales to not be a bytes repr | Morgan Wahl | 2022-04-08 | 1 | -0/+11 |
| | | | | Co-authored-by: Aarni Koskela <akx@iki.fi> | ||||
* | Make test_smoke more thorough | Aarni Koskela | 2022-04-08 | 1 | -13/+32 |
| | |||||
* | plural: parse new c, e operands (otherwise unsupported though) | Aarni Koskela | 2022-04-08 | 1 | -1/+3 |
| | |||||
* | Adjust tests for CLDR 40 data | Aarni Koskela | 2022-04-08 | 2 | -5/+5 |
| | |||||
* | Plural-Forms: Fix missing trailing semicolon | farhan5900 | 2022-04-08 | 10 | -29/+29 |
| | | | | | | | | 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 | ||||
* | Prefer setuptools imports to distutils imports | Aarni Koskela | 2022-04-08 | 1 | -17/+12 |
| | | | | | | | The non-conditional imports have been around for 6 to 17 years, so they should be safe in conservative situations too. Refs #824 | ||||
* | Fix duplicate locations when writing without lineno | Sigurd Ljødal | 2022-04-08 | 1 | -0/+1 |
| | | | | | | If the same translation appears multiple times in the same file, duplicate locations would be written to the .po file when using write_po(..., include_lineno=False). | ||||
* | Don't use the deprecated format_number function internally or in tests | Aarni Koskela | 2022-02-04 | 1 | -5/+2 |
| | |||||
* | Merge pull request #834 from akx/improve-date-parse | Aarni Koskela | 2022-01-28 | 1 | -4/+31 |
|\ | | | | | Improve date/time parsing | ||||
| * | Add format argument to parse_* | Juliette Monsel | 2022-01-28 | 1 | -0/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``parse_date()`` does not allow the user to specify the date's format and the 'medium' format is used by default in the call to ``get_date_format()`` on line 1144. This results in a failure to parse the date in short format for the locale 'sv_SE'. This commit adds the format argument to avoid this failure. The default value is set to 'medium' to preserve the old behavior. Fixes #657 Co-authored-by: Aarni Koskela <akx@iki.fi> | ||||
| * | Add and emit dates.ParseError | Aarni Koskela | 2022-01-28 | 1 | -0/+7 |
| | | |||||
| * | Improve partial time parsing | Aarni Koskela | 2022-01-28 | 1 | -2/+21 |
| | | | | | | | | | | | | | | Refs #442 Co-authored-by: David Bauer <david.bauer009@gmail.com> Co-authored-by: Arthur Jovart <arthur@jovart.com> | ||||
* | | Add frontend for extract directory filter | Aarni Koskela | 2022-01-27 | 2 | -0/+28 |
|/ | | | | Co-authored-by: Kinshuk Dua <kinshukduaexam@gmail.com> |