Skip to content

Commit 442d0f2

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

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

library/optparse.po

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,45 +501,52 @@ msgstr "例如 ::"
501501
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:335
502502
msgid ""
503503
"Now let's make up a fake command line and ask :mod:`optparse` to parse it::"
504-
msgstr ""
504+
msgstr "现在让我们编一个虚假的命令行并让 :mod:`optparse` 来解析它::"
505505

506506
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:340
507507
msgid ""
508508
"When :mod:`optparse` sees the option string ``-f``, it consumes the next "
509509
"argument, ``foo.txt``, and stores it in ``options.filename``. So, after "
510510
"this call to :meth:`parse_args`, ``options.filename`` is ``\"foo.txt\"``."
511511
msgstr ""
512+
"当 :mod:`optparse` 看到选项字符串 ``-f`` 时,它将获取下一个参数 ``foo.txt``,并将其保存到 "
513+
"``options.filename`` 中。 因此,在这个对 :meth:`parse_args` "
514+
"的调用之后,``options.filename`` 将为 ``\"foo.txt\"``。"
512515

513516
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:344
514517
msgid ""
515518
"Some other option types supported by :mod:`optparse` are ``int`` and "
516519
"``float``. Here's an option that expects an integer argument::"
517-
msgstr ""
520+
msgstr "受到 :mod:`optparse` 支持的其他一些选项类型有 ``int`` 和 ``float``。 下面是一个接受整数参数的选项::"
518521

519522
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:349
520523
msgid ""
521524
"Note that this option has no long option string, which is perfectly "
522525
"acceptable. Also, there's no explicit action, since the default is "
523526
"``store``."
524-
msgstr ""
527+
msgstr "请注意这个选项没有长选项字符串,这是完全可接受的。 而且,它也没有显式的动作,因为使用默认的 ``store``。"
525528

526529
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:352
527530
msgid ""
528531
"Let's parse another fake command-line. This time, we'll jam the option "
529532
"argument right up against the option: since ``-n42`` (one argument) is "
530533
"equivalent to ``-n 42`` (two arguments), the code ::"
531534
msgstr ""
535+
"让我们解析另一个虚假的命令行。 这一次,我们将让选项参数与选项紧贴在一起:因为 ``-n42`` (一个参数) 与 ``-n 42`` (两个参数) "
536+
"是等价的,以下代码 ::"
532537

533538
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:359
534539
msgid "will print ``42``."
535-
msgstr ""
540+
msgstr "将会打印 ``42``。"
536541

537542
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:361
538543
msgid ""
539544
"If you don't specify a type, :mod:`optparse` assumes ``string``. Combined "
540545
"with the fact that the default action is ``store``, that means our first "
541546
"example can be a lot shorter::"
542547
msgstr ""
548+
"如果你没有指明类型,:mod:`optparse` 会假定类型为 ``string``。 加上默认动作为 ``store`` "
549+
"这一事实,意味着我们的第一个示例可以变得更加简短::"
543550

544551
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:367
545552
msgid ""
@@ -549,16 +556,21 @@ msgid ""
549556
"option strings, :mod:`optparse` looks at the first short option string: the "
550557
"default destination for ``-f`` is ``f``."
551558
msgstr ""
559+
"如果你没有提供目标,:mod:`optparse` 会从选项字符串推断出一个合理的默认目标:如果第一个长选项字符串为 ``--foo-"
560+
"bar``,则默认目标为 ``foo_bar``。 如果没有长选项字符串,则 :mod:`optparse` 会查找第一个短选项字符串:针对 "
561+
"``-f`` 的默认目标将为 ``f``。"
552562

553563
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:373
554564
msgid ""
555565
":mod:`optparse` also includes the built-in ``complex`` type. Adding types "
556566
"is covered in section :ref:`optparse-extending-optparse`."
557567
msgstr ""
568+
":mod:`optparse` 还包括了内置的 ``complex`` 类型。 添加类型的方式将在 :ref:`optparse-extending-"
569+
"optparse` 一节中介绍。"
558570

559571
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:380
560572
msgid "Handling boolean (flag) options"
561-
msgstr ""
573+
msgstr "处理布尔值(旗标)选项"
562574

563575
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:382
564576
msgid ""

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy