Skip to content

Commit 489aeac

Browse files
hugovkAlexWaygood
andauthored
gh-101100: Fix Sphinx warning in library/gettext.rst (#112668)
Co-authored-by: Alex Waygood <[email protected]>
1 parent 45650d1 commit 489aeac

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

Doc/library/gettext.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ are the methods of :class:`!NullTranslations`:
257257

258258
.. method:: info()
259259

260-
Return the "protected" :attr:`_info` variable, a dictionary containing
260+
Return a dictionary containing
261261
the metadata found in the message catalog file.
262262

263263

@@ -296,17 +296,17 @@ are the methods of :class:`!NullTranslations`:
296296
The :class:`GNUTranslations` class
297297
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
298298

299-
The :mod:`gettext` module provides one additional class derived from
299+
The :mod:`!gettext` module provides one additional class derived from
300300
:class:`NullTranslations`: :class:`GNUTranslations`. This class overrides
301-
:meth:`_parse` to enable reading GNU :program:`gettext` format :file:`.mo` files
301+
:meth:`!_parse` to enable reading GNU :program:`gettext` format :file:`.mo` files
302302
in both big-endian and little-endian format.
303303

304304
:class:`GNUTranslations` parses optional metadata out of the translation
305305
catalog. It is convention with GNU :program:`gettext` to include metadata as
306306
the translation for the empty string. This metadata is in :rfc:`822`\ -style
307307
``key: value`` pairs, and should contain the ``Project-Id-Version`` key. If the
308308
key ``Content-Type`` is found, then the ``charset`` property is used to
309-
initialize the "protected" :attr:`_charset` instance variable, defaulting to
309+
initialize the "protected" :attr:`!_charset` instance variable, defaulting to
310310
``None`` if not found. If the charset encoding is specified, then all message
311311
ids and message strings read from the catalog are converted to Unicode using
312312
this encoding, else ASCII is assumed.
@@ -315,7 +315,7 @@ Since message ids are read as Unicode strings too, all ``*gettext()`` methods
315315
will assume message ids as Unicode strings, not byte strings.
316316

317317
The entire set of key/value pairs are placed into a dictionary and set as the
318-
"protected" :attr:`_info` instance variable.
318+
"protected" :attr:`!_info` instance variable.
319319

320320
If the :file:`.mo` file's magic number is invalid, the major version number is
321321
unexpected, or if other problems occur while reading the file, instantiating a
@@ -636,9 +636,9 @@ implementations, and valuable experience to the creation of this module:
636636

637637
.. rubric:: Footnotes
638638

639-
.. [#] The default locale directory is system dependent; for example, on RedHat Linux
639+
.. [#] The default locale directory is system dependent; for example, on Red Hat Linux
640640
it is :file:`/usr/share/locale`, but on Solaris it is :file:`/usr/lib/locale`.
641-
The :mod:`gettext` module does not try to support these system dependent
641+
The :mod:`!gettext` module does not try to support these system dependent
642642
defaults; instead its default is :file:`{sys.base_prefix}/share/locale` (see
643643
:data:`sys.base_prefix`). For this reason, it is always best to call
644644
:func:`bindtextdomain` with an explicit absolute path at the start of your

Doc/tools/.nitignore

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ Doc/library/fcntl.rst
5858
Doc/library/ftplib.rst
5959
Doc/library/functions.rst
6060
Doc/library/functools.rst
61-
Doc/library/gettext.rst
6261
Doc/library/http.client.rst
6362
Doc/library/http.cookiejar.rst
6463
Doc/library/http.cookies.rst

0 commit comments

Comments
 (0)