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

Skip to content

Commit debfa72

Browse files
[po] auto sync
1 parent 1056424 commit debfa72

File tree

5 files changed

+179
-10
lines changed

5 files changed

+179
-10
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "81.17%", "updated_at": "2025-02-07T15:46:15Z"}
1+
{"translation": "81.20%", "updated_at": "2025-02-07T18:47:43Z"}

c-api/module.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <[email protected]>, 2024
7+
# Rafael Fontenelle <[email protected]>, 2025
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-02-03 18:16+0000\n"
14+
"POT-Creation-Date: 2025-02-07 14:52+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
16-
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
16+
"Last-Translator: Rafael Fontenelle <[email protected]>, 2025\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -670,7 +670,7 @@ msgid ""
670670
"To be convenient, the function accepts ``NULL`` *value* with an exception "
671671
"set. In this case, return ``-1`` and just leave the raised exception "
672672
"unchanged."
673-
msgstr ""
673+
msgstr "为了方便,该函数接受 ``NULL`` *value* 并设置一个异常。 在此情况下,将返回 ``-1`` 并让所引发的异常保持不变。"
674674

675675
#: ../../c-api/module.rst:517 ../../c-api/module.rst:578
676676
msgid ""

howto/descriptor.po

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-01-24 14:52+0000\n"
14+
"POT-Creation-Date: 2025-02-07 14:52+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2025\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -492,6 +492,8 @@ msgid ""
492492
":meth:`~object.__set_name__` so that the field names would be recorded. "
493493
"Here we call :func:`vars` to look up the descriptor without triggering it:"
494494
msgstr ""
495+
"交互式会话显示 :class:`!Person` 类调用了 :meth:`~object.__set_name__` 以使字段名称可被记录。 "
496+
"在这里我们调用 :func:`vars` 来查找描述器而不触发它:"
495497

496498
#: ../../howto/descriptor.rst:260
497499
msgid ""
@@ -551,6 +553,8 @@ msgid ""
551553
":meth:`~object.__get__`, :meth:`~object.__set__`, or "
552554
":meth:`~object.__delete__`."
553555
msgstr ""
556+
":term:`descriptor` 是指任何定义了 :meth:`~object.__get__`, :meth:`~object.__set__` "
557+
"或 :meth:`~object.__delete__` 的对象。"
554558

555559
#: ../../howto/descriptor.rst:300
556560
msgid ""
@@ -559,6 +563,8 @@ msgid ""
559563
" where it was created or the name of class variable it was assigned to. "
560564
"(This method, if present, is called even if the class is not a descriptor.)"
561565
msgstr ""
566+
"作为可选项,描述器可以有 :meth:`~object.__set_name__` 方法。 "
567+
"这仅会被用于当描述器需要知道创建它的类或它被分配的类变量名称等场合。 (此方法如果存在,那么即使所在类并不是一个描述器仍会被调用。)"
562568

563569
#: ../../howto/descriptor.rst:305
564570
msgid ""
@@ -628,6 +634,7 @@ msgid ""
628634
"This :class:`!Validator` class is both an :term:`abstract base class` and a "
629635
"managed attribute descriptor:"
630636
msgstr ""
637+
"这个 :class:`!Validator` 类既是一个 :term:`abstract base class` 也是一个被管理的属性描述器:"
631638

632639
#: ../../howto/descriptor.rst:343
633640
msgid ""
@@ -672,6 +679,7 @@ msgid ""
672679
"Custom validators need to inherit from :class:`!Validator` and must supply a"
673680
" :meth:`!validate` method to test various restrictions as needed."
674681
msgstr ""
682+
"自定义验证器必须继承自 :class:`!Validator` 并且必须提供 :meth:`!validate` 方法以根据需要测试各种约束。"
675683

676684
#: ../../howto/descriptor.rst:368
677685
msgid "Custom validators"
@@ -904,6 +912,9 @@ msgid ""
904912
":meth:`~object.__set__`, and :meth:`~object.__delete__`. If any of those "
905913
"methods are defined for an attribute, it is said to be a :term:`descriptor`."
906914
msgstr ""
915+
"一般而言,描述器是具有描述器协议中的方法之一的属性值。 这些方法是 :meth:`~object.__get__`, "
916+
":meth:`~object.__set__` 和 :meth:`~object.__delete__`。 "
917+
"如果为某个属性定义了这些方法中的任何一个,它就被称为 :term:`descriptor`。"
907918

