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

Skip to content

Commit 13a1dcd

Browse files
[po] auto sync
1 parent 936ca97 commit 13a1dcd

3 files changed

Lines changed: 39 additions & 16 deletions

File tree

howto/clinic.po

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# telnetning <[email protected]>, 2020
1111
# Alpha Du <[email protected]>, 2020
1212
# ppcfish <[email protected]>, 2020
13-
# Freesand Leo <[email protected]>, 2022
1413
# Dai Xu <[email protected]>, 2022
14+
# Freesand Leo <[email protected]>, 2022
1515
#
1616
#, fuzzy
1717
msgid ""
@@ -20,7 +20,7 @@ msgstr ""
2020
"Report-Msgid-Bugs-To: \n"
2121
"POT-Creation-Date: 2021-01-01 16:06+0000\n"
2222
"PO-Revision-Date: 2020-05-30 11:54+0000\n"
23-
"Last-Translator: Dai Xu <daixu61@hotmail.com>, 2022\n"
23+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2022\n"
2424
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2525
"MIME-Version: 1.0\n"
2626
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1490,16 +1490,19 @@ msgid ""
14901490
":c:func:`PyBuffer_Release` on the provided buffer. Argument Clinic generates"
14911491
" code that does it for you (in the parsing function)."
14921492
msgstr ""
1493+
"在使用 ``Py_buffer`` 转换器(或者 ``'s*'``、``'w*'``、``'*y'`` 或 ``'z*'`` 传统转换器)时,*不可* "
1494+
"在所提供的缓冲区上调用 :c:func:`PyBuffer_Release`。 Argument Clinic "
1495+
"生成的代码会自动完成此操作(在解析函数中)。"
14931496

14941497
#: ../../howto/clinic.rst:903
14951498
msgid "Advanced converters"
1496-
msgstr ""
1499+
msgstr "高级转换器"
14971500

14981501
#: ../../howto/clinic.rst:905
14991502
msgid ""
15001503
"Remember those format units you skipped for your first time because they "
15011504
"were advanced? Here's how to handle those too."
1502-
msgstr ""
1505+
msgstr "还记得初次尝试时跳过的那些格式单元吗,因为他们是高级内容?下面就来介绍这些内容。"
15031506

15041507
#: ../../howto/clinic.rst:908
15051508
msgid ""
@@ -1511,6 +1514,10 @@ msgid ""
15111514
"``O&``), ``subclass_of`` (for ``O!``), or ``encoding`` (for all the format "
15121515
"units that start with ``e``)."
15131516
msgstr ""
1517+
"其实诀窍在于,这些格式单元都需要给出参数——要么是转换函数,要么是类型,要么是指定编码的字符串。(但 "
1518+
"“传统转换器”不支持参数。这就是为什么第一个函数要跳过这些内容)。为格式单元指定的参数于是就成了转换器的参数;参数可以是 "
1519+
"``converter``(对于 ``O&``)、``subclass_of``(对于 ``O!``),或者是 ``encoding`` (对于 "
1520+
"``e`` 开头的格式单元)。"
15141521

15151522
#: ../../howto/clinic.rst:916
15161523
msgid ""
@@ -1520,6 +1527,9 @@ msgid ""
15201527
"is a subclass of ``PyUnicode_Type``, you probably want to use the converter "
15211528
"``object(type='PyUnicodeObject *', subclass_of='&PyUnicode_Type')``."
15221529
msgstr ""
1530+
"在使用 ``subclass_of`` 时,可能还需要用到 ``object()`` "
1531+
"的另一个自定义参数:``type``,用于设置参数的实际类型。例如,为了确保对象是 ``PyUnicode_Type`` 的子类,可能想采用转换器 "
1532+
"``object(type='PyUnicodeObject *', subclass_of='&PyUnicode_Type')``。"
15231533

