summaryrefslogtreecommitdiff
path: root/tests/messages
Commit message (Collapse)AuthorAgeFilesLines
* Apply some small miscellaneous formatting fixesAarni Koskela2023-01-181-3/+3
|
* Apply ruff UP025 (unicode literal prefix) fixAarni Koskela2023-01-186-105/+105
|
* Apply ruff I category fixesAarni Koskela2023-01-185-12/+22
|
* Apply ruff C category fixesAarni Koskela2023-01-181-15/+9
|
* Renovate formatting in test_checkers and test_frontend (#950)Aarni Koskela2023-01-182-204/+147
|
* Improved javascript template string expression extracting (#939)Johannes Wilm2023-01-061-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 Koskela2022-11-233-9/+10
| | | Original conversion suggestions via flynt, edited by hand.
* Use `ast` instead of `eval` for string extractionAarni Koskela2022-11-011-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)
* Support for hex escapes in JavaScript string literalsPrzemyslaw Wegrzyn2022-10-311-0/+2
|
* Use email.Message for pofile header parsingAarni Koskela2022-05-101-0/+11
| | | | | | cgi.parse_header is due to be deprecated Fixes #873
* tests: Use pytest.raises() decorator where applicableAarni Koskela2022-05-101-3/+6
|
* tests: Use regular asserts instead of unittest functionsAarni Koskela2022-05-105-413/+367
| | | | | | Automated conversion initially applied with https://github.com/warlo/codemod-unittest-to-pytest-asserts, followed by some manual changes for brevity.
* Fix up some Python2-isms using pyupgradeAarni Koskela2022-05-109-14/+4
|
* allow header_comment to be passed as an option to extract_message (#720)Mohamed Morsy2022-04-121-0/+9
| | | | | Fixes #82 Co-authored-by: Aarni Koskela <akx@iki.fi>
* Provide a way of checking if the catalogs are up-to-date (#831)Krzysztof Jagiełło2022-04-081-1/+59
|
* Fix output of --list-locales to not be a bytes reprMorgan Wahl2022-04-081-0/+11
| | | | Co-authored-by: Aarni Koskela <akx@iki.fi>
* Plural-Forms: Fix missing trailing semicolonfarhan59002022-04-089-27/+27
| | | | | | | | 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 importsAarni Koskela2022-04-081-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 linenoSigurd Ljødal2022-04-081-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).
* Add frontend for extract directory filterAarni Koskela2022-01-272-0/+28
| | | | Co-authored-by: Kinshuk Dua <kinshukduaexam@gmail.com>
* Update copyright year to 2022Aarni Koskela2022-01-257-7/+7
|
* Hack around empty `err` in test_extract_error_code testAarni Koskela2022-01-251-2/+3
|
* Remove redundant _compat.pyHugo van Kemenade2021-09-147-30/+30
|
* Implement `--init-missing` option for `pybabel update` (#785)ruro2021-06-151-1/+39
| | | | | | | * implement update --init-missing option * trivial test that the --init-missing option exists * add non-trivial update --init-missing test
* Become 2.9.1Aarni Koskela2021-04-287-7/+7
| | | | | * Update copyright year * Update changelog
* Merge branch '2.8-maintenance' into masterAarni Koskela2020-11-117-7/+7
|\
| * Bump copyright year from 2019 to 2020Aarni Koskela2020-11-117-7/+7
| |
* | Introduce invariant that _invalid_pofile() takes unicode line.Niklas Hambüchen2020-01-281-1/+1
|/ | | | | | | | | | | | | | | | This makes debugging and reasoning about the code easier; otherwise it is surprising that sometimes `line` is a unicode and sometimes not. So far, when it was not, it could either be only `""` or `'Algo esta mal'`; thus this commit makes those two u"" strings. In all other cases, it was guaranteed that it's unicode, because all code paths leading to `_invalid_pofile()` went through if not isinstance(line, text_type): line = line.decode(self.catalog.charset) before.
* Bump copyright year from 2018 to 2019Aarni Koskela2019-05-277-7/+7
|
* Catalog update: keep user comments from destination by defaultAarni Koskela2019-05-271-1/+30
| | | | Closes #418
* Merge pull request #647 from akx/pybabel-exit-codeAarni Koskela2019-05-272-85/+74
|\ | | | | pybabel compile: exit with code 1 if errors were encountered
| * pybabel compile: exit with code 1 if errors were encounteredAarni Koskela2019-05-272-0/+14
| | | | | | | | Fixes #627
| * test_frontend: DRY out path generationAarni Koskela2019-05-271-85/+60
| |
* | Add comparison operators to _NormalizedStringAarni Koskela2019-05-271-0/+17
|/ | | | | | Based on @hoangduytranuk's original implementation. Fixes #612
* Remove unused imports throughout testsJon Dufresne2019-01-241-1/+0
|
* Merge pull request #564 from cedk/skip-empty-msgidAarni Koskela2018-08-201-0/+23
|\ | | | | Skip empty message when writing mo file
| * Test empty translation uses fallbackCédric Krier2018-08-191-0/+23
| |
* | Fix pofile test failureAarni Koskela2018-07-201-10/+2
| |
* | frontend, test_frontend: don't use deprecated U read mode on Py3Aarni Koskela2018-05-281-18/+18
| |
* | Merge pull request #559 from python-babel/authorsAarni Koskela2018-05-287-14/+14
|\ \ | | | | | | Authors and license stuff
| * | Rephrase copyright headers to link to the LICENSE file instead of COPYINGauthorsAarni Koskela2018-02-027-7/+7
| | | | | | | | | | | | Fixes #398
| * | Update copyright header years, and include the Babel teamAarni Koskela2018-02-027-7/+7
| |/
* | messages: allow processing files that are in locales unknown to Babelmessages-no-localeAarni Koskela2018-02-021-0/+23
|/ | | | Fixes #553, #555
* pofile.py: Added new exception called PoFileError and thrown if flaggedStevenJ2018-01-161-1/+65
| | | | | | | | This new exception is thrown when the po parser finds an invalid pofile. This helps handle invalid po files that are parsed. Invalid po files may cause other possible errors such as a UnicodeEncodeError. Closes https://github.com/python-babel/babel/issues/531
* Remove redundant parenthesesHugo2017-12-283-4/+4
|
* Replace function call with set literalHugo2017-12-281-21/+9
|
* Use a fixed datetime to avoid test failures (#520)Narendra Vardi2017-08-181-15/+31
| | | | | freezegun library added to travis build and appveyor Fixes #507
* Allow both dash and underscore separated locale identifiers in pofileslenient-po-locale-parseAarni Koskela2017-04-061-0/+6
| | | | | | Fixes #489 Augments #420 (08b9c5e76e19ae)
* Rename test caseHeungsub Lee2017-03-311-1/+1
|
* More complex test cases for nested gettextHeungsub Lee2017-03-311-6/+26
|