Skip to content

Commit aa82036

Browse files
chore: sync msgids with CPython 3.15
1 parent 90bdaab commit aa82036

7 files changed

Lines changed: 333 additions & 52 deletions

File tree

‎c-api/init_config.po‎

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ msgid ""
1414
msgstr ""
1515
"Project-Id-Version: Python 3.14\n"
1616
"Report-Msgid-Bugs-To: \n"
17-
"POT-Creation-Date: 2026-11-02 04:12+0000\n"
17+
"POT-Creation-Date: 2026-11-04 04:11+0000\n"
1818
"PO-Revision-Date: 2026-10-06 19:55+0330\n"
1919
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
2020
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
@@ -199,8 +199,8 @@ msgstr "در صورت خطا، خطا را در *config* تنظیم کرده و
199199
msgid "Get a string configuration option as a null-terminated UTF-8 encoded string."
200200
msgstr "یک گزینه پیکربندی رشته‌ای را به‌صورت رشته‌ای کدگذاری‌شده با UTF-8 و پایان‌یافته با تهی دریافت می‌کند."
201201

202-
msgid "*\\*value* can be set to ``NULL`` if the option is an optional string and the option is unset."
203-
msgstr "اگر گزینه یک رشته‌ی اختیاری باشد و تنظیم نشده باشد، می‌توان *\\*value* را برابر ``NULL`` قرار داد."
202+
msgid "*\\*value* can be set to ``NULL`` if the option is unset or if the option is an optional string. Optional strings are documented with the type ``str | None`` in the :ref:`Configuration Options <pyinitconfig-opts>` table."
203+
msgstr ""
204204

205205
msgid "On success, the string must be released with ``free(value)`` if it's not ``NULL``."
206206
msgstr "در صورت موفقیت، اگر رشته ``NULL`` نباشد، باید با ``free(value)`` آزاد شود."
@@ -234,6 +234,9 @@ msgstr "در صورت موفقیت ``0`` را برمی‌گرداند."
234234
msgid "Set a string configuration option from a null-terminated UTF-8 encoded string. The string is copied."
235235
msgstr "یک گزینه پیکربندی رشته‌ای را از یک رشته‌ی کدگذاری‌شده با UTF-8 و خاتمه‌یافته با نویسه تهی تنظیم می‌کند. رشته کپی می‌شود."
236236

237+
msgid "Options documented with the type ``str | None`` in the :ref:`Configuration Options <pyinitconfig-opts>` table can be set to ``NULL``."
238+
msgstr ""
239+
237240
msgid "Set a string list configuration option from an array of null-terminated UTF-8 encoded strings. The string list is copied."
238241
msgstr "یک گزینه پیکربندی فهرست رشته‌ای را از آرایه‌ای از رشته‌های کدگذاری‌شده با UTF-8 و پایان‌یافته با نویسه تهی تنظیم می‌کند. فهرست رشته‌ها کپی می‌شود."
239242

@@ -309,7 +312,9 @@ msgstr "``\"base_exec_prefix\"``"
309312
msgid ":c:member:`base_exec_prefix <PyConfig.base_exec_prefix>`"
310313
msgstr ":c:member:`base_exec_prefix <PyConfig.base_exec_prefix>`"
311314

312-
msgid "``str``"
315+
#, fuzzy
316+
#| msgid "``str``"
317+
msgid "``str | None``"
313318
msgstr "``str``"
314319

315320
msgid "``\"base_executable\"``"
@@ -345,6 +350,9 @@ msgstr "``\"check_hash_pycs_mode\"``"
345350
msgid ":c:member:`check_hash_pycs_mode <PyConfig.check_hash_pycs_mode>`"
346351
msgstr ":c:member:`check_hash_pycs_mode <PyConfig.check_hash_pycs_mode>`"
347352

353+
msgid "``str``"
354+
msgstr "``str``"
355+
348356
msgid "``\"code_debug_ranges\"``"
349357
msgstr "``\"code_debug_ranges\"``"
350358

@@ -477,6 +485,16 @@ msgstr "``\"isolated\"``"
477485
msgid ":c:member:`isolated <PyConfig.isolated>`"
478486
msgstr ":c:member:`isolated <PyConfig.isolated>`"
479487

488+
#, fuzzy
489+
#| msgid "``\"site_import\"``"
490+
msgid "``\"lazy_imports\"``"
491+
msgstr "``\"site_import\"``"
492+
493+
#, fuzzy
494+
#| msgid ":c:member:`site_import <PyConfig.site_import>`"
495+
msgid ":c:member:`lazy_imports <PyConfig.lazy_imports>`"
496+
msgstr ":c:member:`site_import <PyConfig.site_import>`"
497+
480498
msgid "``\"legacy_windows_fs_encoding\"``"
481499
msgstr "``\"legacy_windows_fs_encoding\"``"
482500

@@ -716,6 +734,9 @@ msgstr "``\"_pystats\"``"
716734
msgid ":c:member:`_pystats <PyConfig._pystats>`"
717735
msgstr ":c:member:`_pystats <PyConfig._pystats>`"
718736

737+
msgid "The type ``str | None`` means that the option is an optional string which can be set to ``NULL``."
738+
msgstr ""
739+
719740
msgid "Visibility:"
720741
msgstr "پدیداری:"
721742

@@ -1643,6 +1664,17 @@ msgstr "با گزینه‌ی خط فرمان :option:`-I` روی ``1`` تنظی
16431664
msgid "See also the :ref:`Isolated Configuration <init-isolated-conf>` and :c:member:`PyPreConfig.isolated`."
16441665
msgstr "همچنین :ref:`پیکربندی ایزوله <init-isolated-conf>` و :c:member:`PyPreConfig.isolated` را ببینید."
16451666

1667+
msgid "Control :ref:`lazy imports <lazy-imports>`."
1668+
msgstr ""
1669+
1670+
msgid "A value of ``-1`` keeps the default behaviour, where only imports marked with the ``lazy`` keyword are lazy. A value of ``1`` makes every import lazy. ``0`` is rejected."
1671+
msgstr ""
1672+
1673+
#, fuzzy
1674+
#| msgid "Configured by the :option:`-X int_max_str_digits <-X>` command line flag or the :envvar:`PYTHONINTMAXSTRDIGITS` environment variable."
1675+
msgid "Configured by the :option:`-X lazy_imports <-X>` command line option or the :envvar:`PYTHON_LAZY_IMPORTS` environment variable."
1676+
msgstr "با پرچم خط فرمان :option:`-X int_max_str_digits <-X>` یا متغیر محیطی :envvar:`PYTHONINTMAXSTRDIGITS` پیکربندی می‌شود."
1677+
16461678
msgid "If non-zero, use :class:`io.FileIO` instead of :class:`!io._WindowsConsoleIO` for :data:`sys.stdin`, :data:`sys.stdout` and :data:`sys.stderr`."
16471679
msgstr "اگر غیر صفر باشد، به‌جای :class:`!io._WindowsConsoleIO` از :class:`io.FileIO` برای :data:`sys.stdin`، :data:`sys.stdout` و :data:`sys.stderr` استفاده می‌شود."
16481680

@@ -2457,6 +2489,9 @@ msgstr "main()"
24572489
msgid "argv (in module sys)"
24582490
msgstr "argv (در ماژول sys)"
24592491

2492+
#~ msgid "*\\*value* can be set to ``NULL`` if the option is an optional string and the option is unset."
2493+
#~ msgstr "اگر گزینه یک رشته‌ی اختیاری باشد و تنظیم نشده باشد، می‌توان *\\*value* را برابر ``NULL`` قرار داد."
2494+
24602495
#~ msgid "Set to ``0`` by the :option:`-E` environment variable."
24612496
#~ msgstr "توسط متغیر محیطی :option:`-E` روی ``0`` تنظیم می‌شود."
24622497

‎howto/abi3t-migration.po‎

Lines changed: 85 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ msgid ""
1111
msgstr ""
1212
"Project-Id-Version: Python 3.15\n"
1313
"Report-Msgid-Bugs-To: \n"
14-
"POT-Creation-Date: 2026-10-08 09:24+0330\n"
14+
"POT-Creation-Date: 2026-11-04 04:11+0000\n"
1515
"PO-Revision-Date: 2026-10-10 20:55+0330\n"
1616
"Last-Translator: Automatically generated\n"
1717
"Language-Team: none\n"
@@ -204,17 +204,22 @@ msgstr "`Maturin <https://www.maturin.rs/bindings#py_limited_apiabi3>`__"
204204
msgid "You may want to verify that the tool set the right flag by temporarily adding the following just after ``#include <Python.h>``::"
205205
msgstr "ممکن است بخواهید با افزودن موقت کد زیر درست پس از ``#include <Python.h>`` تأیید کنید که ابزار پرچم درست را تنظیم کرده است::"
206206

207+
#, fuzzy
208+
#| msgid ""
209+
#| "#if Py_TARGET_ABI3T+0 <= 0x30f0000\n"
210+
#| "#error \"abi3t define is not set!\"\n"
211+
#| "#endif"
207212
msgid ""
208-
"#if Py_TARGET_ABI3T+0 <= 0x30f0000\n"
213+
"#if Py_TARGET_ABI3T+0 < 0x30f0000\n"
209214
"#error \"abi3t define is not set!\"\n"
210215
"#endif"
211216
msgstr ""
212217
"#if Py_TARGET_ABI3T+0 <= 0x30f0000\n"
213218
"#error \"abi3t define is not set!\"\n"
214219
"#endif"
215220

216-
msgid "This should result in a different error than \"``abi3t`` define is not set\"."
217-
msgstr "این امر باید خطایی متفاوت از \"``abi3t`` define is not set\" ایجاد کند."
221+
msgid "This should result in a different error than \"``abi3t`` define is not set\". (If you get no error at all, either the module is already ported or you're not compiling the code you changed.)"
222+
msgstr ""
218223

219224
msgid "`Building and distributing abi3t extensions <https://py-free-threading.github.io/abi3t/>`__: Build configuration and wheel testing examples in the community-maintained Python Free-Threading Guide."
220225
msgstr "`Building and distributing abi3t extensions <https://py-free-threading.github.io/abi3t/>`__: پیکربندی ساخت و نمونه‌های آزمایش ویل (wheel) در راهنمای پایتون بدون قفل (Free-Threading) که توسط کامیونیتی نگهداری می‌شود."
@@ -379,6 +384,20 @@ msgstr "جایگاه‌های موجود"
379384
msgid "If you have a ``Py_mod_slots`` slot, check the array it refers to. It should be a :c:type:`PyModuleDef_Slot` array like the following:"
380385
msgstr "اگر یک جایگاه (slot) به نام ``Py_mod_slots`` دارید، آرایه‌ای را که به آن اشاره می‌کند بررسی کنید. این آرایه باید مشابه نمونه‌ی زیر یک آرایه‌ی :c:type:`PyModuleDef_Slot` باشد:"
381386

387+
#, fuzzy
388+
#| msgid ""
389+
#| "static PyObject *create_module(PyObject *spec, PyModuleDef *def) { ... }\n"
390+
#| "static int my_first_module_exec(PyObject *module) { ... }\n"
391+
#| "static int my_second_module_exec(PyObject *module) { ... }\n"
392+
#| "\n"
393+
#| "static PyModuleDef_Slot my_slots[] = {\n"
394+
#| " {Py_mod_gil, Py_MOD_GIL_NOT_USED},\n"
395+
#| " {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},\n"
396+
#| " {Py_mod_create, my_module_create},\n"
397+
#| " {Py_mod_exec, my_first_module_exec},\n"
398+
#| " {Py_mod_exec, my_second_module_exec},\n"
399+
#| " {0, NULL}\n"
400+
#| "};"
382401
msgid ""
383402
"static PyObject *create_module(PyObject *spec, PyModuleDef *def) { ... }\n"
384403
"static int my_first_module_exec(PyObject *module) { ... }\n"
@@ -387,7 +406,7 @@ msgid ""
387406
"static PyModuleDef_Slot my_slots[] = {\n"
388407
" {Py_mod_gil, Py_MOD_GIL_NOT_USED},\n"
389408
" {Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED},\n"
390-
" {Py_mod_create, my_module_create},\n"
409+
" {Py_mod_create, create_module},\n"
391410
" {Py_mod_exec, my_first_module_exec},\n"
392411
" {Py_mod_exec, my_second_module_exec},\n"
393412
" {0, NULL}\n"
@@ -406,7 +425,9 @@ msgstr ""
406425
" {0, NULL}\n"
407426
"};"
408427

409-
msgid "``py_mod_create``"
428+
#, fuzzy
429+
#| msgid "``py_mod_create``"
430+
msgid "``Py_mod_create``"
410431
msgstr "``py_mod_create``"
411432

412433
msgid "If you have a :c:macro:`Py_mod_create` entry, make sure the function can be called with ``NULL`` as its second argument (instead of the :c:type:`PyModuleDef`, which you are removing). Often, this argument isn't used at all; you can check by renaming it:"
@@ -418,16 +439,33 @@ msgstr "static PyObject *create_module(PyObject *spec, PyModuleDef *_unused) { .
418439
msgid "If the argument is used, find a different way to pass in the data. Commonly, the information is static and you can refer to it directly. (If you're reusing a single function for several different modules, consider defining several functions instead.)"
419440
msgstr "اگر از آرگومان استفاده می‌شود، روش دیگری برای ارسال داده‌ها پیدا کنید. معمولاً اطلاعات به صورت ایستا هستند و می‌توانید مستقیماً به آن‌ها ارجاع دهید. (اگر از یک تابع واحد برای چند ماژول مختلف استفاده مجدد می‌کنید، به جای آن تعریف چندین تابع را در نظر بگیرید.)"
420441

