Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Freeze format_time() tests to a specific date to fix test failures (#998)HEADmaster | Michał Górny | 2023-05-09 | 1 | -5/+6 |
| | | | | | | | | Freeze the date when performing the tests for format_time() with a timezone specified. Since the time object does not specify a date, the formatter uses the format string specific to the current date. As a result, if the current DST state is different than when the test was last updated, it failed. | ||||
* | Use Python 3 syntax in test fixtures | Aarni Koskela | 2023-03-01 | 3 | -3/+3 |
| | |||||
* | Update copyright year to 2023 | Aarni Koskela | 2023-02-28 | 14 | -14/+14 |
| | |||||
* | Turn off difflib "autojunk" heuristic in fuzzy matching | Jean Abou Samra | 2023-02-12 | 1 | -0/+19 |
| | | | | | | | | | difflib has a heuristic that used to make fuzzy matching unreliable for >200char strings. See https://github.com/python/cpython/issues/90825 Fixes #969 | ||||
* | In fuzzy matching, also .lower().strip() fuzzy candidates | Jean Abou Samra | 2023-02-12 | 1 | -5/+5 |
| | | | | | | | This seems intended at easing fuzzy matching with trivial edits in the msgstr (changing case and adding whitespace), but it was only done on the new msgstr, not on the old mgstr candidates, so it was possible for merging catalogs to miss messages. | ||||
* | 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 |
| |