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

Skip to content

Commit 320ed8e

Browse files
[po] auto sync
1 parent 442d0f2 commit 320ed8e

File tree

1 file changed

+24
-9
lines changed

1 file changed

+24
-9
lines changed

library/optparse.po

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -579,28 +579,33 @@ msgid ""
579579
"actions, ``store_true`` and ``store_false``. For example, you might have a "
580580
"``verbose`` flag that is turned on with ``-v`` and off with ``-q``::"
581581
msgstr ""
582+
"旗标选项 --- 当看到特定选项时将某个变量设为真值或假值 --- 是相当常见的。 :mod:`optparse` "
583+
"通过两个单独的动作支持它们,``store_true`` 和 ``store_false``。 例如,你可能会有个 ``verbose`` 旗标将通过 "
584+
"``-v`` 来启用并通过 ``-q`` 来禁用::"
582585

583586
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:390
584587
msgid ""
585588
"Here we have two different options with the same destination, which is "
586589
"perfectly OK. (It just means you have to be a bit careful when setting "
587590
"default values---see below.)"
588-
msgstr ""
591+
msgstr "这里我们有两个相同目标的不同选项,这是完全可行的。 (只是这意味着在设置默认值时你必须更加小心 --- 见下文所述。)"
589592

590593
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:394
591594
msgid ""
592595
"When :mod:`optparse` encounters ``-v`` on the command line, it sets "
593596
"``options.verbose`` to ``True``; when it encounters ``-q``, "
594597
"``options.verbose`` is set to ``False``."
595598
msgstr ""
599+
"当 :mod:`optparse` 在命令行中遇到 ``-v`` 时,它会将 ``options.verbose`` 设为 ``True``;当它遇到 "
600+
"``-q`` 时,则会将 ``options.verbose`` 设为 ``False``。"
596601

597602
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:402
598603
msgid "Other actions"
599-
msgstr ""
604+
msgstr "其他动作"
600605

601606
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:404
602607
msgid "Some other actions supported by :mod:`optparse` are:"
603-
msgstr ""
608+
msgstr "受到 :mod:`optparse` 支持的其他动作还有:"
604609

605610
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:407
606611
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:928
@@ -620,7 +625,7 @@ msgstr "``\"append\"``"
620625
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:410
621626
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:937
622627
msgid "append this option's argument to a list"
623-
msgstr ""
628+
msgstr "将此选项的参数添加到一个列表"
624629

625630
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:413
626631
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:943
@@ -630,7 +635,7 @@ msgstr "``\"count\"``"
630635
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:413
631636
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:943
632637
msgid "increment a counter by one"
633-
msgstr ""
638+
msgstr "让指定的计数器加一"
634639

635640
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:416
636641
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:946
@@ -661,19 +666,24 @@ msgid ""
661666
"control. :mod:`optparse` lets you supply a default value for each "
662667
"destination, which is assigned before the command line is parsed."
663668
msgstr ""
669+
"上述示例全都涉及当看到特定命令行选项时设置某些变量(即“目标”)的操作。 "
670+
"如果从未看到这些选项那么会发生什么叱?由于我们没有提供任何默认值,它们全都会被设为 ``None``。 这通常是可以的,但有时你会想要更多的控制。 "
671+
":mod:`optparse` 允许你为每个目标提供默认值,它们将在解析命令行之前被赋值。"
664672

665673
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:434
666674
msgid ""
667675
"First, consider the verbose/quiet example. If we want :mod:`optparse` to "
668676
"set ``verbose`` to ``True`` unless ``-q`` is seen, then we can do this::"
669677
msgstr ""
678+
"首先,考虑这个 verbose/quiet 示例。 如果我们希望 :mod:`optparse` 将 ``verbose`` 设为 ``True`` "
679+
"除非看到了 ``-q``,那么我们可以这样做::"
670680

671681
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:440
672682
msgid ""
673683
"Since default values apply to the *destination* rather than to any "
674684
"particular option, and these two options happen to have the same "
675685
"destination, this is exactly equivalent::"
676-
msgstr ""
686+
msgstr "由于默认值将应用到 *destination* 而不是任何特定选项,并且这两个选项正好具有相同的目标,因此这是完全等价的::"
677687

678688
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:447
679689
msgid "Consider this::"
@@ -683,25 +693,27 @@ msgstr "考虑一下:"
683693
msgid ""
684694
"Again, the default value for ``verbose`` will be ``True``: the last default "
685695
"value supplied for any particular destination is the one that counts."
686-
msgstr ""
696+
msgstr "同样地,``verbose`` 的默认值将为 ``True``: 最终生效的将是最后提供给任何特定目标的默认值。"
687697

688698
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:455
689699
msgid ""
690700
"A clearer way to specify default values is the :meth:`set_defaults` method "
691701
"of OptionParser, which you can call at any time before calling "
692702
":meth:`parse_args`::"
693703
msgstr ""
704+
"一种更清晰的默认值指定方式是使用 OptionParser 的 :meth:`set_defaults` 方法,你可以在调用 "
705+
":meth:`parse_args` 之前的任何时候调用它::"
694706

695707
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:462
696708
msgid ""
697709
"As before, the last value specified for a given option destination is the "
698710
"one that counts. For clarity, try to use one method or the other of setting"
699711
" default values, not both."
700-
msgstr ""
712+
msgstr "如前面一样,最终生效的将是最后为特定选项目标指定的值。 为清楚起见,请使用一种或另外一种设置默认值的方法,而不要同时使用。"
701713

702714
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:470
703715
msgid "Generating help"
704-
msgstr ""
716+
msgstr "生成帮助"
705717

706718
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:472
707719
msgid ""
@@ -711,6 +723,9 @@ msgid ""
711723
"short usage message for your whole program. Here's an OptionParser "
712724
"populated with user-friendly (documented) options::"
713725
msgstr ""
726+
":mod:`optparse` 自动生成帮助和用法文本的功能适用于创建用户友好的命令行界面。 你所要做的只是为每个选项提供 "
727+
":attr:`~Option.help` 值,并可选项为你的整个程序提供一条简短的用法消息。 下面是一个填充了用户友好的(文档)选项的 "
728+
"OptionParser::"
714729

715730
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:493
716731
msgid ""

0 commit comments

Comments
 (0)