Skip to content

pgettext is available upstream, so workaround can be removed #56

@nicorikken

Description

@nicorikken

In the source code I noticed the comment for wanting pgettext. Pgettext is available since 2017, Python 3.8 (see docs). Currently a workaround is used which could now be removed:

itstool/itstool.in

Lines 886 to 889 in f1c6544

# Dear Python, please implement pgettext.
# http://bugs.python.org/issue2504
# Sincerely, Shaun
trans = translations.ugettext('_\x04translator-credits')

itstool/itstool.in

Lines 1032 to 1036 in f1c6544

# Dear Python, please implement pgettext.
# http://bugs.python.org/issue2504
# Sincerely, Shaun
if msg.get_context() is not None:
msgstr = msg.get_context() + '\x04' + msgstr

More information in the Python bug https://bugs.python.org/issue2504 which has been migrated to GitHub python/cpython#46756

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions