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

Skip to content

Commit ef8146c

Browse files
[po] auto sync
1 parent 87e0e9b commit ef8146c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+7787
-729
lines changed

.stat.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"translation": "91.30%", "updated_at": "2024-09-27T15:47:17Z"}
1+
{"translation": "92.65%", "updated_at": "2024-09-27T18:54:35Z"}

c-api/buffer.po

Lines changed: 25 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: 2024-09-20 14:57+0000\n"
14+
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -672,6 +672,30 @@ msgid ""
672672
"\n"
673673
" return 0 <= offset+imin and offset+imax+itemsize <= memlen"
674674
msgstr ""
675+
"def verify_structure(memlen, itemsize, ndim, shape, strides, offset):\n"
676+
" \"\"\"验证形参代表已分配内存范围内一个可用的数组:\n"
677+
" char *mem: 物理内存块的起始\n"
678+
" memlen: 物理内存块的长度\n"
679+
" offset: (char *)buf - mem\n"
680+
" \"\"\"\n"
681+
" if offset % itemsize:\n"
682+
" return False\n"
683+
" if offset < 0 or offset+itemsize > memlen:\n"
684+
" return False\n"
685+
" if any(v % itemsize for v in strides):\n"
686+
" return False\n"
687+
"\n"
688+
" if ndim <= 0:\n"
689+
" return ndim == 0 and not shape and not strides\n"
690+
" if 0 in shape:\n"
691+
" return True\n"
692+
"\n"
693+
" imin = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n"
694+
" if strides[j] <= 0)\n"
695+
" imax = sum(strides[j]*(shape[j]-1) for j in range(ndim)\n"
696+
" if strides[j] > 0)\n"
697+
"\n"
698+
" return 0 <= offset+imin and offset+imax+itemsize <= memlen"
675699

676700
#: ../../c-api/buffer.rst:408
677701
msgid "PIL-style: shape, strides and suboffsets"

c-api/complex.po

Lines changed: 13 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: 2024-07-26 14:49+0000\n"
14+
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -58,6 +58,18 @@ msgstr "对应于 Python 复数对象的值部分的 C 结构体。 大部分用
5858
msgid "The structure is defined as::"
5959
msgstr "其结构定义如下:"
6060

61+
#: ../../c-api/complex.rst:35
62+
msgid ""
63+
"typedef struct {\n"
64+
" double real;\n"
65+
" double imag;\n"
66+
"} Py_complex;"
67+
msgstr ""
68+
"typedef struct {\n"
69+
" double real;\n"
70+
" double imag;\n"
71+
"} Py_complex;"
72+
6173
#: ../../c-api/complex.rst:43
6274
msgid ""
6375
"Return the sum of two complex numbers, using the C :c:type:`Py_complex` "

c-api/contextvars.po

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
# SOME DESCRIPTIVE TITLE.
2-
# Copyright (C) 2001-2023, Python Software Foundation
2+
# Copyright (C) 2001-2024, Python Software Foundation
33
# This file is distributed under the same license as the Python package.
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Kade For, 2021
8-
# Freesand Leo <[email protected]>, 2021
9-
# ppcfish <[email protected]>, 2021
10-
# bmxbmx3 <[email protected]>, 2021
11-
# Jiu Hong Jiang <[email protected]>, 2021
12-
# Bryan不可思议, 2023
7+
# Rafael Fontenelle <[email protected]>, 2024
138
#
149
#, fuzzy
1510
msgid ""
1611
msgstr ""
1712
"Project-Id-Version: Python 3.12\n"
1813
"Report-Msgid-Bugs-To: \n"
19-
"POT-Creation-Date: 2023-07-28 14:13+0000\n"
20-
"PO-Revision-Date: 2021-06-28 00:48+0000\n"
21-
"Last-Translator: Bryan不可思议, 2023\n"
14+
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
15+
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
16+
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
2217
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
2318
"MIME-Version: 1.0\n"
2419
"Content-Type: text/plain; charset=UTF-8\n"
@@ -30,7 +25,7 @@ msgstr ""
3025
msgid "Context Variables Objects"
3126
msgstr "上下文变量对象"
3227

33-
#: ../../c-api/contextvars.rst:13
28+
#: ../../c-api/contextvars.rst:15
3429
msgid ""
3530
"In Python 3.7.1 the signatures of all context variables C APIs were "
3631
"**changed** to use :c:type:`PyObject` pointers instead of "
@@ -40,7 +35,21 @@ msgstr ""
4035
"在 Python 3.7.1 中,所有上下文变量 C API 的签名被 **更改** 为使用 :c:type:`PyObject` 指针而不是 "
4136
":c:type:`PyContext`, :c:type:`PyContextVar` 以及 :c:type:`PyContextToken`,例如::"
4237

43-
#: ../../c-api/contextvars.rst:24
38+
#: ../../c-api/contextvars.rst:20
39+
msgid ""
40+
"// in 3.7.0:\n"
41+
"PyContext *PyContext_New(void);\n"
42+
"\n"
43+
"// in 3.7.1+:\n"
44+
"PyObject *PyContext_New(void);"
45+
msgstr ""
46+
"// 在3.7.0:\n"
47+
"PyContext *PyContext_New(void);\n"
48+
"\n"
49+
"// 在3.7.1+:\n"
50+
"PyObject *PyContext_New(void);"
51+
52+
#: ../../c-api/contextvars.rst:26
4453
msgid "See :issue:`34762` for more details."
4554
msgstr "请参阅 :issue:`34762` 了解详情。"
4655

c-api/datetime.po

Lines changed: 3 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: 2024-09-20 14:57+0000\n"
14+
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -368,3 +368,5 @@ msgid ""
368368
"Create and return a new :class:`datetime.date` object given an argument "
369369
"tuple suitable for passing to :meth:`datetime.date.fromtimestamp`."
370370
msgstr ""
371+
"创建并返回一个新的 :class:`datetime.date` 对象,给定一个适合传递给 "
372+
":meth:`datetime.date.fromtimestamp` 的参数元组"

c-api/gcsupport.po

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Makdon <[email protected]>, 2021
8-
# Freesand Leo <[email protected]>, 2024
7+
# Rafael Fontenelle <[email protected]>, 2024
98
#
109
#, fuzzy
1110
msgid ""
1211
msgstr ""
1312
"Project-Id-Version: Python 3.12\n"
1413
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2024-04-14 22:56+0000\n"
16-
"PO-Revision-Date: 2021-06-28 00:48+0000\n"
17-
"Last-Translator: Freesand Leo <yuqinju@163.com>, 2024\n"
14+
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
15+
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
16+
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n"
1817
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
1918
"MIME-Version: 1.0\n"
2019
"Content-Type: text/plain; charset=UTF-8\n"
@@ -50,7 +49,7 @@ msgstr ""
5049
":c:macro:`Py_TPFLAGS_HAVE_GC` 并提供一个 :c:member:`~PyTypeObject.tp_traverse` "
5150
"处理器的实现。 如果该类型的实例是可变的,则还必须提供 :c:member:`~PyTypeObject.tp_clear` 的实现。"
5251

53-
#: ../../c-api/gcsupport.rst:24
52+
#: ../../c-api/gcsupport.rst:21
5453
msgid ":c:macro:`Py_TPFLAGS_HAVE_GC`"
5554
msgstr ":c:macro:`Py_TPFLAGS_HAVE_GC`"
5655

@@ -308,6 +307,24 @@ msgstr ""
308307
"如果 *o* 不为 ``NULL``,则调用 *visit* 回调函数,附带参数 *o* 和 *arg*。 如果 *visit* "
309308
"返回一个非零值,则返回该值。 使用此宏之后,:c:member:`~PyTypeObject.tp_traverse` 处理程序的形式如下::"
310309

310+
#: ../../c-api/gcsupport.rst:190
311+
msgid ""
312+
"static int\n"
313+
"my_traverse(Noddy *self, visitproc visit, void *arg)\n"
314+
"{\n"
315+
" Py_VISIT(self->foo);\n"
316+
" Py_VISIT(self->bar);\n"
317+
" return 0;\n"
318+
"}"
319+
msgstr ""
320+
"static int\n"
321+
"my_traverse(Noddy *self, visitproc visit, void *arg)\n"
322+
"{\n"
323+
" Py_VISIT(self->foo);\n"
324+
" Py_VISIT(self->bar);\n"
325+
" return 0;\n"
326+
"}"
327+
311328
#: ../../c-api/gcsupport.rst:198
312329
msgid ""
313330
"The :c:member:`~PyTypeObject.tp_clear` handler must be of the "

c-api/init.po

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ msgid ""
1212
msgstr ""
1313
"Project-Id-Version: Python 3.12\n"
1414
"Report-Msgid-Bugs-To: \n"
15-
"POT-Creation-Date: 2024-09-20 14:57+0000\n"
15+
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
1616
"PO-Revision-Date: 2024-05-11 00:32+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"
@@ -1256,6 +1256,11 @@ msgid ""
12561256
"Reacquire the global interpreter lock.\n"
12571257
"Restore the thread state from the local variable."
12581258
msgstr ""
1259+
"将线程状态保存到一个局部变量中。\n"
1260+
"释放全局解释器锁。\n"
1261+
"... 执行某些阻塞式的 I/O 操作 ...\n"
1262+
"重新获取全局解释器锁。\n"
1263+
"从局部变量中恢复线程状态。"
12591264

12601265
#: ../../c-api/init.rst:888
12611266
msgid "This is so common that a pair of macros exists to simplify it::"
@@ -1267,6 +1272,9 @@ msgid ""
12671272
"... Do some blocking I/O operation ...\n"
12681273
"Py_END_ALLOW_THREADS"
12691274
msgstr ""
1275+
"Py_BEGIN_ALLOW_THREADS\n"
1276+
"... 执行某些阻塞式的 I/O 操作 ...\n"
1277+
"Py_END_ALLOW_THREADS"
12701278

12711279
#: ../../c-api/init.rst:898
12721280
msgid ""
@@ -1289,6 +1297,11 @@ msgid ""
12891297
"... Do some blocking I/O operation ...\n"
12901298
"PyEval_RestoreThread(_save);"
12911299
msgstr ""
1300+
"PyThreadState *_save;\n"
1301+
"\n"
1302+
"_save = PyEval_SaveThread();\n"
1303+
"... 执行某些阻塞式的 I/O 操作 ...\n"
1304+
"PyEval_RestoreThread(_save);"
12921305

12931306
#: ../../c-api/init.rst:914
12941307
msgid ""
@@ -1367,6 +1380,15 @@ msgid ""
13671380
"/* Release the thread. No Python API allowed beyond this point. */\n"
13681381
"PyGILState_Release(gstate);"
13691382
msgstr ""
1383+
"PyGILState_STATE gstate;\n"
1384+
"gstate = PyGILState_Ensure();\n"
1385+
"\n"
1386+
"/* 在此执行 Python 动作。 */\n"
1387+
"result = CallSomeFunction();\n"
1388+
"/* 评估结果或处理异常 */\n"
1389+
"\n"
1390+
"/* 释放线程。 在此之后不再允许 Python API。 */\n"
1391+
"PyGILState_Release(gstate);"
13701392

13711393
#: ../../c-api/init.rst:965
13721394
msgid ""
@@ -2226,6 +2248,16 @@ msgid ""
22262248
"};\n"
22272249
"PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);"
22282250
msgstr ""
2251+
"PyInterpreterConfig config = {\n"
2252+
" .use_main_obmalloc = 0,\n"
2253+
" .allow_fork = 0,\n"
2254+
" .allow_exec = 0,\n"
2255+
" .allow_threads = 1,\n"
2256+
" .allow_daemon_threads = 0,\n"
2257+
" .check_multi_interp_extensions = 1,\n"
2258+
" .gil = PyInterpreterConfig_OWN_GIL,\n"
2259+
"};\n"
2260+
"PyThreadState *tstate = Py_NewInterpreterFromConfig(&config);"
22292261

22302262
#: ../../c-api/init.rst:1649
22312263
msgid ""

c-api/intro.po

Lines changed: 43 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: 2024-09-20 14:57+0000\n"
14+
"POT-Creation-Date: 2024-09-27 14:50+0000\n"
1515
"PO-Revision-Date: 2024-05-11 00:32+0000\n"
1616
"Last-Translator: Rafael Fontenelle <[email protected]>, 2024\n"
1717
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
@@ -1128,6 +1128,48 @@ msgid ""
11281128
" return rv; /* -1 for error, 0 for success */\n"
11291129
"}"
11301130
msgstr ""
1131+
"int\n"
1132+
"incr_item(PyObject *dict, PyObject *key)\n"
1133+
"{\n"
1134+
" /* 对象全部初始化为 NULL 用于 Py_XDECREF */\n"
1135+
" PyObject *item = NULL, *const_one = NULL, *incremented_item = NULL;\n"
1136+
" int rv = -1; /* 返回值初始化为 -1 (失败) */\n"
1137+
"\n"
1138+
" item = PyObject_GetItem(dict, key);\n"
1139+
" if (item == NULL) {\n"
1140+
" /* 只处理 KeyError: */\n"
1141+
" if (!PyErr_ExceptionMatches(PyExc_KeyError))\n"
1142+
" goto error;\n"
1143+
"\n"
1144+
" /* 清除错误并使用零: */\n"
1145+
" PyErr_Clear();\n"
1146+
" item = PyLong_FromLong(0L);\n"
1147+
" if (item == NULL)\n"
1148+
" goto error;\n"
1149+
" }\n"
1150+
" const_one = PyLong_FromLong(1L);\n"
1151+
" if (const_one == NULL)\n"
1152+
" goto error;\n"
1153+
"\n"
1154+
" incremented_item = PyNumber_Add(item, const_one);\n"
1155+
" if (incremented_item == NULL)\n"
1156+
" goto error;\n"
1157+
"\n"
1158+
" if (PyObject_SetItem(dict, key, incremented_item) < 0)\n"
1159+
" goto error;\n"
1160+
" rv = 0; /* 成功 */\n"
1161+
" /* 继续执行清理代码 */\n"
1162+
"\n"
1163+
" error:\n"
1164+
" /* 清理代码,由成功和失败路径所共享 */\n"
1165+
"\n"
1166+
" /* 使用 Py_XDECREF() 以忽略 NULL 引用 */\n"
1167+
" Py_XDECREF(item);\n"
1168+
" Py_XDECREF(const_one);\n"
1169+
" Py_XDECREF(incremented_item);\n"
1170+
"\n"
1171+
" return rv; /* -1 表示错误, 0 表示成功 */\n"
1172+
"}"
11311173

11321174
#: ../../c-api/intro.rst:716
11331175
msgid ""

0 commit comments

Comments
 (0)