Skip to content

Commit c9f2b76

Browse files
author
GitHub Action's update-translation job
committed
Update translation from Transifex
1 parent 247360b commit c9f2b76

41 files changed

Lines changed: 2633 additions & 2277 deletions

Some content is hidden

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

‎c-api/allocation.po‎

Lines changed: 108 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.14\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-05-16 14:19+0000\n"
11+
"POT-Creation-Date: 2025-05-23 14:20+0000\n"
1212
"PO-Revision-Date: 2021-06-28 00:47+0000\n"
1313
"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n"
1414
"MIME-Version: 1.0\n"
@@ -23,7 +23,22 @@ msgstr ""
2323
msgid ""
2424
"Initialize a newly allocated object *op* with its type and initial "
2525
"reference. Returns the initialized object. Other fields of the object are "
26-
"not affected."
26+
"not initialized. Despite its name, this function is unrelated to the "
27+
"object's :meth:`~object.__init__` method (:c:member:`~PyTypeObject.tp_init` "
28+
"slot). Specifically, this function does **not** call the object's :meth:`!"
29+
"__init__` method."
30+
msgstr ""
31+
32+
msgid ""
33+
"In general, consider this function to be a low-level routine. Use :c:member:"
34+
"`~PyTypeObject.tp_alloc` where possible. For implementing :c:member:`!"
35+
"tp_alloc` for your type, prefer :c:func:`PyType_GenericAlloc` or :c:func:"
36+
"`PyObject_New`."
37+
msgstr ""
38+
39+
msgid ""
40+
"This function only initializes the object's memory corresponding to the "
41+
"initial :c:type:`PyObject` structure. It does not zero the rest."
2742
msgstr ""
2843

2944
msgid ""
@@ -32,36 +47,106 @@ msgid ""
3247
msgstr ""
3348

3449
msgid ""
35-
"Allocate a new Python object using the C structure type *TYPE* and the "
36-
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
37-
"Python object header are not initialized. The caller will own the only "
38-
"reference to the object (i.e. its reference count will be one). The size of "
39-
"the memory allocation is determined from the :c:member:`~PyTypeObject."
40-
"tp_basicsize` field of the type object."
50+
"This function only initializes some of the object's memory. It does not "
51+
"zero the rest."
52+
msgstr ""
53+
54+
msgid ""
55+
"Allocates a new Python object using the C structure type *TYPE* and the "
56+
"Python type object *typeobj* (``PyTypeObject*``) by calling :c:func:"
57+
"`PyObject_Malloc` to allocate memory and initializing it like :c:func:"
58+
"`PyObject_Init`. The caller will own the only reference to the object (i.e. "
59+
"its reference count will be one)."
60+
msgstr ""
61+
62+
msgid ""
63+
"Avoid calling this directly to allocate memory for an object; call the "
64+
"type's :c:member:`~PyTypeObject.tp_alloc` slot instead."
65+
msgstr ""
66+
67+
msgid ""
68+
"When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:"
69+
"`PyType_GenericAlloc` is preferred over a custom function that simply calls "
70+
"this macro."
71+
msgstr ""
72+
73+
msgid ""
74+
"This macro does not call :c:member:`~PyTypeObject.tp_alloc`, :c:member:"
75+
"`~PyTypeObject.tp_new` (:meth:`~object.__new__`), or :c:member:"
76+
"`~PyTypeObject.tp_init` (:meth:`~object.__init__`)."
77+
msgstr ""
78+
79+
msgid ""
80+
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
81+
"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` instead."
82+
msgstr ""
83+
84+
msgid ""
85+
"Memory allocated by this macro must be freed with :c:func:`PyObject_Free` "
86+
"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
87+
msgstr ""
88+
89+
msgid ""
90+
"The returned memory is not guaranteed to have been completely zeroed before "
91+
"it was initialized."
92+
msgstr ""
93+
94+
msgid ""
95+
"This macro does not construct a fully initialized object of the given type; "
96+
"it merely allocates memory and prepares it for further initialization by :c:"
97+
"member:`~PyTypeObject.tp_init`. To construct a fully initialized object, "
98+
"call *typeobj* instead. For example::"
99+
msgstr ""
100+
101+
msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);"
102+
msgstr ""
103+
104+
msgid ":c:func:`PyObject_Free`"
105+
msgstr ""
106+
107+
msgid ":c:macro:`PyObject_GC_New`"
108+
msgstr ""
109+
110+
msgid ":c:func:`PyType_GenericAlloc`"
111+
msgstr ""
112+
113+
msgid ":c:member:`~PyTypeObject.tp_alloc`"
114+
msgstr ""
115+
116+
msgid "Like :c:macro:`PyObject_New` except:"
117+
msgstr ""
118+
119+
msgid ""
120+
"It allocates enough memory for the *TYPE* structure plus *size* "
121+
"(``Py_ssize_t``) fields of the size given by the :c:member:`~PyTypeObject."
122+
"tp_itemsize` field of *typeobj*."
123+
msgstr ""
124+
125+
msgid "The memory is initialized like :c:func:`PyObject_InitVar`."
126+
msgstr ""
127+
128+
msgid ""
129+
"This is useful for implementing objects like tuples, which are able to "
130+
"determine their size at construction time. Embedding the array of fields "
131+
"into the same allocation decreases the number of allocations, improving the "
132+
"memory management efficiency."
41133
msgstr ""
42134

