11
11
# ppcfish <ppcfish@gmail.com>, 2021
12
12
# ww song <sww4718168@gmail.com>, 2023
13
13
# Rafael Fontenelle <rffontenelle@gmail.com>, 2024
14
- # Freesand Leo <yuqinju@163.com>, 2024
15
14
# Kevin Deng <kevindeng55+transifex@gmail.com>, 2024
15
+ # Freesand Leo <yuqinju@163.com>, 2024
16
16
#
17
17
#, fuzzy
18
18
msgid ""
@@ -21,7 +21,7 @@ msgstr ""
21
21
"Report-Msgid-Bugs-To : \n "
22
22
"POT-Creation-Date : 2024-12-27 14:16+0000\n "
23
23
"PO-Revision-Date : 2021-06-28 01:10+0000\n "
24
- "Last-Translator : Kevin Deng <kevindeng55+transifex@gmail .com>, 2024\n "
24
+ "Last-Translator : Freesand Leo <yuqinju@163 .com>, 2024\n "
25
25
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
26
26
"MIME-Version : 1.0\n "
27
27
"Content-Type : text/plain; charset=UTF-8\n "
@@ -205,13 +205,15 @@ msgid ""
205
205
"option processing is complete. In the ``argparse`` version, positional "
206
206
"arguments are declared and processed in the same way as the named options."
207
207
msgstr ""
208
+ "最明显的差异就是在 ``optparse`` 版本中,无选项参数是在选项处理完成后由应用程序单独处理的。 在 ``argparse`` "
209
+ "版本中,位置参数则是以与带名称的选项相同的方式声明和处理的。"
208
210
209
211
#: ../../library/optparse.rst:94
210
212
msgid ""
211
213
"However, the ``argparse`` version will also handle some parameter "
212
214
"combination differently from the way the ``optparse`` version would handle "
213
215
"them. For example (amongst other differences):"
214
- msgstr ""
216
+ msgstr "不过,``argparse`` 版本还会以与 ``optparse`` 版本不同的方式处理某些形参组合。 例如(除其他差异之外): "
215
217
216
218
#: ../../library/optparse.rst:98
217
219
msgid ""
@@ -220,6 +222,9 @@ msgid ""
220
222
"value has been supplied for ``-o/--output``, since ``-v`` is interpreted as "
221
223
"meaning the verbosity flag)"
222
224
msgstr ""
225
+ "当使用 ``optparse`` 时 ``-o -v`` 是指定 ``output=\" -v\" `` 和 ``verbose=False``,但对于 "
226
+ "``argparse`` 则为错误用法(将报告没有为 ``-o/--output`` 提供值,因为 ``-v`` 会被解读为代表 verbosity "
227
+ "旗标)"
223
228
224
229
#: ../../library/optparse.rst:102
225
230
msgid ""
@@ -229,6 +234,9 @@ msgid ""
229
234
"interpreted as terminating the option processing and treating all remaining "
230
235
"values as positional arguments)"
231
236
msgstr ""
237
+ "类似地,当使用 ``optparse`` 时提供 ``-o --`` 是指定 ``output=\" --\" `` 和 ``args=()``,但对于 "
238
+ "``argparse`` 则为错误用法(同样将报告没有为 ``-o/--output`` 提供值,因为 ``--`` "
239
+ "会被解读为结束选项处理并将所有剩余的值视为位置参数)"
232
240
233
241
#: ../../library/optparse.rst:107
234
242
msgid ""
@@ -272,6 +280,10 @@ msgid ""
272
280
"the conventional GNU/POSIX syntax, and additionally generates usage and help"
273
281
" messages for you."
274
282
msgstr ""
283
+ ":mod:`optparse` 是一个相比极简风格的 :mod:`getopt` 模块更为方便、灵活和强大的命令行选项解析库。 "
284
+ ":mod:`optparse` 使用更趋声明式的命令行解析风格:创建一个 :class:`OptionParser` "
285
+ "的实例,使用选项来填充它,然后解析命令行。 :mod:`optparse` 允许用户以传统的 GNU/POSIX "
286
+ "语法来指定选项,并会为你生成额外的用法和帮助消息。"
275
287
276
288
#: ../../library/optparse.rst:137
277
289
msgid "Here's an example of using :mod:`optparse` in a simple script::"
@@ -394,6 +406,9 @@ msgid ""
394
406
"are unfamiliar with these conventions, reading this section will allow you "
395
407
"to acquaint yourself with them."
396
408
msgstr ""
409
5597
td>+ ":mod:`optparse` 被显式地设计为鼓励创建带有遵循 C 开发者所用的 :c:func:`!getopt` "
410
+ "函数族的惯例的简明直观的命令行接口的程序。 为了这个目标,它仅支持最常见的命令行语法和在 Unix 下使用的规范语义。 "
411
+ "如果你不熟悉这些惯例,阅读本章节将使你开始了解它们。"
397
412
398
413
#: ../../library/optparse.rst:205
399
414
msgid "Terminology"
0 commit comments