15241534
#: ../../howto/clinic.rst:922
15251535
msgid ""
@@ -1533,30 +1543,34 @@ msgid ""
15331543
"unreasonable; CPython itself always passes in static hard-coded encoding "
15341544
"strings for parameters whose format units start with ``e``."
15351545
msgstr ""
1546+
"Argument Clinic 用起来可能存在一个问题:丧失了 ``e`` 开头的格式单位的一些灵活性。在手工编写 ``PyArg_Parse`` "
1547+
"调用时,理论上可以在运行时决定传给 :c:func:`PyArg_ParseTuple` 的编码字符串。但现在这个字符串必须在 Argument-"
1548+
"Clinic 预处理时进行硬编码。这个限制是故意设置的;以便简化对这种格式单元的支持,并允许以后进行优化。这个限制似乎并不合理;CPython "
1549+
"本身总是为 ``e`` 开头的格式单位参数传入静态的硬编码字符串。"
15361550

15371551
#: ../../howto/clinic.rst:935
15381552
msgid "Parameter default values"
1539-
msgstr ""
1553+
msgstr "参数的默认值"
15401554

15411555
#: ../../howto/clinic.rst:937
15421556
msgid ""
15431557
"Default values for parameters can be any of a number of values. At their "
15441558
"simplest, they can be string, int, or float literals:"
1545-
msgstr ""
1559+
msgstr "参数的默认值可以是多个值中的一个。最简单的可以是字符串、int 或 float 字面量。"
15461560

15471561
#: ../../howto/clinic.rst:946
15481562
msgid "They can also use any of Python's built-in constants:"
1549-
msgstr ""
1563+
msgstr "还可以使用 Python 的任何内置常量。"
15501564

15511565
#: ../../howto/clinic.rst:954
15521566
msgid ""
15531567
"There's also special support for a default value of ``NULL``, and for simple"
15541568
" expressions, documented in the following sections."
1555-
msgstr ""
1569+
msgstr "对默认值 ``NULL`` 和简单表达式还提供特别的支持,后续章节中将会介绍。"
15561570

15571571
#: ../../howto/clinic.rst:959
15581572
msgid "The ``NULL`` default value"
1559-
msgstr ""
1573+
msgstr "默认值 ``NULL``"
15601574

15611575
#: ../../howto/clinic.rst:961
15621576
msgid ""
@@ -1567,22 +1581,25 @@ msgid ""
15671581
"behaves like a default value of ``None``, but the C variable is initialized "
15681582
"with ``NULL``."
15691583
msgstr ""
1584+
"对于字符串和对象参数而言,可以设为 ``None``,表示没有默认值。但这意味着会将 C 变量初始化为 "
1585+
"``Py_None``。为了方便起见,提供了一个特殊值``NULL``,目的就是为了让 Python 认为默认值就是 ``None``,而 C "
1586+
"变量则会初始化为 ``NULL``。"
15701587

15711588
#: ../../howto/clinic.rst:969
15721589
msgid "Expressions specified as default values"
1573-
msgstr ""
1590+
msgstr "设为默认值的表达式"
15741591

15751592
#: ../../howto/clinic.rst:971
15761593
msgid ""
15771594
"The default value for a parameter can be more than just a literal value. It "
15781595
"can be an entire expression, using math operators and looking up attributes "
15791596
"on objects. However, this support isn't exactly simple, because of some "
15801597
"non-obvious semantics."
1581-
msgstr ""
1598+
msgstr "参数的默认值不仅可以是字面量。还可以是一个完整的表达式,可采用数学运算符及对象的属性。但这种支持并没有那么简单,因为存在一些不明显的语义。"
15821599

15831600
#: ../../howto/clinic.rst:976
15841601
msgid "Consider the following example:"
1585-
msgstr ""
1602+
msgstr "请考虑以下例子:"
15861603