43135
msgid ""
44-
"Note that this function is unsuitable if *typeobj* has :c:macro:"
45-
"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_New` "
46-
"instead."
136+
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
137+
"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` instead."
47138
msgstr ""
48139

49140
msgid ""
50-
"Allocate a new Python object using the C structure type *TYPE* and the "
51-
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
52-
"Python object header are not initialized. The allocated memory allows for "
53-
"the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given "
54-
"by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. This is "
55-
"useful for implementing objects like tuples, which are able to determine "
56-
"their size at construction time. Embedding the array of fields into the "
57-
"same allocation decreases the number of allocations, improving the memory "
58-
"management efficiency."
141+
"Memory allocated by this function must be freed with :c:func:`PyObject_Free` "
142+
"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
59143
msgstr ""
60144

61145
msgid ""
62-
"Note that this function is unsuitable if *typeobj* has :c:macro:"
63-
"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_NewVar` "
64-
"instead."
146+
"PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);"
147+
msgstr ""
148+
149+
msgid ":c:macro:`PyObject_GC_NewVar`"
65150
msgstr ""
66151

67152
msgid "Same as :c:func:`PyObject_Free`."

‎c-api/gcsupport.po‎

Lines changed: 65 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: Python 3.14\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2025-05-16 14:19+0000\n"
11+
"POT-Creation-Date: 2025-05-23 14:20+0000\n"
1212
"PO-Revision-Date: 2021-06-28 00:48+0000\n"
1313
"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n"
1414
"MIME-Version: 1.0\n"
@@ -94,11 +94,42 @@ msgid ""
9494
"macro:`Py_TPFLAGS_HAVE_GC` flag set."
9595
msgstr ""
9696

97+
msgid ""
98+
"Do not call this directly to allocate memory for an object; call the type's :"
99+
"c:member:`~PyTypeObject.tp_alloc` slot instead."
100+
msgstr ""
101+
102+
msgid ""
103+
"When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:"
104+
"`PyType_GenericAlloc` is preferred over a custom function that simply calls "
105+
"this macro."
106+
msgstr ""
107+
108+
msgid ""
109+
"Memory allocated by this macro must be freed with :c:func:`PyObject_GC_Del` "
110+
"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
111+
msgstr ""
112+
113+
msgid ":c:func:`PyObject_GC_Del`"
114+
msgstr ""
115+
116+
msgid ":c:macro:`PyObject_New`"
117+
msgstr ""
118+
119+
msgid ":c:func:`PyType_GenericAlloc`"
120+
msgstr ""
121+
122+
msgid ":c:member:`~PyTypeObject.tp_alloc`"
123+
msgstr ""
124+
97125
msgid ""
98126
"Analogous to :c:macro:`PyObject_NewVar` but for container objects with the :"
99127
"c:macro:`Py_TPFLAGS_HAVE_GC` flag set."
100128
msgstr ""
101129