421-
msgid "Multiple ``py_mod_exec``"
442+
#, fuzzy
443+
#| msgid "Multiple ``py_mod_exec``"
444+
msgid "Multiple ``Py_mod_exec``"
422445
msgstr "چندین ``py_mod_exec``"
423446

424447
msgid "If you have *more than one* :c:macro:`Py_mod_exec` entry, consolidate them: create a new function that calls the others, and replace existing slots with it."
425448
msgstr "اگر *بیش از یک* ورودی :c:macro:`Py_mod_exec` دارید، آن‌ها را یکپارچه کنید: تابعی جدید ایجاد کنید که بقیه را فراخوانی کند و جایگاه‌های موجود را با آن جایگزین کنید."
426449

450+
#, fuzzy
451+
#| msgid ""
452+
#| "static int my_module_exec(PyObject *module) {\n"
453+
#| " if (my_first_module_exec(module) < 0) return -1;\n"
454+
#| " if (my_second_module_exec(module) < 0) return -1;\n"
455+
#| "}\n"
456+
#| "\n"
457+
#| "static PyModuleDef_Slot my_slots[] = {\n"
458+
#| " ...\n"
459+
#| " /* (remove other Py_mod_exec slots) */\n"
460+
#| " ...\n"
461+
#| " {Py_mod_exec, my_module_exec},\n"
462+
#| " {0, NULL}\n"
463+
#| "};"
427464
msgid ""
428465
"static int my_module_exec(PyObject *module) {\n"
429466
" if (my_first_module_exec(module) < 0) return -1;\n"
430467
" if (my_second_module_exec(module) < 0) return -1;\n"
468+
" return 0;\n"
431469
"}\n"
432470
"\n"
433471
"static PyModuleDef_Slot my_slots[] = {\n"
@@ -460,13 +498,24 @@ msgstr "ادغام آرایه‌های جایگاه (slot)"
460498
msgid "Optionally, when you break compatibility with Python 3.14, you may clean up the code by moving slots into the :c:type:`PySlot` array, and converting the definitions to :c:macro:`PySlot_DATA` and :c:macro:`PySlot_FUNC`:"
461499
msgstr "به صورت اختیاری، هنگامی که سازگاری با نسخه‌ی ۳.۱۴ پایتون را قطع می‌کنید، می‌توانید با انتقال جایگاه‌ها به آرایه‌ی :c:type:`PySlot` و تبدیل تعاریف به :c:macro:`PySlot_DATA` و :c:macro:`PySlot_FUNC`، کد را پاکسازی کنید:"
462500

501+
#, fuzzy
502+
#| msgid ""
503+
#| "static PySlot my_slot_array[] = {\n"
504+
#| " ...\n"
505+
#| " PySlot_DATA(Py_mod_gil, Py_MOD_GIL_NOT_USED),\n"
506+
#| " PySlot_DATA(Py_mod_multiple_interpreters,\n"
507+
#| " Py_MOD_PER_INTERPRETER_GIL_SUPPORTED)\n"
508+
#| " PySlot_FUNC(Py_mod_create, my_module_create),\n"
509+
#| " PySlot_FUNC(Py_mod_exec, my_module_exec),\n"
510+
#| " PySlot_END\n"
511+
#| "};"
463512
msgid ""
464513
"static PySlot my_slot_array[] = {\n"
465514
" ...\n"
466515
" PySlot_DATA(Py_mod_gil, Py_MOD_GIL_NOT_USED),\n"
467516
" PySlot_DATA(Py_mod_multiple_interpreters,\n"
468-
" Py_MOD_PER_INTERPRETER_GIL_SUPPORTED)\n"
469-
" PySlot_FUNC(Py_mod_create, my_module_create),\n"
517+
" Py_MOD_PER_INTERPRETER_GIL_SUPPORTED),\n"
518+
" PySlot_FUNC(Py_mod_create, create_module),\n"
470519
" PySlot_FUNC(Py_mod_exec, my_module_exec),\n"
471520
" PySlot_END\n"
472521
"};"
@@ -514,12 +563,19 @@ msgstr "static char my_token;"
514563
msgid "and add a pointer to it in a new entry to your module's ``PySlot`` array:"
515564
msgstr "و یک اشاره‌گر به آن را در یک درایه (عنصر) جدید به آرایه‌ی ``PySlot`` ماژول خود اضافه کنید:"
516565

