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

Skip to content

Commit 39be542

Browse files
[po] auto sync
1 parent 61e9a27 commit 39be542

3 files changed

Lines changed: 6833 additions & 6795 deletions

File tree

library/dataclasses.po

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ msgid ""
1414
msgstr ""
1515
"Project-Id-Version: Python 3.9\n"
1616
"Report-Msgid-Bugs-To: \n"
17-
"POT-Creation-Date: 2021-05-07 06:17+0000\n"
17+
"POT-Creation-Date: 2021-05-11 06:18+0000\n"
1818
"PO-Revision-Date: 2018-06-29 21:06+0000\n"
1919
"Last-Translator: Freesand Leo <[email protected]>, 2021\n"
2020
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -588,18 +588,33 @@ msgstr "在其他用途中,这允许初始化依赖于一个或多个其他字
588588

589589
#: ../../library/dataclasses.rst:425
590590
msgid ""
591+
"The :meth:`__init__` method generated by :func:`dataclass` does not call "
592+
"base class :meth:`__init__` methods. If the base class has an "
593+
":meth:`__init__` method that has to be called, it is common to call this "
594+
"method in a :meth:`__post_init__` method::"
595+
msgstr ""
596+
597+
#: ../../library/dataclasses.rst:442
598+
msgid ""
599+
"Note, however, that in general the dataclass-generated :meth:`__init__` "
600+
"methods don't need to be called, since the derived dataclass will take care "
601+
"of initializing all fields of any base class that is a dataclass itself."
602+
msgstr ""
603+
604+
#: ../../library/dataclasses.rst:446
605+
msgid ""
591606
"See the section below on init-only variables for ways to pass parameters to "
592607
":meth:`__post_init__`. Also see the warning about how :func:`replace` "
593608
"handles ``init=False`` fields."
594609
msgstr ""
595610
"有关将参数传递给 :meth:`__post_init__` 的方法,请参阅下面有关仅初始化变量的段落。另请参阅关于 :func:`replace` "
596611
"处理 ``init=False`` 字段的警告。"
597612

598-
#: ../../library/dataclasses.rst:430
613+
#: ../../library/dataclasses.rst:451
599614
msgid "Class variables"
600615
msgstr "类变量"
601616

602-
#: ../../library/dataclasses.rst:432
617+
#: ../../library/dataclasses.rst:453
603618
msgid ""
604619
"One of two places where :func:`dataclass` actually inspects the type of a "
605620
"field is to determine if a field is a class variable as defined in "
@@ -613,11 +628,11 @@ msgstr ""
613628
" ``typing.ClassVar`` 来完成此操作。如果一个字段是一个 ``ClassVar`` "
614629
",它将被排除在考虑范围之外,并被数据类机制忽略。这样的 ``ClassVar`` 伪字段不会由模块级的 :func:`fields` 函数返回。"
615630

616-
#: ../../library/dataclasses.rst:441
631+
#: ../../library/dataclasses.rst:462
617632
msgid "Init-only variables"
618633
msgstr "仅初始化变量"
619634

620-
#: ../../library/dataclasses.rst:443
635+
#: ../../library/dataclasses.rst:464
621636
msgid ""
622637
"The other place where :func:`dataclass` inspects a type annotation is to "
623638
"determine if a field is an init-only variable. It does this by seeing if "
@@ -634,25 +649,25 @@ msgstr ""
634649
"函数返回。仅初始化字段作为参数添加到生成的 :meth:`__init__` 方法中,并传递给可选的 :meth:`__post_init__` "
635650
"方法。数据类不会使用它们。"
636651

637-
#: ../../library/dataclasses.rst:453
652+
#: ../../library/dataclasses.rst:474
638653
msgid ""
639654
"For example, suppose a field will be initialized from a database, if a value"
640655
" is not provided when creating the class::"
641656
msgstr "例如,假设一个字段将从数据库初始化,如果在创建类时未提供其值::"
642657

643-
#: ../../library/dataclasses.rst:468
658+
#: ../../library/dataclasses.rst:489
644659
msgid ""
645660
"In this case, :func:`fields` will return :class:`Field` objects for ``i`` "
646661
"and ``j``, but not for ``database``."
647662
msgstr ""
648663
"在这种情况下, :func:`fields` 将返回 ``i`` 和 ``j`` 的 :class:`Field` 对象,但不包括 "
649664
"``database`` 。"
650665

651-
#: ../../library/dataclasses.rst:472
666+
#: ../../library/dataclasses.rst:493
652667
msgid "Frozen instances"
653668
msgstr "冻结的实例"
654669

655-
#: ../../library/dataclasses.rst:474
670+
#: ../../library/dataclasses.rst:495
656671
msgid ""
657672
"It is not possible to create truly immutable Python objects. However, by "
658673
"passing ``frozen=True`` to the :meth:`dataclass` decorator you can emulate "
@@ -664,7 +679,7 @@ msgstr ""
664679
"装饰器,你可以模拟不变性。在这种情况下,数据类将向类添加 :meth:`__setattr__` 和 :meth:`__delattr__` 方法。 "
665680
"些方法在调用时会引发 :exc:`FrozenInstanceError` 。"
666681