130+
msgid ":c:macro:`PyObject_NewVar`"
131+
msgstr ""
132+
102133
msgid ""
103134
"Analogous to :c:macro:`PyObject_GC_New` but allocates *extra_size* bytes at "
104135
"the end of the object (at offset :c:member:`~PyTypeObject.tp_basicsize`). "
@@ -111,6 +142,12 @@ msgid ""
111142
"managed by Python."
112143
msgstr ""
113144

145+
msgid ""
146+
"Memory allocated by this function must be freed with :c:func:"
147+
"`PyObject_GC_Del` (usually called via the object's :c:member:`~PyTypeObject."
148+
"tp_free` slot)."
149+
msgstr ""
150+
114151
msgid ""
115152
"The function is marked as unstable because the final mechanism for reserving "
116153
"extra data after an instance is not yet decided. For allocating a variable "
@@ -168,6 +205,29 @@ msgid ""
168205
"c:macro:`PyObject_GC_NewVar`."
169206
msgstr ""
170207

208+
msgid ""
209+
"Do not call this directly to free an object's memory; call the type's :c:"
210+
"member:`~PyTypeObject.tp_free` slot instead."
211+
msgstr ""
212+
213+
msgid ""
214+
"Do not use this for memory allocated by :c:macro:`PyObject_New`, :c:macro:"
215+
"`PyObject_NewVar`, or related allocation functions; use :c:func:"
216+
"`PyObject_Free` instead."
217+
msgstr ""
218+
219+
msgid ":c:func:`PyObject_Free` is the non-GC equivalent of this function."
220+
msgstr ""
221+
222+
msgid ":c:macro:`PyObject_GC_New`"
223+
msgstr ""
224+
225+
msgid ":c:macro:`PyObject_GC_NewVar`"
226+
msgstr ""
227+
228+
msgid ":c:member:`~PyTypeObject.tp_free`"
229+
msgstr ""
230+
171231
msgid ""
172232
"Remove the object *op* from the set of container objects tracked by the "
173233
"collector. Note that :c:func:`PyObject_GC_Track` can be called again on "
@@ -218,9 +278,10 @@ msgid ""
218278
msgstr ""
219279

220280
msgid ""
221-
"If *o* is not ``NULL``, call the *visit* callback, with arguments *o* and "
222-
"*arg*. If *visit* returns a non-zero value, then return it. Using this "
223-
"macro, :c:member:`~PyTypeObject.tp_traverse` handlers look like::"
281+
"If the :c:expr:`PyObject *` *o* is not ``NULL``, call the *visit* callback, "
282+
"with arguments *o* and *arg*. If *visit* returns a non-zero value, then "
283+
"return it. Using this macro, :c:member:`~PyTypeObject.tp_traverse` handlers "
284+
"look like::"
224285
msgstr ""
225286

226287
msgid ""

‎c-api/init.po‎

Lines changed: 69 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.14\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2025-05-16 14:19+0000\n"
14+
"POT-Creation-Date: 2025-05-23 14:20+0000\n"
1515
"PO-Revision-Date: 2021-06-28 00:49+0000\n"
1616
"Last-Translator: Jo K, 2023\n"
1717
"Language-Team: German (https://app.transifex.com/python-doc/teams/5390/de/)\n"
@@ -1166,7 +1166,43 @@ msgid ""
11661166
"interpreter (created automatically by :c:func:`Py_Initialize`). Python "
11671167
"supports the creation of additional interpreters (using :c:func:"
11681168
"`Py_NewInterpreter`), but mixing multiple interpreters and the "
1169-
"``PyGILState_*`` API is unsupported."
1169+
"``PyGILState_*`` API is unsupported. This is because :c:func:"
1170+
"`PyGILState_Ensure` and similar functions default to :term:`attaching "
1171+
"<attached thread state>` a :term:`thread state` for the main interpreter, "
1172+
"meaning that the thread can't safely interact with the calling "
1173+
"subinterpreter."
1174+
msgstr ""
1175+
1176+
msgid "Supporting subinterpreters in non-Python threads"
1177+
msgstr ""
1178+
1179+
msgid ""
1180+
"If you would like to support subinterpreters with non-Python created "
1181+
"threads, you must use the ``PyThreadState_*`` API instead of the traditional "
1182+
"``PyGILState_*`` API."
1183+
msgstr ""
1184+
1185+
msgid ""
1186+
"In particular, you must store the interpreter state from the calling "
1187+
"function and pass it to :c:func:`PyThreadState_New`, which will ensure that "
1188+
"the :term:`thread state` is targeting the correct interpreter::"
1189+
msgstr ""
1190+
1191+
msgid ""
1192+
"/* The return value of PyInterpreterState_Get() from the\n"
1193+
" function that created this thread. */\n"
1194+
"PyInterpreterState *interp = ThreadData->interp;\n"
1195+
"PyThreadState *tstate = PyThreadState_New(interp);\n"
1196+
"PyThreadState_Swap(tstate);\n"
1197+
"\n"
1198+
"/* GIL of the subinterpreter is now held.\n"
1199+
" Perform Python actions here. */\n"
1200+
"result = CallSomeFunction();\n"
1201+
"/* evaluate result or handle exception */\n"
1202+
"\n"
1203+
"/* Destroy the thread state. No Python API allowed beyond this point. */\n"
1204+
"PyThreadState_Clear(tstate);\n"
1205+
"PyThreadState_DeleteCurrent();"
11701206
msgstr ""
11711207

