@@ -1083,14 +1083,17 @@ msgid ""
1083
1083
"version or help options. Deprecated; use :meth:`add_option` after creating "
1084
1084
"the parser instead."
1085
1085
msgstr ""
1086
+ "一个用于填充解析器的由 Option 对象组成的列表。 ``option_list`` 中的选项将添加在 "
1087
+ "``standard_option_list`` (一个可由 OptionParser 的子类设置的类属性) "
1088
+ "中的任何选项之后,以及任何版本或帮助选项之前。 已被弃用;请改为在创建解析器之后使用 :meth:`add_option`。"
1086
1089
1087
1090
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:824
1088
1091
msgid "``option_class`` (default: optparse.Option)"
1089
1092
msgstr "``option_class`` (默认: optparse.Option)"
1090
1093
1091
1094
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:824
1092
1095
msgid "Class to use when adding options to the parser in :meth:`add_option`."
1093
- msgstr ""
1096
+ msgstr "当在 :meth:`add_option` 中向解析器添加选项时要使用的类。 "
1094
1097
1095
1098
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:830
1096
1099
msgid "``version`` (default: ``None``)"
@@ -1103,6 +1106,9 @@ msgid ""
1103
1106
"version option with the single option string ``--version``. The substring "
1104
1107
"``%prog`` is expanded the same as for ``usage``."
1105
1108
msgstr ""
1109
+ "当用户提供了 version 选项时将会打印的版本字符串。 如果你为 ``version`` 提供真值,:mod:`optparse` "
1110
+ "将自动添加单个选项字符串 ``--version`` 形式的 version 选项。 子字符串 ``%prog`` 会以与 ``usage`` "
1111
+ "相同的方式扩展。"
1106
1112
1107
1113
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:835
1108
1114
msgid "``conflict_handler`` (default: ``\" error\" ``)"
@@ -1113,6 +1119,8 @@ msgid ""
1113
1119
"Specifies what to do when options with conflicting option strings are added "
1114
1120
"to the parser; see section :ref:`optparse-conflicts-between-options`."
1115
1121
msgstr ""
1122
+ "指定当有相互冲突的选项字符串的选项被添加到解析器时要如何做;参见 :ref:`optparse-conflicts-between-options` "
1123
+ "一节。"
1116
1124
1117
1125
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:841
1118
1126
msgid "``description`` (default: ``None``)"
@@ -1125,17 +1133,21 @@ msgid ""
1125
1133
"when the user requests help (after ``usage``, but before the list of "
1126
1134
"options)."
1127
1135
msgstr ""
1136
+ "一段提供你的程序的简短介绍的文本。 :mod:`optparse` 会重格式化段落以适合当前终端宽度并在用户请求帮助时打印其内容(在 ``usage``"
1137
+ " 之后,选项列表之前)。"
1128
1138
1129
1139
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:846
1130
1140
msgid "``formatter`` (default: a new :class:`IndentedHelpFormatter`)"
1131
- msgstr ""
1141
+ msgstr "``formatter`` (默认: 一个新的 :class:`IndentedHelpFormatter`) "
1132
1142
1133
1143
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:844
1134
1144
msgid ""
1135
1145
"An instance of optparse.HelpFormatter that will be used for printing help "
1136
1146
"text. :mod:`optparse` provides two concrete classes for this purpose: "
1137
1147
"IndentedHelpFormatter and TitledHelpFormatter."
1138
1148
msgstr ""
1149
+ "一个将被用于打印帮助文本的 optparse.HelpFormatter 实例。 :mod:`optparse` 为此目的提供了两个实体类: "
1150
+ "IndentedHelpFormatter 和 TitledHelpFormatter."
1139
1151
1140
1152
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:850
1141
1153
msgid "``add_help_option`` (default: ``True``)"
@@ -1145,7 +1157,7 @@ msgstr "``add_help_option`` (默认: ``True``)"
1145
1157
msgid ""
1146
1158
"If true, :mod:`optparse` will add a help option (with option strings ``-h`` "
1147
1159
"and ``--help``) to the parser."
1148
- msgstr ""
1160
+ msgstr "如为真值,:mod:`optparse` 将向解析器添加一个 help 选项 (使用选项字符串 ``-h`` 和 ``--help``)。 "
1149
1161
1150
1162
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:854
1151
1163
msgid "``prog``"
@@ -1156,14 +1168,16 @@ msgid ""
1156
1168
"The string to use when expanding ``%prog`` in ``usage`` and ``version`` "
1157
1169
"instead of ``os.path.basename(sys.argv[0])``."
1158
1170
msgstr ""
1171
+ "当在 ``usage`` 和 ``version`` 中用于代替 ``os.path.basename(sys.argv[0])`` 来扩展 "
1172
+ "``%prog`` 的字符串。"
1159
1173
1160
1174
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:856
1161
1175
msgid "``epilog`` (default: ``None``)"
1162
1176
msgstr "``epilog`` (默认: ``None``)"
1163
1177
1164
1178
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:857
1165
1179
msgid "A paragraph of help text to print after the option help."
1166
- msgstr ""
1180
+ msgstr "一段将在选项帮助之后打印的帮助文本。 "
1167
1181
1168
1182
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:862
1169
1183
msgid "Populating the parser"
@@ -1176,10 +1190,12 @@ msgid ""
1176
1190
":ref:`optparse-tutorial`. :meth:`add_option` can be called in one of two "
1177
1191
"ways:"
1178
1192
msgstr ""
1193
+ "有几种方式可以为解析器填充选项。 最推荐的方式是使用 :meth:`OptionParser.add_option`,如 :ref:`optparse-"
1194
+ "tutorial` 一节所演示的。 :meth:`add_option` 可以通过两种方式来调用:"
1179
1195
1180
1196
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:868
1181
1197
msgid "pass it an Option instance (as returned by :func:`make_option`)"
1182
- msgstr ""
1198
+ msgstr "传入一个 Option 实例(即 :func:`make_option` 所返回的对象) "
1183
1199
1184
1200
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:870
1185
1201
msgid ""