566+
#, fuzzy
567+
#| msgid ""
568+
#| "static PySlot my_slot_array[] = {\n"
569+
#| " ...\n"
570+
#| " PySlot_STATIC_DATA(Py_mod_token, &my_token),\n"
571+
#| " PySlot_END\n"
572+
#| "}"
517573
msgid ""
518574
"static PySlot my_slot_array[] = {\n"
519575
" ...\n"
520576
" PySlot_STATIC_DATA(Py_mod_token, &my_token),\n"
521577
" PySlot_END\n"
522-
"}"
578+
"};"
523579
msgstr ""
524580
"static PySlot my_slot_array[] = {\n"
525581
" ...\n"
@@ -560,8 +616,13 @@ msgstr ""
560616
msgid "to :c:func:`PyType_GetModuleByToken` (which returns a strong reference):"
561617
msgstr "به :c:func:`PyType_GetModuleByToken` (که یک ارجاع قوی برمی‌گرداند):"
562618

619+
#, fuzzy
620+
#| msgid ""
621+
#| "PyObject *module = PyType_GetModuleByToken(type, my_token);\n"
622+
#| "/* handle error; use module */\n"
623+
#| "Py_XDECREF(module);"
563624
msgid ""
564-
"PyObject *module = PyType_GetModuleByToken(type, my_token);\n"
625+
"PyObject *module = PyType_GetModuleByToken(type, &my_token);\n"
565626
"/* handle error; use module */\n"
566627
"Py_XDECREF(module);"
567628
msgstr ""
@@ -719,12 +780,20 @@ msgstr "در متدهای نمونه، پیاده‌سازی شما ممکن ا
719780
msgid "Otherwise, give your class a unique static token using the :c:macro:`Py_tp_token` slot, and use:"
720781
msgstr "در غیر این صورت، با استفاده از جایگاه :c:macro:`Py_tp_token` یک توکن ایستا و یکتا به کلاس خود بدهید و از موارد زیر استفاده کنید:"
721782

783+
#, fuzzy
784+
#| msgid ""
785+
#| "PyTypeObject cls;\n"
786+
#| "if (PyType_GetBaseByToken(Py_TYPE(obj), my_tp_token, &cls) < 0) {\n"
787+
#| " /* handle error */\n"
788+
#| "}\n"
789+
#| "CustomObjectData *data = PyObject_GetTypeData(obj, cls);"
722790
msgid ""
723-
"PyTypeObject cls;\n"
791+
"PyTypeObject *cls;\n"
724792
"if (PyType_GetBaseByToken(Py_TYPE(obj), my_tp_token, &cls) < 0) {\n"
725793
" /* handle error */\n"
726794
"}\n"
727-
"CustomObjectData *data = PyObject_GetTypeData(obj, cls);"
795+
"CustomObjectData *data = PyObject_GetTypeData(obj, cls);\n"
796+
"Py_DECREF(cls);"
728797
msgstr ""
729798
"PyTypeObject cls;\n"
730799
"if (PyType_GetBaseByToken(Py_TYPE(obj), my_tp_token, &cls) < 0) {\n"
@@ -816,5 +885,8 @@ msgstr "حتماً آزمون‌ها را روی هر دو ساخت نخ‌آز
816885
msgid "If they pass, congratulations! You have an ``abi3t`` extension."
817886
msgstr "اگر با موفقیت انجام شدند، تبریک می‌گوییم! شما یک افزونه‌ی ``abi3t`` دارید."
818887

888+
#~ msgid "This should result in a different error than \"``abi3t`` define is not set\"."
889+
#~ msgstr "این امر باید خطایی متفاوت از \"``abi3t`` define is not set\" ایجاد کند."
890+
819891
#~ msgid "If you use a build tool (such as setuptools, meson-python, scikit-build-core), search its documentation for a way to select ``abi3t``. At the time of writing, not all of them have this; but if your tool does, use it. You may want to verify that it set the right flag by temporarily adding the following just after ``#include <Python.h>``::"
820892
#~ msgstr "اگر از یک ابزار ساخت (مانند setuptools، meson-python، scikit-build-core) استفاده می‌کنید، مستندات آن را برای یافتن روشی جهت انتخاب ``abi3t`` جستجو کنید. در زمان نگارش این متن، همه آن‌ها این ویژگی را ندارند؛ اما اگر ابزار شما دارد، از آن استفاده کنید. ممکن است بخواهید با افزودن موقت کد زیر بلافاصله پس از ``#include <Python.h>`` بررسی کنید که آیا پرچم مناسب را تنظیم کرده است یا خیر::"

0 commit comments

Comments
 (0)