Skip to content

Python 3.8: use gettext.pgettext function for translatable strings with contexts #9207

@josephsl

Description

@josephsl

Hi,

Blocked by #7105 and Python 3.8:

Is your feature request related to a problem? Please describe.

In 2012, as part of adding message contexts for various translatable messages (see #1524 for details), NVDA added pgettext function to built-in namespace. Fast forward to 2019, and one of the additions in python 3.8 (later in 2019) will be gettext.pgettext family of functions (see python/cpython:7253) which will allow NVDA to add context messages for translatable strings without modifying built-in namespace.

Describe the solution you'd like

once #7105 is complete and when it comes time to upgrade to Python 3.8 or later, consider using gettext.pgettext.

Describe alternatives you've considered

None

Additional context

See #7105 for details on Python 3 transition workflow, as well as CPython pull request noted above for further details.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Python 3.8Issues or ideas that can be resolved or derive solutions via Python 3.8.blocked

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions