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:
|
# Dear Python, please implement pgettext. |
|
# http://bugs.python.org/issue2504 |
|
# Sincerely, Shaun |
|
trans = translations.ugettext('_\x04translator-credits') |
|
# 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
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
itstool/itstool.in
Lines 1032 to 1036 in f1c6544
More information in the Python bug https://bugs.python.org/issue2504 which has been migrated to GitHub python/cpython#46756