1
1
# SOME DESCRIPTIVE TITLE.
2
- # Copyright (C) 2001-2023 , Python Software Foundation
2
+ # Copyright (C) 2001-2024 , Python Software Foundation
3
3
# This file is distributed under the same license as the Python package.
4
4
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
5
#
<
8000
div class="d-flex flex-row">@@ -8,16 +8,16 @@
8
8
# ww song <sww4718168@gmail.com>, 2018
9
9
# Alpha Du <alphanow@gmail.com>, 2019
10
10
# Freesand Leo <yuqinju@163.com>, 2021
11
- # Rafael Fontenelle <rffontenelle@gmail.com>, 2023
11
+ # Rafael Fontenelle <rffontenelle@gmail.com>, 2024
12
12
#
13
13
#, fuzzy
14
14
msgid ""
15
15
msgstr ""
16
16
"Project-Id-Version : Python 3.9\n "
17
17
"Report-Msgid-Bugs-To : \n "
18
- "POT-Creation-Date : 2023-08-18 15:39 +0000\n "
18
+ "POT-Creation-Date : 2024-02-25 04:14 +0000\n "
19
19
"PO-Revision-Date : 2018-06-29 21:06+0000\n "
20
- "Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2023 \n "
20
+ "Last-Translator : Rafael Fontenelle <rffontenelle@gmail.com>, 2024 \n "
21
21
"Language-Team : Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n "
22
22
"MIME-Version : 1.0\n "
23
23
"Content-Type : text/plain; charset=UTF-8\n "
@@ -525,8 +525,8 @@ msgid ""
525
525
":exc:`TypeError`. If values in ``changes`` do not specify fields, raises "
526
526
":exc:`TypeError`."
527
527
msgstr ""
528
- "创建一个与 ``obj`` 类型相同的新对象,将字段替换为 ``changes`` 里的值。如果 ``obj`` 不是数据类,引发 "
529
- ":exc:`TypeError` 。如果 ``changes`` 里的值没有指定要替换的字段名,引发 :exc:`TypeError`。"
528
+ "创建一个与 ``obj`` 类型相同的新对象,将字段替换为 ``changes`` 里的值。如果 ``obj`` 不是数据类,则抛出 "
529
+ ":exc:`TypeError` 。如果 ``changes`` 里的值没有指定要替换的字段名,则抛出 :exc:`TypeError`。"
530
530
531
531
#: ../../library/dataclasses.rst:383
532
532
msgid ""
@@ -549,7 +549,8 @@ msgstr ""
549
549
msgid ""
550
550
"It is an error for ``changes`` to contain any fields that are defined as "
551
551
"having ``init=False``. A :exc:`ValueError` will be raised in this case."
552
- msgstr "``changes`` 试图为任何定义为 ``init=False`` 的字段赋值,会引发 :exc:`ValueError`。"
552
+ msgstr ""
553
+ "``changes`` 包含任何定义为 ``init=False`` 的字段是错误的。在这种情况下会引发 :exc:`ValueError` 。"
553
554
554
555
#: ../../library/dataclasses.rst:395
555
556
msgid ""
@@ -561,10 +562,9 @@ msgid ""
561
562
"perhaps a custom ``replace()`` (or similarly named) method which handles "
562
563
"instance copying."
563
564
msgstr ""
564
- "提前提醒 ``init=False`` 字段在 :func:`replace` 被调用时的行为。如果它们被初始化的话,它们不是从源对象复制的,而是在 "
565
- ":meth:`__post_init__` 中初始化。除非保持审慎,否则 ``init=False`` "
566
- "字段大概很少能被正确地使用。如果使用它们,那么使用另外的类构造器,或自定义 ``replace()`` "
567
- "方法(或类似名称的方法)来复制实例,可能是明智的选择。"
565
+ "提前提醒, 字段在 :func:`replace` 被调用时的行为是,当它们被初始化时,不是从源对象直接复制,而是在 "
566
+ ":meth:`__post_init__` 中初始化。除非保持审慎,否则 ``init=False`` 字段大概很少能被正确地使用。如果有使用 "
567
+ "``init=False`` 的字段,那么使用另外的类构造器,或自定义 ``replace()`` 方法(或类似名称的方法)来复制实例,可能会更好。"
568
568
569
569
#: ../../library/dataclasses.rst:406
570
570
msgid ""
0 commit comments