908919
#: ../../howto/descriptor.rst:505
909920
msgid ""
@@ -962,6 +973,8 @@ msgid ""
962973
":meth:`~object.__get__` are called non-data descriptors (they are often used"
963974
" for methods but other uses are possible)."
964975
msgstr ""
976+
"如果一个对象定义了 :meth:`~object.__set__` 或 :meth:`~object.__delete__`,它将被视为数据描述器。 "
977+
"仅定义了 :meth:`~object.__get__` 的描述器称为非数据描述器(它们经常被用于方法但也可以有其他用途。"
965978

966979
#: ../../howto/descriptor.rst:539
967980
msgid ""
@@ -1723,6 +1736,11 @@ msgid ""
17231736
">>> d.f.__self__\n"
17241737
"<__main__.D object at 0x00B18C90>"
17251738
msgstr ""
1739+
">>> d.f.__func__\n"
1740+
"<function D.f at 0x00C45070>\n"
1741+
"\n"
1742+
">>> d.f.__self__\n"
1743+
"<__main__.D object at 0x00B18C90>"
17261744

17271745
#: ../../howto/descriptor.rst:1245
17281746
msgid ""
@@ -1881,6 +1899,20 @@ msgid ""
18811899
" def __call__(self, *args, **kwds):\n"
18821900
" return self.f(*args, **kwds)"
18831901
msgstr ""
1902+
"import functools\n"
1903+
"\n"
1904+
"class StaticMethod:\n"
1905+
" \"Emulate PyStaticMethod_Type() in Objects/funcobject.c\"\n"
1906+
"\n"
1907+
" def __init__(self, f):\n"
1908+
" self.f = f\n"
1909+
" functools.update_wrapper(self, f)\n"
1910+
"\n"
1911+
" def __get__(self, obj, objtype=None):\n"
1912+
" return self.f\n"
1913+
"\n"
1914+
" def __call__(self, *args, **kwds):\n"
1915+
" return self.f(*args, **kwds)"
18841916

18851917
#: ../../howto/descriptor.rst:1332
18861918
msgid ""
@@ -1913,6 +1945,10 @@ msgid ""
19131945
" def f(cls, x):\n"
19141946
" return cls.__name__, x"
19151947
msgstr ""
1948+
"class F:\n"
1949+
" @classmethod\n"
1950+
" def f(cls, x):\n"
1951+
" return cls.__name__, x"
19161952

19171953
#: ../../howto/descriptor.rst:1414
19181954
msgid ""
@@ -1921,6 +1957,10 @@ msgid ""
19211957
">>> F().f(3)\n"
19221958
"('F', 3)"
19231959
msgstr ""
1960+
">>> F.f(3)\n"
1961+
"('F', 3)\n"
1962+
">>> F().f(3)\n"
1963+
"('F', 3)"
19241964

19251965
#: ../../howto/descriptor.rst:1421
19261966
msgid ""
@@ -1944,6 +1984,14 @@ msgid ""
19441984
" d[key] = value\n"
19451985
" return d"
19461986
msgstr ""
1987+
"class Dict(dict):\n"
1988+
" @classmethod\n"
1989+
" def fromkeys(cls, iterable, value=None):\n"
1990+
" \"Emulate dict_fromkeys() in Objects/dictobject.c\"\n"
1991+
" d = cls()\n"
1992+
" for key in iterable:\n"
1993+
" d[key] = value\n"
1994+
" return d"
19471995

19481996
#: ../../howto/descriptor.rst:1438
19491997
msgid "Now a new dictionary of unique keys can be constructed like this:"
@@ -1957,6 +2005,11 @@ msgid ""
19572005
">>> d\n"
19582006
"{'a': None, 'b': None, 'r': None, 'c': None, 'd': None}"
19592007
msgstr ""
2008+
">>> d = Dict.fromkeys('abracadabra')\n"
2009+
">>> type(d) is Dict\n"
2010+
"True\n"
2011+
">>> d\n"
2012+
"{'a': None, 'b': None, 'r': None, 'c': None, 'd': None}"
19602013

19612014
#: ../../howto/descriptor.rst:1448
19622015
msgid ""
@@ -2044,6 +2097,8 @@ msgid ""
20442097
"class Vehicle:\n"
20452098
" __slots__ = ('id_number', 'make', 'model')"
20462099
msgstr ""
2100+
"class Vehicle:\n"
2101+
" __slots__ = ('id_number', 'make', 'model')"
20472102

