@@ -788,14 +788,13 @@ but not both at the same time:
788
788
-q, --quiet
789
789
790
790
791
- Internationalization support
792
- ============================
791
+ How to translate the argparse output
792
+ ====================================
793
793
794
794
The output of the :mod: `argparse ` module such as its help text and error
795
795
messages are all made translatable using the :mod: `gettext ` module. This
796
796
allows applications to easily localize messages produced by
797
- :mod: `argparse `. (If you are not familiar with Internationalization and
798
- Localization, you can check out :ref: `i18n-howto `).
797
+ :mod: `argparse `. See also :ref: `i18n-howto `.
799
798
800
799
For instance, in this :mod: `argparse ` output:
801
800
@@ -818,9 +817,9 @@ For instance, in this :mod:`argparse` output:
818
817
The strings ``usage: ``, ``positional arguments: ``, ``options: `` and
819
818
``show this help message and exit `` are all translatable.
820
819
821
- In order to translate these strings, you will probably want to extract them
820
+ In order to translate these strings, they must first be extracted
822
821
into a ``.po `` file. For example, using `Babel <https://babel.pocoo.org/ >`__,
823
- you can run :
822
+ run this command :
824
823
825
824
.. code-block :: shell-session
826
825
@@ -831,7 +830,7 @@ module and output them into a file named ``messages.po``. This command assumes
831
830
that your Python installation is in ``/usr/lib ``.
832
831
833
832
You can find out the location of the :mod: `argparse ` module on your system
834
- using this simple script::
833
+ using this script::
835
834
836
835
import argparse
837
836
print(argparse.__file__)
0 commit comments