Skip to content

Commit 64d04d6

Browse files
Update Farsi translations from Transifex
1 parent bcef39e commit 64d04d6

38 files changed

Lines changed: 20906 additions & 19730 deletions

c-api/allocation.po

Lines changed: 138 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,20 @@
44
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
55
#
66
# Translators:
7-
# Danial Behzadi <dani.behzi@ubuntu.com>, 2025
87
# Mehdi Batani, 2025
98
# AmirHossein SAMIMI, 2025
109
# khosro azimi, 2025
1110
# Ariyan Bolandi, 2025
12-
# Alireza Shabani (Revisto) <theRevisto@gmail.com>, 2025
13-
# Shahriar Ghasempour, 2025
14-
# Komeil Parseh <komeilparseh@disroot.org>, 2025
11+
# Danial Behzadi <dani.behzi@ubuntu.com>, 2025
1512
#
1613
#, fuzzy
1714
msgid ""
1815
msgstr ""
1916
"Project-Id-Version: Python 3.14\n"
2017
"Report-Msgid-Bugs-To: \n"
21-
"POT-Creation-Date: 2025-05-16 14:19+0000\n"
18+
"POT-Creation-Date: 2025-05-23 14:20+0000\n"
2219
"PO-Revision-Date: 2021-06-28 00:47+0000\n"
23-
"Last-Translator: Komeil Parseh <komeilparseh@disroot.org>, 2025\n"
20+
"Last-Translator: Danial Behzadi <dani.behzi@ubuntu.com>, 2025\n"
2421
"Language-Team: Persian (https://app.transifex.com/python-doc/teams/5390/"
2522
"fa/)\n"
2623
"MIME-Version: 1.0\n"
@@ -37,67 +34,164 @@ msgstr "تخصیص اشیاء روی پشته"
3734
msgid ""
3835
"Initialize a newly allocated object *op* with its type and initial "
3936
"reference. Returns the initialized object. Other fields of the object are "
40-
"not affected."
37+
"not initialized. Despite its name, this function is unrelated to the "
38+
"object's :meth:`~object.__init__` method (:c:member:`~PyTypeObject.tp_init` "
39+
"slot). Specifically, this function does **not** call the object's :meth:`!"
40+
"__init__` method."
4141
msgstr ""
42-
"یک شیء تازه تخصیص یافته *op* را با نوع و مقدار اولیه اش مقداردهی می کند. شیء "
43-
"مقدار دهی شده را برمی گرداند. سایر بخش های شی تحت تأثیر قرار نمی گیرند."
4442

4543
#: ../../c-api/allocation.rst:24
4644
msgid ""
45+
"In general, consider this function to be a low-level routine. Use :c:member:"
46+
"`~PyTypeObject.tp_alloc` where possible. For implementing :c:member:`!"
47+
"tp_alloc` for your type, prefer :c:func:`PyType_GenericAlloc` or :c:func:"
48+
"`PyObject_New`."
49+
msgstr ""
50+
51+
#: ../../c-api/allocation.rst:31
52+
msgid ""
53+
"This function only initializes the object's memory corresponding to the "
54+
"initial :c:type:`PyObject` structure. It does not zero the rest."
55+
msgstr ""
56+
57+
#: ../../c-api/allocation.rst:37
58+
msgid ""
4759
"This does everything :c:func:`PyObject_Init` does, and also initializes the "
4860
"length information for a variable-size object."
4961
msgstr ""
5062
"این تابع همهٔ کارهایی را انجام می‌دهد که :c:func:`PyObject_Init` انجام می‌دهد، "
5163
"و همچنین اطلاعات مربوط به طول را برای یک شیء با اندازهٔ متغیر مقداردهی می‌کند."
5264