20482103
#: ../../howto/descriptor.rst:1567
20492104
msgid ""
@@ -2083,6 +2138,21 @@ msgid ""
20832138
" def name(self): # Read-only descriptor\n"
20842139
" return self._name"
20852140
msgstr ""
2141+
"class Immutable:\n"
2142+
"\n"
2143+
" __slots__ = ('_dept', '_name') # 替代实例字典\n"
2144+
"\n"
2145+
" def __init__(self, dept, name):\n"
2146+
" self._dept = dept # 保存到私有属性\n"
2147+
" self._name = name # 保存到私有属性\n"
2148+
"\n"
2149+
" @property # 只读描述器\n"
2150+
" def dept(self):\n"
2151+
" return self._dept\n"
2152+
"\n"
2153+
" @property\n"
2154+
" def name(self): # 只读描述器\n"
2155+
" return self._name"
20862156

20872157
#: ../../howto/descriptor.rst:1596
20882158
msgid ""
@@ -2098,6 +2168,17 @@ msgid ""
20982168
" ...\n"
20992169
"AttributeError: 'Immutable' object has no attribute 'location'"
21002170
msgstr ""
2171+
">>> mark = Immutable('Botany', 'Mark Watney')\n"
2172+
">>> mark.dept\n"
2173+
"'Botany'\n"
2174+
">>> mark.dept = 'Space Pirate'\n"
2175+
"Traceback (most recent call last):\n"
2176+
" ...\n"
2177+
"AttributeError: property 'dept' of 'Immutable' object has no setter\n"
2178+
">>> mark.location = 'Mars'\n"
2179+
"Traceback (most recent call last):\n"
2180+
" ...\n"
2181+
"AttributeError: 'Immutable' object has no attribute 'location'"
21012182

21022183
#: ../../howto/descriptor.rst:1610
21032184
msgid ""
@@ -2135,6 +2216,15 @@ msgid ""
21352216
" return 4 * sum((-1.0)**n / (2.0*n + 1.0)\n"
21362217
" for n in reversed(range(100_000)))"
21372218
msgstr ""
2219+
"from functools import cached_property\n"
2220+
"\n"
2221+
"class CP:\n"
2222+
" __slots__ = () # 去除实例字典\n"
2223+
"\n"
2224+
" @cached_property # 需要一个实例字典\n"
2225+
" def pi(self):\n"
2226+
" return 4 * sum((-1.0)**n / (2.0*n + 1.0)\n"
2227+
" for n in reversed(range(100_000)))"
21382228

21392229
#: ../../howto/descriptor.rst:1633
21402230
msgid ""
@@ -2143,6 +2233,10 @@ msgid ""
21432233
" ...\n"
21442234
"TypeError: No '__dict__' attribute on 'CP' instance to cache 'pi' property."
21452235
msgstr ""
2236+
">>> CP().pi\n"
2237+
"Traceback (most recent call last):\n"
2238+
" ...\n"
2239+
"TypeError: No '__dict__' attribute on 'CP' instance to cache 'pi' property."
21462240

21472241
#: ../../howto/descriptor.rst:1640
21482242
msgid ""

library/exceptions.po

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Rafael Fontenelle <[email protected]>, 2024
7+
# Rafael Fontenelle <[email protected]>, 2025
88
#
99
#, fuzzy
1010
msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-02-03 18:16+0000\n"
14+
"POT-Creation-Date: 2025-02-07 14:52+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:33+0000\n"
16-
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
16+
"Last-Translator: Rafael Fontenelle <[email protected]>, 2025\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1818
"MIME-Version: 1.0\n"
1919
"Content-Type: text/plain; charset=UTF-8\n"
@@ -760,6 +760,8 @@ msgid ""
760760
":term:`CPython`, this could be raised by incorrectly using Python's C API, "
761761
"such as returning a ``NULL`` value without an exception set."
762762
msgstr ""
763+
"当解释器发现内部错误,但情况看起来尚未严重到要放弃所有希望时将被引发。 关联的值是一个指明发生了什么问题的字符串(使用低层级的表示形式)。 在 "
764+
":term:`CPython` 中,这可能会因不正确地使用 Python 的 C API 而引发,例如返回 ``NULL`` 值而不设置一个异常。"
763765