11721208
msgid "Cautions about fork()"
@@ -1344,6 +1380,11 @@ msgid ""
13441380
"will simply return ``NULL`` indicating that there was no prior thread state."
13451381
msgstr ""
13461382

1383+
msgid ""
1384+
"Similar to :c:func:`PyGILState_Ensure`, this function will hang the thread "
1385+
"if the runtime is finalizing."
1386+
msgstr ""
1387+
13471388
msgid ""
13481389
"The following functions use thread-local storage, and are not compatible "
13491390
"with sub-interpreters:"
@@ -1376,6 +1417,13 @@ msgid ""
13761417
"fatal error."
13771418
msgstr ""
13781419

1420+
msgid ""
1421+
"Calling this function when the runtime is finalizing is unsafe. Doing so "
1422+
"will either hang the thread until the program ends, or fully crash the "
1423+
"interpreter in rare cases. Refer to :ref:`cautions-regarding-runtime-"
1424+
"finalization` for more details."
1425+
msgstr ""
1426+
13791427
msgid ""
13801428
"Release any resources previously acquired. After this call, Python's state "
13811429
"will be the same as it was prior to the corresponding :c:func:"
@@ -1395,14 +1443,28 @@ msgid ""
13951443
"been made on the main thread. This is mainly a helper/diagnostic function."
13961444
msgstr ""
13971445

1446+
msgid ""
1447+
"This function does not account for :term:`thread states <thread state>` "
1448+
"created by something other than :c:func:`PyGILState_Ensure` (such as :c:func:"
1449+
"`PyThreadState_New`). Prefer :c:func:`PyThreadState_Get` or :c:func:"
1450+
"`PyThreadState_GetUnchecked` for most cases."
1451+
msgstr ""
1452+
13981453
msgid ""
13991454
"Return ``1`` if the current thread is holding the :term:`GIL` and ``0`` "
14001455
"otherwise. This function can be called from any thread at any time. Only if "
1401-
"it has had its Python thread state initialized and currently is holding the :"
1402-
"term:`GIL` will it return ``1``. This is mainly a helper/diagnostic "
1403-
"function. It can be useful for example in callback contexts or memory "
1404-
"allocation functions when knowing that the :term:`GIL` is locked can allow "
1405-
"the caller to perform sensitive actions or otherwise behave differently."
1456+
"it has had its :term:`thread state <attached thread state>` initialized via :"
1457+
"c:func:`PyGILState_Ensure` will it return ``1``. This is mainly a helper/"
1458+
"diagnostic function. It can be useful for example in callback contexts or "
1459+
"memory allocation functions when knowing that the :term:`GIL` is locked can "
1460+
"allow the caller to perform sensitive actions or otherwise behave "
1461+
"differently."
1462+
msgstr ""
1463+
1464+
msgid ""
1465+
"If the current Python process has ever created a subinterpreter, this "
1466+
"function will *always* return ``1``. Prefer :c:func:"
1467+
"`PyThreadState_GetUnchecked` for most cases."
14061468
msgstr ""
14071469

14081470
msgid ""

0 commit comments

Comments
 (0)