53-
#: ../../c-api/allocation.rst:30
65+
#: ../../c-api/allocation.rst:42
66+
msgid ""
67+
"This function only initializes some of the object's memory. It does not "
68+
"zero the rest."
69+
msgstr ""
70+
71+
#: ../../c-api/allocation.rst:48
72+
msgid ""
73+
"Allocates a new Python object using the C structure type *TYPE* and the "
74+
"Python type object *typeobj* (``PyTypeObject*``) by calling :c:func:"
75+
"`PyObject_Malloc` to allocate memory and initializing it like :c:func:"
76+
"`PyObject_Init`. The caller will own the only reference to the object (i.e. "
77+
"its reference count will be one)."
78+
msgstr ""
79+
80+
#: ../../c-api/allocation.rst:54 ../../c-api/allocation.rst:107
81+
msgid ""
82+
"Avoid calling this directly to allocate memory for an object; call the "
83+
"type's :c:member:`~PyTypeObject.tp_alloc` slot instead."
84+
msgstr ""
85+
86+
#: ../../c-api/allocation.rst:57 ../../c-api/allocation.rst:110
87+
msgid ""
88+
"When populating a type's :c:member:`~PyTypeObject.tp_alloc` slot, :c:func:"
89+
"`PyType_GenericAlloc` is preferred over a custom function that simply calls "
90+
"this macro."
91+
msgstr ""
92+
93+
#: ../../c-api/allocation.rst:61
94+
msgid ""
95+
"This macro does not call :c:member:`~PyTypeObject.tp_alloc`, :c:member:"
96+
"`~PyTypeObject.tp_new` (:meth:`~object.__new__`), or :c:member:"
97+
"`~PyTypeObject.tp_init` (:meth:`~object.__init__`)."
98+
msgstr ""
99+
100+
#: ../../c-api/allocation.rst:65
101+
msgid ""
102+
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
103+
"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_New` instead."
104+
msgstr ""
105+
106+
#: ../../c-api/allocation.rst:68
107+
msgid ""
108+
"Memory allocated by this macro must be freed with :c:func:`PyObject_Free` "
109+
"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
110+
msgstr ""
111+
112+
#: ../../c-api/allocation.rst:73 ../../c-api/allocation.rst:123
54113
msgid ""
55-
"Allocate a new Python object using the C structure type *TYPE* and the "
56-
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
57-
"Python object header are not initialized. The caller will own the only "
58-
"reference to the object (i.e. its reference count will be one). The size of "
59-
"the memory allocation is determined from the :c:member:`~PyTypeObject."
60-
"tp_basicsize` field of the type object."
114+
"The returned memory is not guaranteed to have been completely zeroed before "
115+
"it was initialized."
61116
msgstr ""
62117

63-
#: ../../c-api/allocation.rst:38
118+
#: ../../c-api/allocation.rst:78 ../../c-api/allocation.rst:128
64119
msgid ""
65-
"Note that this function is unsuitable if *typeobj* has :c:macro:"
66-
"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_New` "
67-
"instead."
120+
"This macro does not construct a fully initialized object of the given type; "
121+
"it merely allocates memory and prepares it for further initialization by :c:"
122+
"member:`~PyTypeObject.tp_init`. To construct a fully initialized object, "
123+
"call *typeobj* instead. For example::"
124+
msgstr ""
125+
126+
#: ../../c-api/allocation.rst:83
127+
msgid "PyObject *foo = PyObject_CallNoArgs((PyObject *)&PyFoo_Type);"
128+
msgstr ""
129+
130+
#: ../../c-api/allocation.rst:87 ../../c-api/allocation.rst:137
131+
msgid ":c:func:`PyObject_Free`"
132+
msgstr ""
133+
134+
#: ../../c-api/allocation.rst:88
135+
msgid ":c:macro:`PyObject_GC_New`"
136+
msgstr ""
137+
138+
#: ../../c-api/allocation.rst:89 ../../c-api/allocation.rst:139
139+
msgid ":c:func:`PyType_GenericAlloc`"
140+
msgstr ""
141+
142+
#: ../../c-api/allocation.rst:90 ../../c-api/allocation.rst:140
143+
msgid ":c:member:`~PyTypeObject.tp_alloc`"
144+
msgstr ""
145+
146+
#: ../../c-api/allocation.rst:95
147+
msgid "Like :c:macro:`PyObject_New` except:"
68148
msgstr ""
69-
"توجه داشته باشید که اگر *typeobj* دارای :c:macro:`Py_TPFLAGS_HAVE_GC` مجموعه "
70-
"باشد، این تابع نامناسب است. برای چنین اشیایی به جای آن از :c:func:"
71-
"`PyObject_GC_New` استفاده کنید."
72149

73-
#: ../../c-api/allocation.rst:45
150+
#: ../../c-api/allocation.rst:97
74151
msgid ""
75-
"Allocate a new Python object using the C structure type *TYPE* and the "
76-
"Python type object *typeobj* (``PyTypeObject*``). Fields not defined by the "
77-
"Python object header are not initialized. The allocated memory allows for "
78-
"the *TYPE* structure plus *size* (``Py_ssize_t``) fields of the size given "
79-
"by the :c:member:`~PyTypeObject.tp_itemsize` field of *typeobj*. This is "
80-
"useful for implementing objects like tuples, which are able to determine "
81-
"their size at construction time. Embedding the array of fields into the "
82-
"same allocation decreases the number of allocations, improving the memory "
83-
"management efficiency."
152+
"It allocates enough memory for the *TYPE* structure plus *size* "
153+
"(``Py_ssize_t``) fields of the size given by the :c:member:`~PyTypeObject."
154+
"tp_itemsize` field of *typeobj*."
84155
msgstr ""
85156

86-
#: ../../c-api/allocation.rst:56
157+
#: ../../c-api/allocation.rst:100
158+
msgid "The memory is initialized like :c:func:`PyObject_InitVar`."
159+
msgstr ""
160+
161+
#: ../../c-api/allocation.rst:102
87162
msgid ""
88-
"Note that this function is unsuitable if *typeobj* has :c:macro:"
89-
"`Py_TPFLAGS_HAVE_GC` set. For such objects, use :c:func:`PyObject_GC_NewVar` "
90-
"instead."
163+
"This is useful for implementing objects like tuples, which are able to "
164+
"determine their size at construction time. Embedding the array of fields "
165+
"into the same allocation decreases the number of allocations, improving the "
166+
"memory management efficiency."
167+
msgstr ""
168+
169+
#: ../../c-api/allocation.rst:114
170+
msgid ""
171+
"This cannot be used for objects with :c:macro:`Py_TPFLAGS_HAVE_GC` set in :c:"
172+
"member:`~PyTypeObject.tp_flags`; use :c:macro:`PyObject_GC_NewVar` instead."
173+
msgstr ""
174+
175+
#: ../../c-api/allocation.rst:118
176+
msgid ""
177+
"Memory allocated by this function must be freed with :c:func:`PyObject_Free` "
178+
"(usually called via the object's :c:member:`~PyTypeObject.tp_free` slot)."
179+
msgstr ""
180+
181+
#: ../../c-api/allocation.rst:133
182+
msgid ""
183+
"PyObject *list_instance = PyObject_CallNoArgs((PyObject *)&PyList_Type);"
184+
msgstr ""
185+
186+
#: ../../c-api/allocation.rst:138
187+
msgid ":c:macro:`PyObject_GC_NewVar`"
91188
msgstr ""
92-
"توجه داشته باشید که اگر *typeobj* دارای :c:macro:`Py_TPFLAGS_HAVE_GC` مجموعه "
93-
"باشد، این تابع نامناسب است. برای چنین اشیایی به جای آن از :c:func:"
94-
"`PyObject_GC_NewVar` استفاده کنید."
95189

96-
#: ../../c-api/allocation.rst:63
190+
#: ../../c-api/allocation.rst:145
97191
msgid "Same as :c:func:`PyObject_Free`."
98192
msgstr "همانند :c:func:`PyObject_Free`"
99193

100-
#: ../../c-api/allocation.rst:67
194+
#: ../../c-api/allocation.rst:149
101195
msgid ""
102196
"Object which is visible in Python as ``None``. This should only be accessed "
103197
"using the :c:macro:`Py_None` macro, which evaluates to a pointer to this "
@@ -107,10 +201,10 @@ msgstr ""
107201
"این فقط باید با استفاده از ماکرو :c:macro:`Py_None`، که به یک اشاره گر به "
108202
"این شی ارزیابی می شود، دسترسی پیدا کند."
109203

110-
#: ../../c-api/allocation.rst:74
204+
#: ../../c-api/allocation.rst:156
111205
msgid ":c:func:`PyModule_Create`"
112206
msgstr ":c:func:`PyModule_Create`"
113207

114-
#: ../../c-api/allocation.rst:75
208+
#: ../../c-api/allocation.rst:157
115209
msgid "To allocate and create extension modules."
116210
msgstr "برای تخصیص و ایجاد ماژول های افزونه."

0 commit comments

Comments
 (0)