Skip to content

Commit 8c2e1ac

Browse files
committed
Mention gettext for user-defined strings
1 parent 8fcd1b5 commit 8c2e1ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/howto/argparse.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ For instance, in this :mod:`argparse` output:
815815
-q, --quiet
816816
817817
The strings ``usage:``, ``positional arguments:``, ``options:`` and
818-
``show this help message and exit`` are all translatable.
818+
``show this help message and exit`` are all translatable.
819819

820820
In order to translate these strings, they must first be extracted
821821
into a ``.po`` file. For example, using `Babel <https://babel.pocoo.org/>`__,
@@ -839,6 +839,7 @@ Once the messages in the ``.po`` file are translated and the translations are
839839
installed using :mod:`gettext`, :mod:`argparse` will be able to display the
840840
translated messages.
841841

842+
To translate your own strings in the :mod:`argparse` output, use :mod:`gettext`.
842843

843844
Conclusion
844845
==========

0 commit comments

Comments
 (0)