@@ -1083,14 +1083,17 @@ msgid ""
10831083"version or help options. Deprecated; use :meth:`add_option` after creating "
10841084"the parser instead."
10851085msgstr ""
1086+ "一个用于填充解析器的由 Option 对象组成的列表。 ``option_list`` 中的选项将添加在 "
1087+ "``standard_option_list`` (一个可由 OptionParser 的子类设置的类属性) "
1088+ "中的任何选项之后,以及任何版本或帮助选项之前。 已被弃用;请改为在创建解析器之后使用 :meth:`add_option`。"
10861089
10871090#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:824
10881091msgid "``option_class`` (default: optparse.Option)"
10891092msgstr "``option_class`` (默认: optparse.Option)"
10901093
10911094#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:824
10921095msgid "Class to use when adding options to the parser in :meth:`add_option`."
1093- msgstr ""
1096+ msgstr "当在 :meth:`add_option` 中向解析器添加选项时要使用的类。 "
10941097
10951098#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:830
10961099msgid "``version`` (default: ``None``)"
@@ -1103,6 +1106,9 @@ msgid ""
11031106"version option with the single option string ``--version``. The substring "
11041107"``%prog`` is expanded the same as for ``usage``."
11051108msgstr ""
1109+ "当用户提供了 version 选项时将会打印的版本字符串。 如果你为 ``version`` 提供真值,:mod:`optparse` "
1110+ "将自动添加单个选项字符串 ``--version`` 形式的 version 选项。 子字符串 ``%prog`` 会以与 ``usage`` "
1111+ "相同的方式扩展。"
11061112
11071113#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:835
11081114msgid "``conflict_handler`` (default: ``\" error\" ``)"
@@ -1113,6 +1119,8 @@ msgid ""
11131119"Specifies what to do when options with conflicting option strings are added "
11141120"to the parser; see section :ref:`optparse-conflicts-between-options`."
11151121msgstr ""
1122+ "指定当有相互冲突的选项字符串的选项被添加到解析器时要如何做;参见 :ref:`optparse-conflicts-between-options` "
1123+ "一节。"
11161124
11171125#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:841
11181126msgid "``description`` (default: ``None``)"
@@ -1125,17 +1133,21 @@ msgid ""
11251133"when the user requests help (after ``usage``, but before the list of "
11261134"options)."
11271135msgstr ""
1136+ "一段提供你的程序的简短介绍的文本。 :mod:`optparse` 会重格式化段落以适合当前终端宽度并在用户请求帮助时打印其内容(在 ``usage``"
1137+ " 之后,选项列表之前)。"
11281138
11291139#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:846
11301140msgid "``formatter`` (default: a new :class:`IndentedHelpFormatter`)"
1131- msgstr ""
1141+ msgstr "``formatter`` (默认: 一个新的 :class:`IndentedHelpFormatter`) "
11321142
11331143#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:844
11341144msgid ""
11351145"An instance of optparse.HelpFormatter that will be used for printing help "
11361146"text. :mod:`optparse` provides two concrete classes for this purpose: "
11371147"IndentedHelpFormatter and TitledHelpFormatter."
11381148msgstr ""
1149+ "一个将被用于打印帮助文本的 optparse.HelpFormatter 实例。 :mod:`optparse` 为此目的提供了两个实体类: "
1150+ "IndentedHelpFormatter 和 TitledHelpFormatter."
11391151
11401152#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:850
11411153msgid "``add_help_option`` (default: ``True``)"
@@ -1145,7 +1157,7 @@ msgstr "``add_help_option`` (默认: ``True``)"
11451157msgid ""
11461158"If true, :mod:`optparse` will add a help option (with option strings ``-h`` "
11471159"and ``--help``) to the parser."
1148- msgstr ""
1160+ msgstr "如为真值,:mod:`optparse` 将向解析器添加一个 help 选项 (使用选项字符串 ``-h`` 和 ``--help``)。 "
11491161
11501162#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:854
11511163msgid "``prog``"
@@ -1156,14 +1168,16 @@ msgid ""
11561168"The string to use when expanding ``%prog`` in ``usage`` and ``version`` "
11571169"instead of ``os.path.basename(sys.argv[0])``."
11581170msgstr ""
1171+ "当在 ``usage`` 和 ``version`` 中用于代替 ``os.path.basename(sys.argv[0])`` 来扩展 "
1172+ "``%prog`` 的字符串。"
11591173
11601174#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:856
11611175msgid "``epilog`` (default: ``None``)"
11621176msgstr "``epilog`` (默认: ``None``)"
11631177
11641178#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:857
11651179msgid "A paragraph of help text to print after the option help."
1166- msgstr ""
1180+ msgstr "一段将在选项帮助之后打印的帮助文本。 "
11671181
11681182#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:862
11691183msgid "Populating the parser"
@@ -1176,10 +1190,12 @@ msgid ""
11761190":ref:`optparse-tutorial`. :meth:`add_option` can be called in one of two "
11771191"ways:"
11781192msgstr ""
1193+ "有几种方式可以为解析器填充选项。 最推荐的方式是使用 :meth:`OptionParser.add_option`,如 :ref:`optparse-"
1194+ "tutorial` 一节所演示的。 :meth:`add_option` 可以通过两种方式来调用:"
11791195
11801196#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:868
11811197msgid "pass it an Option instance (as returned by :func:`make_option`)"
1182- msgstr ""
1198+ msgstr "传入一个 Option 实例(即 :func:`make_option` 所返回的对象) "
11831199
11841200#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:870
11851201msgid ""