Opened 2 days ago

Last modified 13 hours ago

#36421 new Uncategorized

Support for msgfmt==0.25

Reported by: Mohammad Ali Mehdizadeh Owned by:
Component: Uncategorized Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Mohammad Ali Mehdizadeh)

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)

Change History (2)

comment:1 by Mohammad Ali Mehdizadeh, 2 days ago

Description: modified (diff)

comment:2 by Natalia Bidart, 13 hours ago

Hello Mohammad Ali Mehdizadeh, thank you for your report. Can you please provide details of what operating system and version are you using?

Note: See TracTickets for help on using tickets.
Back to Top