Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit36a1c45

Browse files
[po] auto sync
1 parentddfeb44 commit36a1c45

File tree

12 files changed

+1152
-1263
lines changed

12 files changed

+1152
-1263
lines changed

‎.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation":"81.79%","updated_at":"2025-06-06T02:28:25Z"}
1+
{"translation":"81.70%","updated_at":"2025-06-06T15:55:52Z"}

‎c-api/module.po

Lines changed: 121 additions & 117 deletions
Large diffs are not rendered by default.

‎howto/isolating-extensions.po

Lines changed: 95 additions & 97 deletions
Large diffs are not rendered by default.

‎howto/urllib2.po

Lines changed: 73 additions & 198 deletions
Large diffs are not rendered by default.

‎library/argparse.po

Lines changed: 40 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version:Python 3.13\n"
1414
"Report-Msgid-Bugs-To:\n"
15-
"POT-Creation-Date:2025-05-16 14:58+0000\n"
15+
"POT-Creation-Date:2025-06-06 14:57+0000\n"
1616
"PO-Revision-Date:2025-05-08 05:09+0000\n"
1717
"Last-Translator:Freesand Leo <yuqinju@163.com>, 2025\n"
1818
"Language-Team:Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -3795,20 +3795,21 @@ msgstr "部分解析"
37953795

37963796
#:../../library/argparse.rst:2016
37973797
msgid""
3798-
"Sometimes a script may only parse a few of the command-line arguments, "
3799-
"passing the remaining arguments on to another script or program. In these "
3800-
"cases, the :meth:`~ArgumentParser.parse_known_args` method can be useful. "
3801-
"It works much like :meth:`~ArgumentParser.parse_args` except that it does "
3802-
"not produce an error when extra arguments are present. Instead, it returns "
3803-
"a two item tuple containing the populated namespace and the list of "
3804-
"remaining argument strings."
3798+
"Sometimes a script only needs to handle a specific set of command-line "
3799+
"arguments, leaving any unrecognized arguments for another script or program."
3800+
" In these cases, the :meth:`~ArgumentParser.parse_known_args` method can be "
3801+
"useful."
38053802
msgstr""
3806-
"有时一个脚本可能只解析部分命令行参数,而将其余的参数继续传递给另一个脚本或程序。 "
3807-
"在这种情况下,:meth:`~ArgumentParser.parse_known_args` 方法会很有用处。 它的作用方式很类似 "
3808-
":meth:`~ArgumentParser.parse_args` 但区别在于当存在额外参数时它不会产生错误。 "
3809-
"而是会返回一个由两个条目构成的元组,其中包含带成员的命名空间和剩余参数字符串的列表。"
38103803

3811-
#:../../library/argparse.rst:2025
3804+
#:../../library/argparse.rst:2021
3805+
msgid""
3806+
"This method works similarly to :meth:`~ArgumentParser.parse_args`, but it "
3807+
"does not raise an error for extra, unrecognized arguments. Instead, it "
3808+
"parses the known arguments and returns a two item tuple that contains the "
3809+
"populated namespace and the list of any unrecognized arguments."
3810+
msgstr""
3811+
3812+
#:../../library/argparse.rst:2028
38123813
msgid""
38133814
">>> parser = argparse.ArgumentParser()\n"
38143815
">>> parser.add_argument('--foo', action='store_true')\n"
@@ -3822,7 +3823,7 @@ msgstr ""
38223823
">>> parser.parse_known_args(['--foo', '--badger', 'BAR', 'spam'])\n"
38233824
"(Namespace(bar='BAR', foo=True), ['--badger', 'spam'])"
38243825

3825-
#:../../library/argparse.rst:2032
3826+
#:../../library/argparse.rst:2035
38263827
msgid""
38273828
":ref:`Prefix matching <prefix-matching>` rules apply to "
38283829
":meth:`~ArgumentParser.parse_known_args`. The parser may consume an option "
@@ -3833,11 +3834,11 @@ msgstr ""
38333834
":meth:`~ArgumentParser.parse_known_args`。 "
38343835
"一个解析器即使在某个选项只是已知选项的前缀时也能读取该选项,而不是将其放入剩余参数列表。"
38353836

3836-
#:../../library/argparse.rst:2039
3837+
#:../../library/argparse.rst:2042
38373838
msgid"Customizing file parsing"
38383839
msgstr"自定义文件解析"
38393840

3840-
#:../../library/argparse.rst:2043
3841+
#:../../library/argparse.rst:2046
38413842
msgid""
38423843
"Arguments that are read from a file (see the *fromfile_prefix_chars* keyword"
38433844
" argument to the :class:`ArgumentParser` constructor) are read one argument "
@@ -3847,7 +3848,7 @@ msgstr ""
38473848
"从文件读取的参数(见 :class:`ArgumentParser` 的 *fromfile_prefix_chars* "
38483849
"关键字参数)将是一行读取一个参数。 :meth:`convert_arg_line_to_args` 可被重写以使用更复杂的读取方式。"
38493850

3850-
#:../../library/argparse.rst:2048
3851+
#:../../library/argparse.rst:2051
38513852
msgid""
38523853
"This method takes a single argument *arg_line* which is a string read from "
38533854
"the argument file. It returns a list of arguments parsed from this string. "
@@ -3856,13 +3857,13 @@ msgstr ""
38563857
"此方法接受从参数文件读取的字符串形式的单个参数 *arg_line*。 它返回从该字符串解析出的参数列表。 "
38573858
"此方法将在每次按顺序从参数文件读取一行时被调用一次。"
38583859

3859-
#:../../library/argparse.rst:2052
3860+
#:../../library/argparse.rst:2055
38603861
msgid""
38613862
"A useful override of this method is one that treats each space-separated "
38623863
"word as an argument. The following example demonstrates how to do this::"
38633864
msgstr"此方法的一个有用的重写是将每个以空格分隔的单词视为一个参数。 下面的例子演示了如何实现这一点::"
38643865

3865-
#:../../library/argparse.rst:2055
3866+
#:../../library/argparse.rst:2058
38663867
msgid""
38673868
"class MyArgumentParser(argparse.ArgumentParser):\n"
38683869
" def convert_arg_line_to_args(self, arg_line):\n"
@@ -3872,11 +3873,11 @@ msgstr ""
38723873
" def convert_arg_line_to_args(self, arg_line):\n"
38733874
" return arg_line.split()"
38743875

3875-
#:../../library/argparse.rst:2061
3876+
#:../../library/argparse.rst:2064
38763877
msgid"Exiting methods"
38773878
msgstr"退出方法"
38783879

3879-
#:../../library/argparse.rst:2065
3880+
#:../../library/argparse.rst:2068
38803881
msgid""
38813882
"This method terminates the program, exiting with the specified *status* and,"
38823883
" if given, it prints a *message* to :data:`sys.stderr` before that. The user"
@@ -3885,7 +3886,7 @@ msgstr ""
38853886
"此方法将终结程序,退出时附带指定的 *status*,并且如果给出了 *message* 则会在退出前将其打印到 :data:`sys.stderr`。"
38863887
" 用户可重写此方法以不同方式来处理这些步骤::"
38873888

3888-
#:../../library/argparse.rst:2069
3889+
#:../../library/argparse.rst:2072
38893890
msgid""
38903891
"class ErrorCatchingArgumentParser(argparse.ArgumentParser):\n"
38913892
" def exit(self, status=0, message=None):\n"
@@ -3899,17 +3900,17 @@ msgstr ""
38993900
" raise Exception(f'Exiting because of an error: {message}')\n"
39003901
" exit(status)"
39013902

3902-
#:../../library/argparse.rst:2077
3903+
#:../../library/argparse.rst:2080
39033904
msgid""
39043905
"This method prints a usage message, including the *message*, to "
39053906
":data:`sys.stderr` and terminates the program with a status code of 2."
39063907
msgstr"此方法将把用法消息包括 *message* 打印到 :data:`sys.stderr` 并附带状态码 2 终结程序。"
39073908

3908-
#:../../library/argparse.rst:2082
3909+
#:../../library/argparse.rst:2085
39093910
msgid"Intermixed parsing"
39103911
msgstr"混合解析"
39113912

3912-
#:../../library/argparse.rst:2087
3913+
#:../../library/argparse.rst:2090
39133914
msgid""
39143915
"A number of Unix commands allow the user to intermix optional arguments with"
39153916
" positional arguments. The :meth:`~ArgumentParser.parse_intermixed_args` "
@@ -3919,7 +3920,7 @@ msgstr ""
39193920
"许多 Unix 命令允许用户混用可选参数与位置参数。 :meth:`~ArgumentParser.parse_intermixed_args` 和 "
39203921
":meth:`~ArgumentParser.parse_known_intermixed_args` 方法均支持这种解析风格。"
39213922

3922-
#:../../library/argparse.rst:2092
3923+
#:../../library/argparse.rst:2095
39233924
msgid""
39243925
"These parsers do not support all the :mod:`!argparse` features, and will "
39253926
"raise exceptions if unsupported features are used. In particular, "
@@ -3929,7 +3930,7 @@ msgstr ""
39293930
"这些解析器并不支持所有的 :mod:`!argparse` 特性,并且当不受支持的特性被使用时将会引发异常。 "
39303931
"具体来说,子解析器以及同时包括可选参数和位置参数的互斥分组是不受支持的。"
39313932

3932-
#:../../library/argparse.rst:2097
3933+
#:../../library/argparse.rst:2100
39333934
msgid""
39343935
"The following example shows the difference between "
39353936
":meth:`~ArgumentParser.parse_known_args` and "
@@ -3941,7 +3942,7 @@ msgstr ""
39413942
":meth:`~ArgumentParser.parse_intermixed_args` 之间的差异:前者会将 ``['2', '3']`` "
39423943
"返回为未解析的参数,而后者会将所有位置参数收集至 ``rest`` 中。 ::"
39433944

3944-
#:../../library/argparse.rst:2103
3945+
#:../../library/argparse.rst:2106
39453946
msgid""
39463947
">>> parser = argparse.ArgumentParser()\n"
39473948
">>> parser.add_argument('--foo')\n"
@@ -3961,7 +3962,7 @@ msgstr ""
39613962
">>> parser.parse_intermixed_args('doit 1 --foo bar 2 3'.split())\n"
39623963
"Namespace(cmd='doit', foo='bar', rest=[1, 2, 3])"
39633964

3964-
#:../../library/argparse.rst:2112
3965+
#:../../library/argparse.rst:2115
39653966
msgid""
39663967
":meth:`~ArgumentParser.parse_known_intermixed_args` returns a two item tuple"
39673968
" containing the populated namespace and the list of remaining argument "
@@ -3972,11 +3973,11 @@ msgstr ""
39723973
"返回由两个条目组成的元组,其中包含带成员的命名空间以及剩余参数字符串列表。 当存在任何剩余的未解析参数字符串时 "
39733974
":meth:`~ArgumentParser.parse_intermixed_args` 将引发一个错误。"
39743975

3975-
#:../../library/argparse.rst:2121
3976+
#:../../library/argparse.rst:2124
39763977
msgid"Registering custom types or actions"
39773978
msgstr"注册自定义的类型或动作"
39783979

3979-
#:../../library/argparse.rst:2125
3980+
#:../../library/argparse.rst:2128
39803981
msgid""
39813982
"Sometimes it's desirable to use a custom string in error messages to provide"
39823983
" more user-friendly output. In these cases, :meth:`!register` can be used to"
@@ -3986,7 +3987,7 @@ msgstr ""
39863987
"在某些时候有必要在错误消息中使用自定义的字符串以提供对用户更友好的输出。 在这种情况下,可以使用 :meth:`!register` "
39873988
"来注册带有解析器的自定义动作或类型并允许你按其注册名称而非其可调用对象名称来引用该类型。"
39883989

3989-
#:../../library/argparse.rst:2130
3990+
#:../../library/argparse.rst:2133
39903991
msgid""
39913992
"The :meth:`!register` method accepts three arguments - a *registry_name*, "
39923993
"specifying the internal registry where the object will be stored (e.g., "
@@ -3996,12 +3997,12 @@ msgstr ""
39963997
":meth:`!register` 方法接受三个参数 —— *registry_name*,指定将要存储对象的内部注册表 (例如 ``action``,"
39973998
" ``type``),*value*,将要注册对象对应的键,以及 object,将要注册的可调用对象。"
39983999

3999-
#:../../library/argparse.rst:2135
4000+
#:../../library/argparse.rst:2138
40004001
msgid""
40014002
"The following example shows how to register a custom type with a parser::"
40024003
msgstr"下面的例子演示了如何注册一个带解析器的自定义类型::"
40034004

4004-
#:../../library/argparse.rst:2137
4005+
#:../../library/argparse.rst:2140
40054006
msgid""
40064007
">>> import argparse\n"
40074008
">>> parser = argparse.ArgumentParser()\n"
@@ -4025,26 +4026,26 @@ msgstr ""
40254026
"usage: PROG [-h] [--foo FOO]\n"
40264027
"PROG: error: argument --foo: invalid 'hexadecimal integer' value: '1.2'"
40274028

4028-
#:../../library/argparse.rst:2149
4029+
#:../../library/argparse.rst:2152
40294030
msgid"Exceptions"
40304031
msgstr"异常"
40314032

4032-
#:../../library/argparse.rst:2153
4033+
#:../../library/argparse.rst:2156
40334034
msgid"An error from creating or using an argument (optional or positional)."
40344035
msgstr"来自创建或使用某个参数的消息(可选或位置参数)。"
40354036

4036-
#:../../library/argparse.rst:2155
4037+
#:../../library/argparse.rst:2158
40374038
msgid""
40384039
"The string value of this exception is the message, augmented with "
40394040
"information about the argument that caused it."
40404041
msgstr"此异常的字符串值即异常消息,并附带有导致该异常的参数的相关信息。"
40414042

4042-
#:../../library/argparse.rst:2160
4043+
#:../../library/argparse.rst:2163
40434044
msgid""
40444045
"Raised when something goes wrong converting a command line string to a type."
40454046
msgstr"当从一个命令行字符串到特定类型的转换出现问题时引发。"
40464047

4047-
#:../../library/argparse.rst:2164
4048+
#:../../library/argparse.rst:2167
40484049
msgid"Guides and Tutorials"
40494050
msgstr"指南与教程"
40504051

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp