Skip to content

Commit dcf2f88

Browse files
[po] auto sync
1 parent 2796034 commit dcf2f88

File tree

5 files changed

+246
-11
lines changed

5 files changed

+246
-11
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "78.21%", "updated_at": "2025-05-21T02:41:35Z"}
1+
{"translation": "78.23%", "updated_at": "2025-05-21T03:30:03Z"}

c-api/arg.po

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,7 @@ msgid ""
13111311
"Convert a C :c:expr:`int` to a Python :class:`bool` object. .. "
13121312
"versionadded:: 3.14"
13131313
msgstr ""
1314+
"将一个 C :c:expr:`int` 转换为 Python :class:`bool` 对象。 .. versionadded:: 3.14"
13141315

13151316
#: ../../c-api/arg.rst:690
13161317
msgid "``c`` (:class:`bytes` of length 1) [char]"

extending/newtypes.po

Lines changed: 234 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ msgid ""
1818
msgstr ""
1919
"Project-Id-Version: Python 3.14\n"
2020
"Report-Msgid-Bugs-To: \n"
21-
"POT-Creation-Date: 2025-05-08 02:53-0300\n"
21+
"POT-Creation-Date: 2025-05-16 14:19+0000\n"
2222
"PO-Revision-Date: 2021-06-28 00:52+0000\n"
2323
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2025\n"
2424
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -143,6 +143,101 @@ msgid ""
143143
" uint16_t tp_versions_used;\n"
144144
"} PyTypeObject;\n"
145145
msgstr ""
146+
"typedef struct _typeobject {\n"
147+
" PyObject_VAR_HEAD\n"
148+
" const char *tp_name; /* 用于打印,格式为 \"<module>.<name>\" */\n"
149+
" Py_ssize_t tp_basicsize, tp_itemsize; /* 用于分配 */\n"
150+
"\n"
151+
" /* 用于实现标准操作的方法 */\n"
152+
"\n"
153+
" destructor tp_dealloc;\n"
154+
" Py_ssize_t tp_vectorcall_offset;\n"
155+
" getattrfunc tp_getattr;\n"
156+
" setattrfunc tp_setattr;\n"
157+
" PyAsyncMethods *tp_as_async; /* 原名为 tp_compare (Python 2)\n"
158+
" 或 tp_reserved (Python 3) */\n"
159+
" reprfunc tp_repr;\n"
160+
"\n"
161+
" /* 用于标准类的方法集 */\n"
162+
"\n"
163+
" PyNumberMethods *tp_as_number;\n"
164+
" PySequenceMethods *tp_as_sequence;\n"
165+
" PyMappingMethods *tp_as_mapping;\n"
166+
"\n"
167+
" /* 更多标准操作 (这些用于二进制兼容) */\n"
168+
"\n"
169+
" hashfunc tp_hash;\n"
170+
" ternaryfunc tp_call;\n"
171+
" reprfunc tp_str;\n"
172+
" getattrofunc tp_getattro;\n"
173+
" setattrofunc tp_setattro;\n"
174+
"\n"
175+
" /* 用于以输入/输出缓冲区方式访问对象的函数 */\n"
176+
" PyBufferProcs *tp_as_buffer;\n"
177+
"\n"
178+
" /* 用于定义可选/扩展特性是否存在的旗标 */\n"
179+
" unsigned long tp_flags;\n"
180+
"\n"
181+
" const char *tp_doc; /* 文档字符串 */\n"
182+
"\n"
183+
" /* 在 2.0 发布版中分配的含义 */\n"
184+
" /* 为所有可访问的对象调用函数 */\n"
185+
" traverseproc tp_traverse;\n"
186+
"\n"
187+
" /* 删除对所包含对象的引用 */\n"
188+
" inquiry tp_clear;\n"
189+
"\n"
190+
" /* 在 2.1 发布版中分配的含义 */\n"
191+
" /* 富比较操作 */\n"
192+
" richcmpfunc tp_richcompare;\n"
193+
"\n"
194+
" /* 启用弱引用 */\n"
195+
" Py_ssize_t tp_weaklistoffset;\n"
196+
"\n"
197+
" /* 迭代器 */\n"
198+
" getiterfunc tp_iter;\n"
199+
" iternextfunc tp_iternext;\n"
200+
"\n"
201+
" /* 属性描述器和子类化内容 */\n"
202+
" PyMethodDef *tp_methods;\n"
203+
" PyMemberDef *tp_members;\n"
204+
" PyGetSetDef *tp_getset;\n"
205+
" // 堆类型的强引用,静态类型的借入引用\n"
206+
" PyTypeObject *tp_base;\n"
207+
" PyObject *tp_dict;\n"
208+
" descrgetfunc tp_descr_get;\n"
209+
" descrsetfunc tp_descr_set;\n"
210+
" Py_ssize_t tp_dictoffset;\n"
211+
" initproc tp_init;\n"
212+
" allocfunc tp_alloc;\n"
213+
" newfunc tp_new;\n"
214+
" freefunc tp_free; /* 层级的释放内存例程 */\n"
215+
" inquiry tp_is_gc; /* 用于 PyObject_IS_GC */\n"
216+
" PyObject *tp_bases;\n"
217+
" PyObject *tp_mro; /* 方法解析顺序 */\n"
218+
" PyObject *tp_cache; /* 不再被使用 */\n"
219+
" void *tp_subclasses; /* 对于静态内置类型这将是一个索引 */\n"
220+
" PyObject *tp_weaklist; /* 不被用于静态内置类型 */\n"
221+
" destructor tp_del;\n"
222+
"\n"
223+
" /* 类型属性缓存版本标签。 在 2.6 版中添加。\n"
224+
" * 如果为零,则缓存无效并且必须被初始化。\n"
225+
" */\n"
226+
" unsigned int tp_version_tag;\n"
227+
"\n"
228+
" destructor tp_finalize;\n"
229+
" vectorcallfunc tp_vectorcall;\n"
230+
"\n"
231+
" /* 类型监视器针对此类型的位设置 */\n"
232+
" unsigned char tp_watched;\n"
233+
"\n"
234+
" /* 使用的 tp_version_tag 值数量。\n"
235+
" * 如果针对此类型的属性缓存被禁用则设为 _Py_ATTR_CACHE_UNUSED\n"
236+
" * (例如由于自定义的 MRO 条目而被禁用)。\n"
237+
" * 在其他情况下,将被限制为 MAX_VERSIONS_PER_CLASS (在其他地方定义)。\n"
238+
" */\n"
239+
" uint16_t tp_versions_used;\n"
240+
"} PyTypeObject;\n"
146241

147242
#: ../../extending/newtypes.rst:20
148243
msgid ""
@@ -233,6 +328,13 @@ msgid ""
233328
" Py_TYPE(self)->tp_free(self);\n"
234329
"}"
235330
msgstr ""
331+
"static void\n"
332+
"newdatatype_dealloc(PyObject *op)\n"
333+
"{\n"
334+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
335+
" free(self->obj_UnderlyingDatatypePtr);\n"
336+
" Py_TYPE(self)->tp_free(self);\n"
337+
"}"
236338

237339
#: ../../extending/newtypes.rst:80
238340
msgid ""
@@ -252,6 +354,15 @@ msgid ""
252354
" Py_TYPE(self)->tp_free(self);\n"
253355
"}"
254356
msgstr ""
357+
"static void\n"
358+
"newdatatype_dealloc(PyObject *op)\n"
359+
"{\n"
360+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
361+
" PyObject_GC_UnTrack(op);\n"
362+
" Py_CLEAR(self->other_obj);\n"
363+
" ...\n"
364+
" Py_TYPE(self)->tp_free(self);\n"
365+
"}"
255366

256367
#: ../../extending/newtypes.rst:97
257368
msgid ""
@@ -300,6 +411,33 @@ msgid ""
300411
" Py_TYPE(self)->tp_free(self);\n"
301412
"}"
302413
msgstr ""
414+
"static void\n"
415+
"my_dealloc(PyObject *obj)\n"
416+
"{\n"
417+
" MyObject *self = (MyObject *) obj;\n"
418+
" PyObject *cbresult;\n"
419+
"\n"
420+
" if (self->my_callback != NULL) {\n"
421+
" PyObject *err_type, *err_value, *err_traceback;\n"
422+
"\n"
423+
" /* 这里保存当前异常状态 */\n"
424+
" PyErr_Fetch(&err_type, &err_value, &err_traceback);\n"
425+
"\n"
426+
" cbresult = PyObject_CallNoArgs(self->my_callback);\n"
427+
" if (cbresult == NULL) {\n"
428+
" PyErr_WriteUnraisable(self->my_callback);\n"
429+
" }\n"
430+
" else {\n"
431+
" Py_DECREF(cbresult);\n"
432+
" }\n"
433+
"\n"
434+
" /* 这里恢复被保存的异常状态 */\n"
435+
" PyErr_Restore(err_type, err_value, err_traceback);\n"
436+
"\n"
437+
" Py_DECREF(self->my_callback);\n"
438+
" }\n"
439+
" Py_TYPE(self)->tp_free(self);\n"
440+
"}"
303441

304442
#: ../../extending/newtypes.rst:138
305443
msgid ""
@@ -376,6 +514,13 @@ msgid ""
376514
" self->obj_UnderlyingDatatypePtr->size);\n"
377515
"}"
378516
msgstr ""
517+
"static PyObject *\n"
518+
"newdatatype_repr(PyObject *op)\n"
519+
"{\n"
520+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
521+
" return PyUnicode_FromFormat(\"Repr-ified_newdatatype{{size:%d}}\",\n"
522+
" self->obj_UnderlyingDatatypePtr->size);\n"
523+
"}"
379524

380525
#: ../../extending/newtypes.rst:182
381526
msgid ""
@@ -417,6 +562,13 @@ msgid ""
417562
" self->obj_UnderlyingDatatypePtr->size);\n"
418563
"}"
419564
msgstr ""
565+
"static PyObject *\n"
566+
"newdatatype_str(PyObject *op)\n"
567+
"{\n"
568+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
569+
" return PyUnicode_FromFormat(\"Stringified_newdatatype{{size:%d}}\",\n"
570+
" self->obj_UnderlyingDatatypePtr->size);\n"
571+
"}"
420572

421573
#: ../../extending/newtypes.rst:206
422574
msgid "Attribute Management"
@@ -680,6 +832,19 @@ msgid ""
680832
" return NULL;\n"
681833
"}"
682834
msgstr ""
835+
"static PyObject *\n"
836+
"newdatatype_getattr(PyObject *op, char *name)\n"
837+
"{\n"
838+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
839+
" if (strcmp(name, \"data\") == 0) {\n"
840+
" return PyLong_FromLong(self->data);\n"
841+
" }\n"
842+
"\n"
843+
" PyErr_Format(PyExc_AttributeError,\n"
844+
" \"'%.100s' object has no attribute '%.400s'\",\n"
845+
" Py_TYPE(self)->tp_name, name);\n"
846+
" return NULL;\n"
847+
"}"
683848

684849
#: ../../extending/newtypes.rst:351
685850
msgid ""
@@ -704,6 +869,12 @@ msgid ""
704869
" return -1;\n"
705870
"}"
706871
msgstr ""
872+
"static int\n"
873+
"newdatatype_setattr(PyObject *op, char *name, PyObject *v)\n"
874+
"{\n"
875+
" PyErr_Format(PyExc_RuntimeError, \"Read-only attribute: %s\", name);\n"
876+
" return -1;\n"
877+
"}"
707878

708879
#: ../../extending/newtypes.rst:365
709880
msgid "Object Comparison"
@@ -773,6 +944,31 @@ msgid ""
773944
" return Py_NewRef(result);\n"
774945
" }"
775946
msgstr ""
947+
"static PyObject *\n"
948+
"newdatatype_richcmp(PyObject *lhs, PyObject *rhs, int op)\n"
949+
"{\n"
950+
" newdatatypeobject *obj1 = (newdatatypeobject *) lhs;\n"
951+
" newdatatypeobject *obj2 = (newdatatypeobject *) rhs;\n"
952+
" PyObject *result;\n"
953+
" int c, size1, size2;\n"
954+
"\n"
955+
" /* 省略了确保两个参数均为\n"
956+
" newdatatype 类型的代码 */\n"
957+
"\n"
958+
" size1 = obj1->obj_UnderlyingDatatypePtr->size;\n"
959+
" size2 = obj2->obj_UnderlyingDatatypePtr->size;\n"
960+
"\n"
961+
" switch (op) {\n"
962+
" case Py_LT: c = size1 < size2; break;\n"
963+
" case Py_LE: c = size1 <= size2; break;\n"
964+
" case Py_EQ: c = size1 == size2; break;\n"
965+
" case Py_NE: c = size1 != size2; break;\n"
966+
" case Py_GT: c = size1 > size2; break;\n"
967+
" case Py_GE: c = size1 >= size2; break;\n"
968+
" }\n"
969+
" result = c ? Py_True : Py_False;\n"
970+
" return Py_NewRef(result);\n"
971+
" }"
776972

