Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9eef813

Browse files
[po] auto sync
1 parent 79667af commit 9eef813

1 file changed

Lines changed: 18 additions & 10 deletions

File tree

howto/argparse.po

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -340,39 +340,42 @@ msgstr "注意顺序无关紧要。"
340340
msgid ""
341341
"How about we give this program of ours back the ability to have multiple "
342342
"verbosity values, and actually get to use them::"
343-
msgstr ""
343+
msgstr "给我们的程序加上接受多个冗长度的值,然后实际来用用:"
344344

345345
#: ../../howto/argparse.rst:412
346346
msgid ""
347347
"These all look good except the last one, which exposes a bug in our program."
348348
" Let's fix it by restricting the values the ``--verbosity`` option can "
349349
"accept::"
350350
msgstr ""
351+
"除了最后一个,看上去都不错。最后一个暴露了我们的程序中有一个 bug。我们可以通过限制 ``--verbosity`` 选项可以接受的值来修复它:"
351352

352353
#: ../../howto/argparse.rst:448
353354
msgid ""
354355
"Note that the change also reflects both in the error message as well as the "
355356
"help string."
356-
msgstr ""
357+
msgstr "注意这一改变同时反应在错误信息和帮助信息里。"
357358

358359
#: ../../howto/argparse.rst:451
359360
msgid ""
360361
"Now, let's use a different approach of playing with verbosity, which is "
361362
"pretty common. It also matches the way the CPython executable handles its "
362363
"own verbosity argument (check the output of ``python --help``)::"
363364
msgstr ""
365+
"现在,让我们使用另一种的方式来改变冗长度。这种方式更常见,也和 CPython 的可执行文件处理它自己的冗长度参数的方式一致(参考 ``python "
366+
"--help`` 的输出):"
364367

365368
#: ../../howto/argparse.rst:470
366369
msgid ""
367370
"We have introduced another action, \"count\", to count the number of "
368371
"occurrences of a specific optional arguments:"
369-
msgstr ""
372+
msgstr "我们引入了另一种动作 ``count``,来数某一个可选参数出现了几次:"
370373

371374
#: ../../howto/argparse.rst:498
372375
msgid ""
373376
"Yes, it's now more of a flag (similar to ``action=\"store_true\"``) in the "
374377
"previous version of our script. That should explain the complaint."
375-
msgstr ""
378+
msgstr "是的,它现在比前一版本更像是一个标志(和 ``action=\"store_true\"`` 相似)。这能解释它为什么报错。"
376379

377380
#: ../../howto/argparse.rst:501
378381
msgid "It also behaves similar to \"store_true\" action."
@@ -382,34 +385,36 @@ msgstr "它也表现得与 “store_true” 的行为相似。"
382385
msgid ""
383386
"Now here's a demonstration of what the \"count\" action gives. You've "
384387
"probably seen this sort of usage before."
385-
msgstr ""
388+
msgstr "这给出了一个关于 ``count`` 动作的效果的演示。你之前很可能应该已经看过这种用法。"
386389

387390
#: ../../howto/argparse.rst:506
388391
msgid ""
389392
"And if you don't specify the ``-v`` flag, that flag is considered to have "
390393
"``None`` value."
391-
msgstr ""
394+
msgstr "如果你不添加 ``-v`` 标志,这一标志的值会是 ``None``。"
392395

393396
#: ../../howto/argparse.rst:509
394397
msgid ""
395398
"As should be expected, specifying the long form of the flag, we should get "
396399
"the same output."
397-
msgstr ""
400+
msgstr "如期望的那样,添加该标志的长形态能够获得相同的输出。"
398401

399402
#: ../../howto/argparse.rst:512
400403
msgid ""
401404
"Sadly, our help output isn't very informative on the new ability our script "
402405
"has acquired, but that can always be fixed by improving the documentation "
403406
"for our script (e.g. via the ``help`` keyword argument)."
404407
msgstr ""
408+
"可惜的是,对于我们的脚本获得的新能力,我们的帮助输出并没有提供很多信息,但我们总是可以通过改善文档来修复这一问题(比如通过 ``help`` "
409+
"关键字参数)。"
405410

406411
#: ../../howto/argparse.rst:516
407412
msgid "That last output exposes a bug in our program."
408-
msgstr ""
413+
msgstr "最后一个输出暴露了我们程序中的一个 bug。"
409414

410415
#: ../../howto/argparse.rst:519
411416
msgid "Let's fix::"
412-
msgstr "让我们修复一下::"
417+
msgstr "让我们修复一下"
413418

414419
#: ../../howto/argparse.rst:538
415420
msgid "And this is what it gives:"
@@ -427,7 +432,7 @@ msgstr "第三组输出并不理想。"
427432

428433
#: ../../howto/argparse.rst:558
429434
msgid "Let's fix that bug::"
430-
msgstr "让我们修复那个 bug::"
435+
msgstr "让我们修复那个 bug"
431436

432437
#: ../../howto/argparse.rst:575
433438
msgid ""
@@ -437,6 +442,9 @@ msgid ""
437442
"value, and that cannot be compared to an int value (hence the "
438443
":exc:`TypeError` exception)."
439444
msgstr ""
445+
"我们刚刚引入了又一个新的关键字 ``default``。我们把它设置为 ``0`` "
446+
"来让它可以与其他整数值相互比较。记住,默认情况下如果一个可选参数没有被指定,它的值会是 ``None``,并且它不能和整数值相比较(所以产生了 "
447+
":exc:`TypeError` 异常)。"
440448

441449
#: ../../howto/argparse.rst:582
442450
msgid "And:"

0 commit comments

Comments
 (0)