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

Skip to content

Commit 13ab916

Browse files
[po] auto sync
1 parent 0857d04 commit 13ab916

File tree

3 files changed

+115
-16
lines changed

3 files changed

+115
-16
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "91.98%", "updated_at": "2024-02-24T03:31:12Z"}
1+
{"translation": "92.05%", "updated_at": "2024-02-25T08:31:34Z"}

library/dataclasses.po

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version: Python 3.10\n"
1414
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2024-02-23 19:03+0000\n"
15+
"POT-Creation-Date: 2024-02-25 03:11+0000\n"
1616
"PO-Revision-Date: 2022-11-05 17:21+0000\n"
1717
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1818
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -566,8 +566,8 @@ msgid ""
566566
":exc:`TypeError`. If values in ``changes`` do not specify fields, raises "
567567
":exc:`TypeError`."
568568
msgstr ""
569-
"创建一个与 ``obj`` 类型相同的新对象,将字段替换为 ``changes`` 里的值。如果 ``obj`` 不是数据类,引发 "
570-
":exc:`TypeError` 。如果 ``changes`` 里的值没有指定要替换的字段名,引发 :exc:`TypeError`。"
569+
"创建一个与 ``obj`` 类型相同的新对象,将字段替换为 ``changes`` 里的值。如果 ``obj`` 不是数据类,则抛出 "
570+
":exc:`TypeError` 。如果 ``changes`` 里的值没有指定要替换的字段名,则抛出 :exc:`TypeError`。"
571571

572572
#: ../../library/dataclasses.rst:417
573573
msgid ""
@@ -590,7 +590,8 @@ msgstr ""
590590
msgid ""
591591
"It is an error for ``changes`` to contain any fields that are defined as "
592592
"having ``init=False``. A :exc:`ValueError` will be raised in this case."
593-
msgstr "``changes`` 试图为任何定义为 ``init=False`` 的字段赋值,会引发 :exc:`ValueError`。"
593+
msgstr ""
594+
"``changes`` 包含任何定义为 ``init=False`` 的字段是错误的。在这种情况下会引发 :exc:`ValueError` 。"
594595

595596
#: ../../library/dataclasses.rst:429
596597
msgid ""
@@ -602,10 +603,9 @@ msgid ""
602603
"perhaps a custom ``replace()`` (or similarly named) method which handles "
603604
"instance copying."
604605
msgstr ""
605-
"提前提醒 ``init=False`` 字段在 :func:`replace` 被调用时的行为。如果它们被初始化的话,它们不是从源对象复制的,而是在 "
606-
":meth:`__post_init__` 中初始化。除非保持审慎,否则 ``init=False`` "
607-
"字段大概很少能被正确地使用。如果使用它们,那么使用另外的类构造器,或自定义 ``replace()`` "
608-
"方法(或类似名称的方法)来复制实例,可能是明智的选择。"
606+
"提前提醒, 字段在 :func:`replace` 被调用时的行为是,当它们被初始化时,不是从源对象直接复制,而是在 "
607+
":meth:`__post_init__` 中初始化。除非保持审慎,否则 ``init=False`` 字段大概很少能被正确地使用。如果有使用 "
608+
"``init=False`` 的字段,那么使用另外的类构造器,或自定义 ``replace()`` 方法(或类似名称的方法)来复制实例,可能会更好。"
609609

610610
#: ../../library/dataclasses.rst:440
611611
msgid ""
@@ -928,7 +928,7 @@ msgstr "使用默认工厂函数是一种创建可变类型新实例的方法,
928928

929929
#: ../../library/dataclasses.rst:732
930930
msgid "Descriptor-typed fields"
931-
msgstr "字段标注描述器类型"
931+
msgstr "描述器类型的字段"
932932

933933
#: ../../library/dataclasses.rst:734
934934
msgid ""
@@ -960,13 +960,13 @@ msgid ""
960960
"hand, if the descriptor raises :exc:`AttributeError` in this situation, no "
961961
"default value will be provided for the field."
962962
msgstr ""
963-
"检测一个字段是否存在默认值时 ,``dataclasses`` 将使用类方法(即``descriptor.__get__(obj=None, "
964-
"type=cls)`` )调用描述器的``__get__`` 方法。 在这种情况下,如果描述器拥有返回值 "
963+
"检测一个字段是否存在默认值时 ,``dataclasses`` 将使用类方法(即 ``descriptor.__get__(obj=None, "
964+
"type=cls)`` )调用描述器的 ``__get__`` 方法。 在这种情况下,如果描述器拥有返回值 "
965965
",则返回值为该字段的默认值。如果在这种情况下描述器抛出 :exc:`AttributeError` 错误,则该字段不存在默认值。"
966966

967967
#: ../../library/dataclasses.rst:778
968968
msgid ""
969969
"Note that if a field is annotated with a descriptor type, but is not "
970970
"assigned a descriptor object as its default value, the field will act like a"
971971
" normal field."
972-
msgstr "若一个字段被标注为描述器类型,但其默认值并不是描述器对象,那么该字段的效果只会像普通的字段一样。"
972+
msgstr "若一个字段的类型是描述器,但其默认值并不是描述器对象,那么该字段只会像普通的字段一样工作。"

0 commit comments

Comments
 (0)