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

Skip to content

Commit 91d2e2b

Browse files
[po] auto sync
1 parent 320ed8e commit 91d2e2b

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
@@ -733,43 +733,49 @@ msgid ""
733733
"line, or if you just call :meth:`parser.print_help`, it prints the following"
734734
" to standard output:"
735735
msgstr ""
736+
"如果 :mod:`optparse` 在命令行中遇到了 ``-h`` 或 ``--help``,或者如果你调用了 "
737+
":meth:`parser.print_help`,它会把以下内容打印到标准输出:"
736738

737739
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:510
738740
msgid ""
739741
"(If the help output is triggered by a help option, :mod:`optparse` exits "
740742
"after printing the help text.)"
741-
msgstr ""
743+
msgstr "(如果帮助输出是由 help 选项触发的,:mod:`optparse` 将在打印帮助文本之后退出。)"
742744

743745
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:513
744746
msgid ""
745747
"There's a lot going on here to help :mod:`optparse` generate the best "
746748
"possible help message:"
747-
msgstr ""
749+
msgstr "在这里为帮助 :mod:`optparse` 生成尽可能好的帮助消息做了很多工作:"
748750

749751
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:516
750752
msgid "the script defines its own usage message::"
751-
msgstr ""
753+
msgstr "该脚本定义了自己的用法消息::"
752754

753755
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:520
754756
msgid ""
755757
":mod:`optparse` expands ``%prog`` in the usage string to the name of the "
756758
"current program, i.e. ``os.path.basename(sys.argv[0])``. The expanded "
757759
"string is then printed before the detailed option help."
758760
msgstr ""
761+
":mod:`optparse` 会将用法字符串中的 ``%prog`` 扩展为当前程序的名称,即 "
762+
"``os.path.basename(sys.argv[0])``。 随后将在详细选项帮助之前打印这个经过扩展的字符串。"
759763

760764
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:524
761765
msgid ""
762766
"If you don't supply a usage string, :mod:`optparse` uses a bland but "
763767
"sensible default: ``\"Usage: %prog [options]\"``, which is fine if your "
764768
"script doesn't take any positional arguments."
765769
msgstr ""
770+
"如果你未提供用法字符串,:mod:`optparse` 将使用一个直白而合理的默认值: ``\"Usage: %prog "
771+
"[options]\"``,这在你的脚本不接受任何位置参数时是可以的。"
766772

767773
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:528
768774
msgid ""
769775
"every option defines a help string, and doesn't worry about line-"
770776
"wrapping---\\ :mod:`optparse` takes care of wrapping lines and making the "
771777
"help output look good."
772-
msgstr ""
778+
msgstr "每个选项都定义了帮助字符串,并且不用担心换行问题 --- :mod:`optparse` 将负责执行换行并使帮助输出有良好的外观格式。"
773779

774780
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:532
775781
msgid ""
@@ -796,6 +802,8 @@ msgid ""
796802
" effective way to make your help text a lot clearer and more useful for end "
797803
"users."
798804
msgstr ""
805+
"不过,这具有比节省一点空间更重要的作用:手动编写的帮助文本使用元变量 ``FILE`` 来提示用户在半正式的语法 ``-f FILE`` 和非正式的描述"
806+
" \"write output to FILE\" 之间存在联系。 这是一种使你的帮助文本更清晰并对最终用户来说更易用的简单而有效的方式。"
799807

800808
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:552
801809
msgid ""
@@ -804,17 +812,21 @@ msgid ""
804812
" default value. If an option has no default value (or the default value is "
805813
"``None``), ``%default`` expands to ``none``."
806814
msgstr ""
815+
"具有默认值的选项可以在帮助字符串中包括 ``%default`` --- :mod:`optparse` 将用该选项的默认值的 :func:`str` "
816+
"来替代它。 如果一个选项没有默认值 (或默认值为 ``None``),则 ``%default`` 将被扩展为 ``none``。"
807817

808818
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:558
809819
msgid "Grouping Options"
810-
msgstr ""
820+
msgstr "选项分组"
811821

812822
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:560
813823
msgid ""
814824
"When dealing with many options, it is convenient to group these options for "
815825
"better help output. An :class:`OptionParser` can contain several option "
816826
"groups, each of which can contain several options."
817827
msgstr ""
828+
"在处理大量选项时,可以方便地将选项进行分组以提供更好的帮助输出。 :class:`OptionParser` "
829+
"可以包含多个选项分组,每个分组可以包含多个选项。"
818830

819831
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:564
820832
msgid "An option group is obtained using the class :class:`OptionGroup`:"

0 commit comments

Comments
 (0)