10000 GH-101100: Fix reference warnings for ``gettext`` by AA-Turner · Pull Request #110115 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-101100: Fix reference warnings for gettext #110115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reflect removal of the lgettext and lngettext methods
  • Loading branch information
AA-Turner committed Sep 29, 2023
commit 9dbb4d0a694410e30e46f1015cee78c9513f25df
7 changes: 2 additions & 5 deletions Doc/library/gettext.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,7 @@ install themselves in the built-in namespace as the function :func:`!_`.
associated :file:`.mo` file paths. Instances with identical :file:`.mo` file
names are cached. The actual class instantiated is *class_* if
provided, otherwise :class:`GNUTranslations`. The class's constructor must
take a single :term:`file object` argument. If provided, *codeset* will change
the charset used to encode translated strings in the
:meth:`~NullTranslations.lgettext` and :meth:`~NullTranslations.lngettext`
methods.
take a single :term:`file object` argument.

If multiple files are found, later files are used as fallbacks for earlier ones.
To allow setting the fallback, :func:`copy.copy` is used to clone each
Expand Down Expand Up @@ -277,7 +274,7 @@ are the methods of :class:`!NullTranslations`:
If the *names* parameter is given, it must be a sequence containing the
names of functions you want to install in the builtins namespace in
addition to :func:`!_`. Supported names are ``'gettext'``, ``'ngettext'``,
``'pgettext'``, ``'npgettext'``, ``'lgettext'``, and ``'lngettext'``.
``'pgettext'``, and ``'npgettext'``.

Note that this is only one way, albeit the most convenient way, to make
the :func:`!_` function available to your application. Because it affects
Expand Down
0