[issue40835] Incorrect handling for msgctxt in msgfmt.py

Doug Addy report at bugs.python.org
Sun May 31 16:56:52 EDT 2020


New submission from Doug Addy <da1910 at protonmail.com>:

Running msgfmt.py with the attached po file will produce an incorrect context for the entry "test".

Looking at the script, we require a comment to follow a contexted section for the context to be cleared. The gettext documentation makes clear that all comments are optional, so this is not desired behaviour.

My reading of the gettext documentation has a "msgctxt" line applying only to the current entry, so it should be cleared once the last msgstr has been written for that entry.

I will endeavour to provide a patch within the next day or two.

----------
components: Demos and Tools
messages: 370502
nosy: da1910
priority: normal
severity: normal
status: open
title: Incorrect handling for msgctxt in msgfmt.py
type: behavior
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40835>
_______________________________________


More information about the Python-bugs-list mailing list