667-
#: ../../library/dataclasses.rst:480
682+
#: ../../library/dataclasses.rst:501
668683
msgid ""
669684
"There is a tiny performance penalty when using ``frozen=True``: "
670685
":meth:`__init__` cannot use simple assignment to initialize fields, and must"
@@ -673,11 +688,11 @@ msgstr ""
673688
"使用 ``frozen=True`` 时会有很小的性能损失: :meth:`__ init__` 不能使用简单的赋值来初始化字段,并必须使用 "
674689
":meth:`object.__ setattr__` 。"
675690

676-
#: ../../library/dataclasses.rst:485
691+
#: ../../library/dataclasses.rst:506
677692
msgid "Inheritance"
678693
msgstr "继承"
679694

680-
#: ../../library/dataclasses.rst:487
695+
#: ../../library/dataclasses.rst:508
681696
msgid ""
682697
"When the dataclass is being created by the :meth:`dataclass` decorator, it "
683698
"looks through all of the class's base classes in reverse MRO (that is, "
@@ -692,22 +707,22 @@ msgstr ""
692707
"),并且对于它找到的每个数据类, "
693708
"将该基类中的字段添加到字段的有序映射中。添加完所有基类字段后,它会将自己的字段添加到有序映射中。所有生成的方法都将使用这种组合的,计算的有序字段映射。由于字段是按插入顺序排列的,因此派生类会重载基类。一个例子::"
694709

695-
#: ../../library/dataclasses.rst:507
710+
#: ../../library/dataclasses.rst:528
696711
msgid ""
697712
"The final list of fields is, in order, ``x``, ``y``, ``z``. The final type "
698713
"of ``x`` is ``int``, as specified in class ``C``."
699714
msgstr ""
700715
"最后的字段列表依次是 ``x`` 、 ``y`` 、 ``z`` 。 ``x`` 的最终类型是 ``int`` ,如类 ``C`` 中所指定的那样。"
701716

702-
#: ../../library/dataclasses.rst:510
717+
#: ../../library/dataclasses.rst:531
703718
msgid "The generated :meth:`__init__` method for ``C`` will look like::"
704719
msgstr "为 ``C`` 生成的 :meth:`__init__` 方法看起来像::"
705720

706-
#: ../../library/dataclasses.rst:515
721+
#: ../../library/dataclasses.rst:536
707722
msgid "Default factory functions"
708723
msgstr "默认工厂函数"
709724

710-
#: ../../library/dataclasses.rst:517
725+
#: ../../library/dataclasses.rst:538
711726
msgid ""
712727
"If a :func:`field` specifies a ``default_factory``, it is called with zero "
713728
"arguments when a default value for the field is needed. For example, to "
@@ -716,7 +731,7 @@ msgstr ""
716731
"如果一个 :func:`field` 指定了一个 ``default_factory`` "
717732
",当需要该字段的默认值时,将使用零参数调用它。例如,要创建列表的新实例,请使用::"
718733

719-
#: ../../library/dataclasses.rst:523
734+
#: ../../library/dataclasses.rst:544
720735
msgid ""
721736
"If a field is excluded from :meth:`__init__` (using ``init=False``) and the "
722737
"field also specifies ``default_factory``, then the default factory function "
@@ -727,31 +742,31 @@ msgstr ""
727742
"``default_factory`` ,则默认的工厂函数将始终从生成的 :meth:`__ init__` "
728743
"函数调用。发生这种情况是因为没有其他方法可以为字段提供初始值。"
729744

730-
#: ../../library/dataclasses.rst:530
745+
#: ../../library/dataclasses.rst:551
731746
msgid "Mutable default values"
732747
msgstr "可变的默认值"
733748

734-
#: ../../library/dataclasses.rst:532
749+
#: ../../library/dataclasses.rst:553
735750
msgid ""
736751
"Python stores default member variable values in class attributes. Consider "
737752
"this example, not using dataclasses::"
738753
msgstr "Python 在类属性中存储默认成员变量值。思考这个例子,不使用数据类::"
739754

740-
#: ../../library/dataclasses.rst:547
755+
#: ../../library/dataclasses.rst:568
741756
msgid ""
742757
"Note that the two instances of class ``C`` share the same class variable "
743758
"``x``, as expected."
744759
msgstr "请注意,类 ``C`` 的两个实例共享相同的类变量 ``x`` ,如预期的那样。"
745760

746-
#: ../../library/dataclasses.rst:550
761+
#: ../../library/dataclasses.rst:571
747762
msgid "Using dataclasses, *if* this code was valid::"
748763
msgstr "使用数据类, *如果* 此代码有效::"
749764

750-
#: ../../library/dataclasses.rst:558
765+
#: ../../library/dataclasses.rst:579
751766
msgid "it would generate code similar to::"
752767
msgstr "它生成的代码类似于::"
753768

