Opened 3 months ago
Last modified 3 months ago
#36421 closed Cleanup/optimization
Support for msgfmt==0.25 — at Initial Version
Reported by: | Mohammad Ali Mehdizadeh | Owned by: | |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Claude Paroz | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
When I run tests on my machine with msgfmt==0.25, one test failed:
`
======================================================================
FAIL: test_msgfmt_error_including_non_ascii (i18n.test_compilation.CompilationErrorHandling.test_msgfmt_error_including_non_ascii)
Traceback (most recent call last):
File "/home/mam/.pyenv/versions/3.12.5/lib/python3.12/unittest/case.py", line 58, in testPartExecutor
yield
File "/home/mam/.pyenv/versions/3.12.5/lib/python3.12/unittest/case.py", line 634, in run
self._callTestMethod(testMethod)
File "/home/mam/.pyenv/versions/3.12.5/lib/python3.12/unittest/case.py", line 589, in _callTestMethod
if method() is not None:
File "/home/mam/mycode/django/tests/i18n/test_compilation.py", line 281, in test_msgfmt_error_including_non_ascii
self.assertIn("' cannot start a field name", stderr.getvalue())
File "/home/mam/.pyenv/versions/3.12.5/lib/python3.12/unittest/case.py", line 1152, in assertIn
self.fail(self._formatMessage(msg, standardMsg))
File "/home/mam/.pyenv/versions/3.12.5/lib/python3.12/unittest/case.py", line 715, in fail
raise self.failureException(msg)
AssertionError: "' cannot start a field name" not found in "Execution of msgfmt failed: /tmp/django_6kqdkmj8/i18n_i8h9ij4r/commands/locale/ko/LC_MESSAGES/django.po:24: 'msgstr' is not a valid Python brace format string, unlike 'msgid'. Reason: In the directive number 0, a field name starts with a character that is not alphanumerical or underscore.\nmsgfmt: found 1 fatal error\n"
Ran 17523 tests in 155.582s
FAILED (failures=1, skipped=1597, expected failures=5)
`