777973
#: ../../extending/newtypes.rst:415
778974
msgid "Abstract Protocol Support"
@@ -851,6 +1047,17 @@ msgid ""
8511047
" return result;\n"
8521048
"}"
8531049
msgstr ""
1050+
"static Py_hash_t\n"
1051+
"newdatatype_hash(PyObject *op)\n"
1052+
"{\n"
1053+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
1054+
" Py_hash_t result;\n"
1055+
" result = self->some_size + 32767 * self->some_number;\n"
1056+
" if (result == -1) {\n"
1057+
" result = -2;\n"
1058+
" }\n"
1059+
" return result;\n"
1060+
"}"
8541061

8551062
#: ../../extending/newtypes.rst:460
8561063
msgid ""
@@ -931,6 +1138,24 @@ msgid ""
9311138
" return result;\n"
9321139
"}"
9331140
msgstr ""
1141+
"static PyObject *\n"
1142+
"newdatatype_call(PyObject *op, PyObject *args, PyObject *kwds)\n"
1143+
"{\n"
1144+
" newdatatypeobject *self = (newdatatypeobject *) op;\n"
1145+
" PyObject *result;\n"
1146+
" const char *arg1;\n"
1147+
" const char *arg2;\n"
1148+
" const char *arg3;\n"
1149+
"\n"
1150+
" if (!PyArg_ParseTuple(args, \"sss:call\", &arg1, &arg2, &arg3)) {\n"
1151+
" return NULL;\n"
1152+
" }\n"
1153+
" result = PyUnicode_FromFormat(\n"
1154+
" \"Returning -- value: [%d] arg1: [%s] arg2: [%s] arg3: [%s]\\n\",\n"
1155+
" self->obj_UnderlyingDatatypePtr->size,\n"
1156+
" arg1, arg2, arg3);\n"
1157+
" return result;\n"
1158+
"}"
9341159

9351160
#: ../../extending/newtypes.rst:510
9361161
msgid ""
@@ -1074,6 +1299,14 @@ msgid ""
10741299
" Py_TYPE(op)->tp_free(op);\n"
10751300
"}"
10761301
msgstr ""
1302+
"static void\n"
1303+
"Trivial_dealloc(PyObject *op)\n"
1304+
"{\n"
1305+
" /* 在调用任何析构器之前先清除弱引用 */\n"
1306+
" PyObject_ClearWeakRefs(op);\n"
1307+
" /* ... 省略了析构代码的其余部分以保持简短 ... */\n"
1308+
" Py_TYPE(op)->tp_free(op);\n"
1309+
"}"
10771310

10781311
#: ../../extending/newtypes.rst:586
10791312
msgid "More Suggestions"

library/html.parser.po

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2025, Python Software Foundation
2+
# Copyright (C) 2001 Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
@@ -9,16 +9,16 @@
99
# nick <2330458484@qq.com>, 2021
1010
# ProgramRipper, 2023
1111
# cdarlint <cdarling@126.com>, 2023
12-
# Freesand Leo <yuqinju@163.com>, 2024
12+
# Freesand Leo <yuqinju@163.com>, 2025
1313
#
1414
#, fuzzy
1515
msgid ""
1616
msgstr ""
17-
"Project-Id-Version: Python 3.13\n"
17+
"Project-Id-Version: Python 3.14\n"
1818
"Report-Msgid-Bugs-To: \n"
19-
"POT-Creation-Date: 2025-05-08 03:57+0000\n"
19+
"POT-Creation-Date: 2025-05-16 14:19+0000\n"
2020
"PO-Revision-Date: 2021-06-28 01:07+0000\n"
21-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
21+
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2025\n"
2222
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2323
"MIME-Version: 1.0\n"
2424
"Content-Type: text/plain; charset=UTF-8\n"
@@ -90,6 +90,7 @@ msgid ""
9090
":class:`HTMLParser` class to print out start tags, end tags, and data as "
9191
"they are encountered:"
9292
msgstr ""
93+
"下面的基本示例是一个简单的 HTML 解析器,它使用 :class:`HTMLParser` 类,会在遇到开始标记、结束标记和数据时将它们打印出来:"
9394

9495
#: ../../library/html.parser.rst:48
9596
msgid ""
@@ -372,7 +373,7 @@ msgstr "例子"
372373
msgid ""
373374
"The following class implements a parser that will be used to illustrate more"
374375
" examples:"
375-
msgstr ""
376+
msgstr "下面的类实现了一个解析器,它将被用来演示更多的例子:"
376377

377378
#: ../../library/html.parser.rst:237
378379
msgid ""

0 commit comments

Comments
 (0)