754-
#: ../../library/dataclasses.rst:569
769+
#: ../../library/dataclasses.rst:590
755770
msgid ""
756771
"This has the same issue as the original example using class ``C``. That is, "
757772
"two instances of class ``D`` that do not specify a value for ``x`` when "
@@ -767,17 +782,17 @@ msgstr ""
767782
"``list`` 、 ``dict`` 或 ``set`` 的默认参数,则会引发 :exc:`TypeError` "
768783
"。这是一个部分解决方案,但它可以防止许多常见错误。"
769784

770-
#: ../../library/dataclasses.rst:579
785+
#: ../../library/dataclasses.rst:600
771786
msgid ""
772787
"Using default factory functions is a way to create new instances of mutable "
773788
"types as default values for fields::"
774789
msgstr "使用默认工厂函数是一种创建可变类型新实例的方法,并将其作为字段的默认值::"
775790

776-
#: ../../library/dataclasses.rst:589
791+
#: ../../library/dataclasses.rst:610
777792
msgid "Exceptions"
778793
msgstr "异常"
779794

780-
#: ../../library/dataclasses.rst:593
795+
#: ../../library/dataclasses.rst:614
781796
msgid ""
782797
"Raised when an implicitly defined :meth:`__setattr__` or :meth:`__delattr__`"
783798
" is called on a dataclass which was defined with ``frozen=True``. It is a "

library/http.server.po

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#
66
# Translators:
77
# Konge <[email protected]>, 2019
8-
# 1lin24 <[email protected]>, 2020
98
# Freesand Leo <[email protected]>, 2020
109
# Xi Chen <[email protected]>, 2021
1110
#
@@ -14,7 +13,7 @@ msgid ""
1413
msgstr ""
1514
"Project-Id-Version: Python 3.9\n"
1615
"Report-Msgid-Bugs-To: \n"
17-
"POT-Creation-Date: 2021-04-26 06:10+0000\n"
16+
"POT-Creation-Date: 2021-05-11 06:18+0000\n"
1817
"PO-Revision-Date: 2017-02-16 23:14+0000\n"
1918
"Last-Translator: Xi Chen <[email protected]>, 2021\n"
2019
"Language-Team: Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -391,51 +390,51 @@ msgstr ""
391390

392391
#: ../../library/http.server.rst:323
393392
msgid ""
394-
"This class serves files from the current directory and below, directly "
395-
"mapping the directory structure to HTTP requests."
396-
msgstr "这个类为当前目录及以下的文件提供服务,直接映射目录结构到HTTP请求"
393+
"This class serves files from the directory *directory* and below, or the "
394+
"current directory if *directory* is not provided, directly mapping the "
395+
"directory structure to HTTP requests."
396+
msgstr ""
397+
398+
#: ../../library/http.server.rst:327
399+
msgid "The *directory* parameter."
400+
msgstr ""
401+
402+
#: ../../library/http.server.rst:330
403+
msgid "The *directory* parameter accepts a :term:`path-like object`."
404+
msgstr ""
397405

398-
#: ../../library/http.server.rst:326
406+
#: ../../library/http.server.rst:333
399407
msgid ""
400408
"A lot of the work, such as parsing the request, is done by the base class "
401409
":class:`BaseHTTPRequestHandler`. This class implements the :func:`do_GET` "
402410
"and :func:`do_HEAD` functions."
403411
msgstr ""
404412

405-
#: ../../library/http.server.rst:330
413+
#: ../../library/http.server.rst:337
406414
msgid ""
407415
"The following are defined as class-level attributes of "
408416
":class:`SimpleHTTPRequestHandler`:"
409417
msgstr ""
410418

411-
#: ../../library/http.server.rst:335
419+
#: ../../library/http.server.rst:342
412420
msgid ""
413421
"This will be ``\"SimpleHTTP/\" + __version__``, where ``__version__`` is "
414422
"defined at the module level."
415423
msgstr ""
416424

417-
#: ../../library/http.server.rst:340
425+
#: ../../library/http.server.rst:347
418426
msgid ""
419427
"A dictionary mapping suffixes into MIME types, contains custom overrides for"
420428
" the default system mappings. The mapping is used case-insensitively, and so"
421429
" should contain only lower-cased keys."
422430
msgstr ""
423431

424-
#: ../../library/http.server.rst:344
432+
#: ../../library/http.server.rst:351
425433
msgid ""
426434
"This dictionary is no longer filled with the default system mappings, but "
427435
"only contains overrides."
428436
msgstr ""
429437

430-
#: ../../library/http.server.rst:350
431-
msgid ""
432-
"If not specified, the directory to serve is the current working directory."
433-
msgstr "如果没有指定,要服务 目录是当前工作目录"
434-
435-
#: ../../library/http.server.rst:352
436-
msgid "Accepts a :term:`path-like object`."
437-
msgstr "接受一个 :term:`path-like object`。"
438-
439438
#: ../../library/http.server.rst:355
440439
msgid ""
441440
"The :class:`SimpleHTTPRequestHandler` class defines the following methods:"

0 commit comments

Comments
 (0)