764766
#: ../../library/exceptions.rst:551
765767
msgid ""
@@ -771,6 +773,9 @@ msgid ""
771773
"associated value) and if possible the source of the program that triggered "
772774
"the error."
773775
msgstr ""
776+
"如果你确信此异常不是你的问题,或你所使用的软件包的问题,你应当将此问题报告给你所用 Python 解释器的作者或维护者。 请确保报告 Python "
777+
"解释器的版本 (``sys.version``;它也会在交互式 Python 会话开始时被打印出来),具体的错误消息 (异常所关联的值) "
778+
"以及可能触发该错误的程序的源代码。"
774779

775780
#: ../../library/exceptions.rst:562
776781
msgid ""

license.po

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.12\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-02-03 18:16+0000\n"
14+
"POT-Creation-Date: 2025-02-07 14:52+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:34+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2025\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -754,6 +754,32 @@ msgid ""
754754
"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n"
755755
"SUCH DAMAGE."
756756
msgstr ""
757+
"Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.\n"
758+
"All rights reserved.\n"
759+
"\n"
760+
"Redistribution and use in source and binary forms, with or without\n"
761+
"modification, are permitted provided that the following conditions\n"
762+
"are met:\n"
763+
"1. Redistributions of source code must retain the above copyright\n"
764+
" notice, this list of conditions and the following disclaimer.\n"
765+
"2. Redistributions in binary form must reproduce the above copyright\n"
766+
" notice, this list of conditions and the following disclaimer in the\n"
767+
" documentation and/or other materials provided with the distribution.\n"
768+
"3. Neither the name of the project nor the names of its contributors\n"
769+
" may be used to endorse or promote products derived from this software\n"
770+
" without specific prior written permission.\n"
771+
"\n"
772+
"THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS \"AS IS\" AND\n"
773+
"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n"
774+
"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n"
775+
"ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE\n"
776+
"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n"
777+
"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n"
778+
"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n"
779+
"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n"
780+
"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n"
781+
"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n"
782+
"SUCH DAMAGE."
757783

758784
#: ../../license.rst:391
759785
msgid "Asynchronous socket services"
@@ -1138,6 +1164,29 @@ msgid ""
11381164
"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n"
11391165
"SUCH DAMAGE."
11401166
msgstr ""
1167+
"Copyright (c) 2000 Doug White, 2006 James Knight, 2007 Christian Heimes\n"
1168+
"All rights reserved.\n"
1169+
"\n"
1170+
"Redistribution and use in source and binary forms, with or without\n"
1171+
"modification, are permitted provided that the following conditions\n"
1172+
"are met:\n"
1173+
"1. Redistributions of source code must retain the above copyright\n"
1174+
" notice, this list of conditions and the following disclaimer.\n"
1175+
"2. Redistributions in binary form must reproduce the above copyright\n"
1176+
" notice, this list of conditions and the following disclaimer in the\n"
1177+
" documentation and/or other materials provided with the distribution.\n"
1178+
"\n"
1179+
"THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS \"AS IS\" AND\n"
1180+
"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n"
1181+
"IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n"
1182+
"ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n"
1183+
"FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n"
1184+
"DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n"
1185+
"OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n"
1186+
"HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n"
1187+
"LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n"
1188+
"OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n"
1189+
"SUCH DAMAGE."
11411190

11421191
#: ../../license.rst:600
11431192
msgid "SipHash24"
@@ -1721,6 +1770,27 @@ msgid ""
17211770
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n"
17221771
"DEALINGS IN THE SOFTWARE."
17231772
msgstr ""
1773+
"Copyright (c) 1996-2008 Red Hat, Inc and others.\n"
1774+
"\n"
1775+
"Permission is hereby granted, free of charge, to any person obtaining\n"
1776+
"a copy of this software and associated documentation files (the\n"
1777+
"\"Software\"), to deal in the Software without restriction, including\n"
1778+
"without limitation the rights to use, copy, modify, merge, publish,\n"
1779+
"distribute, sublicense, and/or sell copies of the Software, and to\n"
1780+
"permit persons to whom the Software is furnished to do so, subject to\n"
1781+
"the following conditions:\n"
1782+
"\n"
1783+
"The above copyright notice and this permission notice shall be included\n"
1784+
"in all copies or substantial portions of the Software.\n"
1785+
"\n"
1786+
"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n"
1787+
"EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n"
1788+
"MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n"
1789+
"NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n"
1790+
"HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n"
1791+
"WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n"
1792+
"OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n"
1793+
"DEALINGS IN THE SOFTWARE."
17241794

17251795
#: ../../license.rst:907
17261796
msgid "zlib"

0 commit comments

Comments
 (0)