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

Skip to content

Commit a3fcfc0

Browse files
[po] auto sync
1 parent 399b1fd commit a3fcfc0

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

library/optparse.po

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2061,6 +2061,7 @@ msgid ""
20612061
"At this point, the original ``-n``/``--dry-run`` option is no longer "
20622062
"accessible, so :mod:`optparse` removes it, leaving this help text::"
20632063
msgstr ""
2064+
"这时,原有的 ``-n``/``--dry-run`` 选项将不再可用,因此 :mod:`optparse` 会将其移除,帮助文本将变成这样::"
20642065

20652066
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1483
20662067
msgid "Cleanup"
@@ -2075,14 +2076,17 @@ msgid ""
20752076
" long-running applications where large object graphs are reachable from your"
20762077
" OptionParser."
20772078
msgstr ""
2079+
"OptionParser 实例存在一些循环引用。 这对 Python 的垃圾回收器来说应该不是问题,但你可能希望在你完成对 OptionParser "
2080+
"的使用后通过调用其 :meth:`~OptionParser.destroy` 来显式地中断循环引用。 这在可以从你的 OptionParser "
2081+
"访问大型对象图的长期运行应用程序中特别有用。"
20782082

20792083
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1496
20802084
msgid "Other methods"
2081-
msgstr ""
2085+
msgstr "其他方法"
20822086

20832087
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1498
20842088
msgid "OptionParser supports several other public methods:"
2085-
msgstr ""
2089+
msgstr "OptionParser 还支持其他一些公有方法:"
20862090

20872091
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1502
20882092
msgid ""
@@ -2091,6 +2095,8 @@ msgid ""
20912095
"usage string; use :data:`optparse.SUPPRESS_USAGE` to suppress a usage "
20922096
"message."
20932097
msgstr ""
2098+
"根据上述的规则为 ``usage`` 构造器关键字参数设置用法字符串。 传入 ``None`` 将设置默认的用法字符串;使用 "
2099+
":data:`optparse.SUPPRESS_USAGE` 将屏蔽用法消息。"
20942100

20952101
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1508
20962102
msgid ""
@@ -2099,12 +2105,14 @@ msgid ""
20992105
"is replaced with the name of the current program. Does nothing if "
21002106
"``self.usage`` is empty or not defined."
21012107
msgstr ""
2108+
"将当前程序的用法消息 (``self.usage``) 打印到 *file* (默认为 stdout)。 出现在 ``self.usage`` "
2109+
"中的字符串 ``%prog`` 将全部被替换为当前程序的名称。 如果 ``self.usage`` 为空或未定义则不做任何事情。"
21022110

21032111
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1515
21042112
msgid ""
21052113
"Same as :meth:`print_usage` but returns the usage string instead of printing"
21062114
" it."
2107-
msgstr ""
2115+
msgstr "与 :meth:`print_usage` 类似但是将返回用法字符串而不是打印它。"
21082116

21092117
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1520
21102118
msgid ""
@@ -2114,14 +2122,16 @@ msgid ""
21142122
"several \"mode\" options all set the same destination, any one of them can "
21152123
"set the default, and the last one wins::"
21162124
msgstr ""
2125+
"一次性地为多个选项目标设置默认值。 使用 :meth:`set_defaults` 是为选项设置默认值的推荐方式同,因为多个选项可以共享同一个目标。 "
2126+
"举例来说,如果几个 \"mode\" 选项全部设置了相同的目标,则它们中的任何一个都可以设置默认值,而最终生效的将是最后一次设置的默认值::"
21172127

21182128
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1533
21192129
msgid "To avoid this confusion, use :meth:`set_defaults`::"
2120-
msgstr ""
2130+
msgstr "为避免混淆,请使用 :meth:`set_defaults`::"
21212131

21222132
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1545
21232133
msgid "Option Callbacks"
2124-
msgstr ""
2134+
msgstr "选项回调"
21252135

21262136
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1547
21272137
msgid ""
@@ -2130,24 +2140,26 @@ msgid ""
21302140
"callback option. Extending :mod:`optparse` is more general, but overkill for"
21312141
" a lot of simple cases. Quite often a simple callback is all you need."
21322142
msgstr ""
2143+
"当 :mod:`optparse` 的内置动作和类型不能满足你的需要时,你有两个选择:扩展 :mod:`optparse` 或定义一个 callback"
2144+
" 选项。 扩展 :mod:`optparse` 的方式更为通用,但对许多简单场景来说是大材小用了。 你所需要的往往只是一个简单的回调。"
21332145

21342146
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1552
21352147
msgid "There are two steps to defining a callback option:"
2136-
msgstr ""
2148+
msgstr "定义一个回调选项分为两步:"
21372149

21382150
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1554
21392151
msgid "define the option itself using the ``\"callback\"`` action"
2140-
msgstr ""
2152+
msgstr "使用 ``\"callback\"`` 动作定义选项本身"
21412153

21422154
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1556
21432155
msgid ""
21442156
"write the callback; this is a function (or method) that takes at least four "
21452157
"arguments, as described below"
2146-
msgstr ""
2158+
msgstr "编写回调;它是一个接受至少四个参数的函数(或方法),如下所述"
21472159

21482160
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1563
21492161
msgid "Defining a callback option"
2150-
msgstr ""
2162+
msgstr "定义回调选项"
21512163

21522164
#: /home/runner/work/docspush-transifex/docspush-transifex/cpython/Doc/library/optparse.rst:1565
21532165
msgid ""

0 commit comments

Comments
 (0)