15871604
#: ../../howto/clinic.rst:982
15881605
msgid ""
@@ -1591,6 +1608,8 @@ msgid ""
15911608
" it in C. So it stores the default in such a way that it will get evaluated"
15921609
" at runtime, when the user asks for the function's signature."
15931610
msgstr ""
1611+
"``sys.maxsize`` 在不同的系统平台可能有不同的值。因此,Argument Clinic 不能简单地在本底环境对表达式求值并用 C "
1612+
"语言硬编码。所以默认值将用表达式的方式存储下来,运行的时候在请求函数签名时会被求值。"
15941613

15951614
#: ../../howto/clinic.rst:987
15961615
msgid ""

library/unittest.mock.po

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ msgstr ""
710710
msgid ""
711711
"The :class:`Mock` classes have support for mocking magic methods. See "
712712
":ref:`magic methods <magic-methods>` for the full details."
713-
msgstr ""
713+
msgstr ":class:`Mock` 类具有对模拟魔术方法的支持。 请参阅 :ref:`魔术方法 <magic-methods>` 了解完整细节。"
714714

715715
#: ../../library/unittest.mock.rst:771
716716
msgid ""
@@ -719,13 +719,17 @@ msgid ""
719719
"are passed to the constructor of the mock being created. The keyword "
720720
"arguments are for configuring attributes of the mock:"
721721
msgstr ""
722+
"mock 操作类和 :func:`patch` 装饰器都接受任意关键字参数用于配置。 对于 :func:`patch` "
723+
"装饰器来说关键字参数会被传给所创建 mock 的构造器。 这些关键字被用于配置 mock 的属性:"
722724

723725
#: ../../library/unittest.mock.rst:782
724726
msgid ""
725727
"The return value and side effect of child mocks can be set in the same way, "
726728
"using dotted notation. As you can't use dotted names directly in a call you "
727729
"have to create a dictionary and unpack it using ``**``:"
728730
msgstr ""
731+
"子 mock 的返回值和附带效果也可使用带点号的标记通过相同的方式来设置。 由于你无法直接在调用中使用带点号的名称因此你需要创建一个字典并使用 "
732+
"``**`` 来解包它:"
729733

730734
#: ../../library/unittest.mock.rst:797
731735
msgid ""

whatsnew/3.2.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
# cdarlint <[email protected]>, 2020
88
# ww song <[email protected]>, 2020
99
# Shengjing Zhu <[email protected]>, 2020
10-
# Freesand Leo <[email protected]>, 2020
1110
# Alpha Du <[email protected]>, 2020
1211
# ppcfish <[email protected]>, 2020
12+
# Freesand Leo <[email protected]>, 2022
1313
#
1414
#, fuzzy
1515
msgid ""
@@ -18,7 +18,7 @@ msgstr ""
1818
"Report-Msgid-Bugs-To: \n"
1919
"POT-Creation-Date: 2021-01-01 16:06+0000\n"
2020
"PO-Revision-Date: 2020-05-30 12:18+0000\n"
21-
"Last-Translator: ppcfish <ppcfish@gmail.com>, 2020\n"
21+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2022\n"
2222
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2323
"MIME-Version: 1.0\n"
2424
"Content-Type: text/plain; charset=UTF-8\n"
@@ -1483,7 +1483,7 @@ msgid ""
14831483
"(Contributed by Tarek Ziadé and Giampaolo Rodolà in :issue:`4972`, and by "
14841484
"Georg Brandl in :issue:`8046` and :issue:`1286`.)"
14851485
msgstr ""
1486-
"(由 Tarek Ziadé 和 Giampaolo Rodolà 在 :issue:`4972`贡献,由 Georg Brandl 在 "
1486+
"(由 Tarek Ziadé 和 Giampaolo Rodolà 在 :issue:`4972` 贡献,由 Georg Brandl 在 "
14871487
":issue:`8046` 和 :issue:`1286` 贡献。)"
14881488

14891489
#: ../../whatsnew/3.2.rst:1368

0 commit comments

Comments
 (0)