Skip to content

Commit 39c3228

Browse files
chore: sync msgids with CPython 3.15
1 parent f58d34d commit 39c3228

12 files changed

Lines changed: 590 additions & 135 deletions

File tree

‎c-api/bytes.po‎

Lines changed: 123 additions & 1 deletion
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-10-01 14:41+0330\n"
17+
"POT-Creation-Date: 2026-10-11 04:18+0000\n"
1818
"PO-Revision-Date: 2026-09-15 13:25+0330\n"
1919
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
2020
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
@@ -396,6 +396,128 @@ msgstr ""
396396
"}\n"
397397
"return (char*)PyBytesWriter_GetData(writer) + pos;"
398398

399+
msgid "Example creating the string ``b'abc'``"
400+
msgstr ""
401+
402+
msgid "Example creating the bytes string ``b\"abc\"``, with a fixed size of 3 bytes::"
403+
msgstr ""
404+
405+
msgid ""
406+
"PyObject* create_abc(void)\n"
407+
"{\n"
408+
" PyBytesWriter *writer = PyBytesWriter_Create(3);\n"
409+
" if (writer == NULL) {\n"
410+
" return NULL;\n"
411+
" }\n"
412+
"\n"
413+
" char *str = PyBytesWriter_GetData(writer);\n"
414+
" memcpy(str, \"abc\", 3);\n"
415+
" return PyBytesWriter_Finish(writer);\n"
416+
"}"
417+
msgstr ""
418+
419+
msgid "Variant using a pointer to compute the final size::"
420+
msgstr ""
421+
422+
msgid ""
423+
"PyObject* create_abc_ptr(void)\n"
424+
"{\n"
425+
" PyBytesWriter *writer = PyBytesWriter_Create(3);\n"
426+
" if (writer == NULL) {\n"
427+
" return NULL;\n"
428+
" }\n"
429+
"\n"
430+
" char *str = PyBytesWriter_GetData(writer);\n"
431+
" memcpy(str, \"abc\", 3);\n"
432+
" str += 1;\n"
433+
" return PyBytesWriter_FinishWithPointer(writer, str);\n"
434+
"}"
435+
msgstr ""
436+
437+
msgid "Update ``PyBytes_FromStringAndSize()`` code"
438+
msgstr ""
439+
440+
#, fuzzy
441+
#| msgid "Use the :c:type:`PyBytesWriter` API instead of ``PyBytes_FromStringAndSize(NULL, len)``."
442+
msgid "Example of code using the soft deprecated ``PyBytes_FromStringAndSize(NULL, size)`` API::"
443+
msgstr "به جای ``PyBytes_FromStringAndSize(NULL, len)`` از API مربوط به :c:type:`PyBytesWriter` استفاده کنید."
444+
445+
msgid ""
446+
"int copy_bytes(char *dest, const char *src, Py_ssize_t num_bytes)\n"
447+
"{\n"
448+
" ...\n"
449+
"}\n"
450+
"\n"
451+
"PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n"
452+
"{\n"
453+
" PyObject *result = PyBytes_FromStringAndSize(NULL, num_bytes);\n"
454+
" if (result == NULL) {\n"
455+
" return NULL;\n"
456+
" }\n"
457+
" if (copy_bytes(PyBytes_AS_STRING(result), start, num_bytes) < 0) {\n"
458+
" Py_CLEAR(result);\n"
459+
" }\n"
460+
" return result;\n"
461+
"}"
462+
msgstr ""
463+
464+
msgid "It can now be updated to::"
465+
msgstr ""
466+
467+
msgid ""
468+
"PyObject* create_string(const char *start, Py_ssize_t num_bytes)\n"
469+
"{\n"
470+
" PyBytesWriter *writer = PyBytesWriter_Create(num_bytes);\n"
471+
" if (writer == NULL) {\n"
472+
" return NULL;\n"
473+
" }\n"
474+
" if (copy_bytes(PyBytesWriter_GetData(writer), start, num_bytes) < 0) {\n"
475+
" PyBytesWriter_Discard(writer);\n"
476+
" return NULL;\n"
477+
" }\n"
478+
" return PyBytesWriter_Finish(writer);\n"
479+
"}"
480+
msgstr ""
481+
482+
msgid "Update ``_PyBytes_Resize()`` code"
483+
msgstr ""
484+
485+
msgid "Example of code using the soft deprecated ``_PyBytes_Resize()`` API::"
486+
msgstr ""
487+
488+
msgid ""
489+
"void create_string(Py_ssize_t size)\n"
490+
"{\n"
491+
" PyObject *bytes = PyBytes_FromStringAndSize(NULL, size);\n"
492+
" if (bytes == NULL) {\n"
493+
" return NULL;\n"
494+
" }\n"
495+
" char *str = PyBytes_AS_STRING(bytes);\n"
496+
"\n"
497+
" // ... write data into str ...\n"
498+
"\n"
499+
" if (_PyBytes_Resize(&bytes, (str - PyBytes_AS_STRING(bytes)))) {\n"
500+
" return NULL;\n"
501+
" }\n"
502+
" return bytes;\n"
503+
"}"
504+
msgstr ""
505+
506+
msgid ""
507+
"void create_string(Py_ssize_t size)\n"
508+
"{\n"
509+
" PyBytesWriter *writer = PyBytesWriter_Create(size);\n"
510+
" if (writer == NULL) {\n"
511+
" return NULL;\n"
512+
" }\n"
513+
" char *str = PyBytesWriter_GetData(writer);\n"
514+
"\n"
515+
" // ... write data into str ...\n"
516+
"\n"
517+
" return PyBytesWriter_FinishWithPointer(writer, str);\n"
518+
"}"
519+
msgstr ""
520+
399521
msgid "object"
400522
msgstr "شیء"
401523

‎library/ctypes.po‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ msgid ""
1515
msgstr ""
1616
"Project-Id-Version: Python 3.14\n"
1717
"Report-Msgid-Bugs-To: \n"
18-
"POT-Creation-Date: 2026-10-01 14:41+0330\n"
18+
"POT-Creation-Date: 2026-10-11 04:18+0000\n"
1919
"PO-Revision-Date: 2026-09-13 18:16+0330\n"
2020
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
2121
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
@@ -2254,6 +2254,11 @@ msgstr "نمونه‌های :class:`PyDLL` را ایجاد می‌کند."
22542254
msgid "An instance of :class:`PyDLL` that exposes Python C API functions as attributes. Note that all these functions are assumed to return C :c:expr:`int`, which is of course not always the truth, so you have to assign the correct :attr:`!restype` attribute to use these functions."
22552255
msgstr "نمونه‌ای از :class:`PyDLL` که توابع Python C API را به‌عنوان ویژگی‌ها در دسترس قرار می‌دهد. توجه داشته باشید که فرض می‌شود همه‌ی این توابع مقداری از نوع C :c:expr:`int` را برمی‌گردانند، که البته همیشه درست نیست، بنابراین برای استفاده از این توابع باید ویژگی :attr:`!restype` صحیح را اختصاص دهید."
22562256

2257+
#, fuzzy
2258+
#| msgid "Note that if the Python interpreter is statically linked, this will be ``None``, as ``dlopen`` is not possible in this case."
2259+
msgid "If the Python interpreter is statically linked, this may be ``None``."
2260+
msgstr "توجه داشته باشید که اگر مفسر پایتون به‌صورت ایستا پیوند شده باشد، این مقدار ``None`` خواهد بود، زیرا در این حالت ``dlopen`` ممکن نیست."
2261+
22572262
msgid "Loading a library through any of these objects raises an :ref:`auditing event <auditing>` ``ctypes.dlopen`` with string argument ``name``, the name used to load the library."
22582263
msgstr "بارگذاری یک کتابخانه از طریق هر یک از این اشیاء، یک :ref:`رویداد حسابرسی <auditing>` ``ctypes.dlopen`` را با آرگومان رشته‌ای ``name``، نام استفاده‌شده برای بارگذاری کتابخانه، پرتاب می‌کند."
22592264

@@ -3378,8 +3383,5 @@ msgstr "*descr* توضیح متنی است. *source* ``ProgID`` وابسته ب
33783383
#~ msgid "For accessing the C Python api directly, a ready-to-use Python shared library object is available:"
33793384
#~ msgstr "برای دسترسی مستقیم به API پایتون C، یک شیء کتابخانه مشترک پایتون آماده استفاده در دسترس است:"
33803385

3381-
#~ msgid "Note that if the Python interpreter is statically linked, this will be ``None``, as ``dlopen`` is not possible in this case."
3382-
#~ msgstr "توجه داشته باشید که اگر مفسر پایتون به‌صورت ایستا پیوند شده باشد، این مقدار ``None`` خواهد بود، زیرا در این حالت ``dlopen`` ممکن نیست."
3383-
33843386
#~ msgid "See :ref:`ctypes-finding-shared-libraries` for complete documentation."
33853387
#~ msgstr "برای مستندات کامل، :ref:`ctypes-finding-shared-libraries` را ببینید."

‎library/imaplib.po‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ msgid ""
1313
msgstr ""
1414
"Project-Id-Version: Python 3.14\n"
1515
"Report-Msgid-Bugs-To: \n"
16-
"POT-Creation-Date: 2026-10-01 14:41+0330\n"
16+
"POT-Creation-Date: 2026-10-11 04:18+0000\n"
1717
"PO-Revision-Date: 2026-09-15 08:20+0330\n"
1818
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
1919
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
@@ -449,6 +449,15 @@ msgstr "اجازه دادن به دستورات توسعه‌ای ساده که
449449
msgid "The following attributes are defined on instances of :class:`IMAP4`:"
450450
msgstr "ویژگی‌های زیر برای نمونه‌های :class:`IMAP4` تعریف شده‌اند:"
451451

452+
msgid "A tuple of the capabilities advertised by the server, in upper case."
453+
msgstr "یک تاپل از قابلیت‌های تبلیغ‌شده توسط سرور، با حروف بزرگ."
454+
455+
msgid "It is set when the connection is established, and refreshed after a successful :meth:`~IMAP4.login`, :meth:`~IMAP4.authenticate` or :meth:`~IMAP4.starttls`, because the server can advertise different capabilities in different connection states."
456+
msgstr "این مقدار در هنگام برقراری اتصال تنظیم می‌شود، و پس از یک :meth:`~IMAP4.login`، :meth:`~IMAP4.authenticate` یا :meth:`~IMAP4.starttls` موفق، به‌روزرسانی می‌شود، زیرا سرور می‌تواند قابلیت‌های متفاوتی را در وضعیت‌های مختلف اتصال تبلیغ کند."
457+
458+
msgid "Refreshed after :meth:`~IMAP4.login` and :meth:`~IMAP4.authenticate`."
459+
msgstr "پس از :meth:`~IMAP4.login` و :meth:`~IMAP4.authenticate` به‌روزرسانی می‌شود."
460+
452461
msgid "The most recent supported protocol in the ``CAPABILITY`` response from the server."
453462
msgstr "جدیدترین پروتکل پشتیبانی‌شده در پاسخ ``CAPABILITY`` از سرور."
454463

@@ -506,12 +515,3 @@ msgstr "IMAP4_SSL"
506515

507516
msgid "IMAP4_stream"
508517
msgstr "IMAP4_stream"
509-
510-
#~ msgid "A tuple of the capabilities advertised by the server, in upper case."
511-
#~ msgstr "یک تاپل از قابلیت‌های تبلیغ‌شده توسط سرور، با حروف بزرگ."
512-
513-
#~ msgid "It is set when the connection is established, and refreshed after a successful :meth:`~IMAP4.login`, :meth:`~IMAP4.authenticate` or :meth:`~IMAP4.starttls`, because the server can advertise different capabilities in different connection states."
514-
#~ msgstr "این مقدار در هنگام برقراری اتصال تنظیم می‌شود، و پس از یک :meth:`~IMAP4.login`، :meth:`~IMAP4.authenticate` یا :meth:`~IMAP4.starttls` موفق، به‌روزرسانی می‌شود، زیرا سرور می‌تواند قابلیت‌های متفاوتی را در وضعیت‌های مختلف اتصال تبلیغ کند."
515-
516-
#~ msgid "Refreshed after :meth:`~IMAP4.login` and :meth:`~IMAP4.authenticate`."
517-
#~ msgstr "پس از :meth:`~IMAP4.login` و :meth:`~IMAP4.authenticate` به‌روزرسانی می‌شود."

‎library/inspect.po‎

Lines changed: 10 additions & 10 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-10-01 14:41+0330\n"
17+
"POT-Creation-Date: 2026-10-11 04:18+0000\n"
1818
"PO-Revision-Date: 2026-09-13 15:35+0330\n"
1919
"Last-Translator: Sepehr Rasouli <sepehrrasouli06@gmail.com>, 2026\n"
2020
"Language-Team: Persian (https://github.com/python/python-docs-fa/)\n"
@@ -608,6 +608,9 @@ msgstr "همچنین برای متدهای مقید ایجادشده از توا
608608
msgid "Functions wrapped in :func:`functools.partial` now return ``True`` if the wrapped function is a Python generator function."
609609
msgstr "توابع پوشیده‌شده با :func:`functools.partial` اکنون اگر تابع پوشیده‌شده یک تابع تولیدگر پایتون باشد، ``True`` را برمی‌گردانند."
610610

611+
msgid ":term:`Duck-typed <duck-typing>` function-like objects now return ``True`` if their code object has the :data:`CO_GENERATOR` flag."
612+
msgstr ":term:`نوع‌دهی اردکی <duck-typing>` شیءهای شبیه‌تابع اکنون ``True`` برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_GENERATOR` را داشته باشد."
613+
611614
msgid "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if the wrapped function is a Python generator function."
612615
msgstr "توابعی که در :func:`functools.partialmethod` پوشیده شده‌اند، اکنون در صورتی که تابع پوشیده‌شده یک تابع تولیدگر پایتون باشد، ``True`` برمی‌گردانند."
613616

@@ -620,6 +623,9 @@ msgstr "اگر شیء یک :term:`تابع هم‌روال <coroutine function>`
620623
msgid "Functions wrapped in :func:`functools.partial` now return ``True`` if the wrapped function is a :term:`coroutine function`."
621624
msgstr "توابع پوشش‌داده‌شده توسط :func:`functools.partial` اکنون در صورتی ``True`` را برمی‌گردانند که تابع پوشش‌داده‌شده یک :term:`تابع هم‌روال <coroutine function>` باشد."
622625

626+
msgid ":term:`Duck-typed <duck-typing>` function-like objects now return ``True`` if their code object has the :data:`CO_COROUTINE` flag."
627+
msgstr ":term:`نوع‌دهی اردکی <duck-typing>` شیءهای شبیه‌تابع اکنون ``True`` برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_COROUTINE` را داشته باشد."
628+
623629
msgid "Sync functions marked with :func:`markcoroutinefunction` now return ``True``."
624630
msgstr "توابع همگامی که با :func:`markcoroutinefunction` علامت‌گذاری شده‌اند، اکنون ``True`` برمی‌گردانند."
625631

@@ -686,6 +692,9 @@ msgstr ""
686692
msgid "Functions wrapped in :func:`functools.partial` now return ``True`` if the wrapped function is an :term:`asynchronous generator` function."
687693
msgstr "توابعی که با :func:`functools.partial` پوشیده‌شده‌اند، اکنون اگر تابع پوشیده‌شده یک تابع :term:`تولیدگر ناهمگام <asynchronous generator>` باشد، ``True`` برمی‌گردانند."
688694

695+
msgid ":term:`Duck-typed <duck-typing>` function-like objects now return ``True`` if their code object has the :data:`CO_ASYNC_GENERATOR` flag."
696+
msgstr ":term:`نوع‌دهی اردکی <duck-typing>` شیءهای شبیه‌به‌تابع اکنون ``True`` را برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_ASYNC_GENERATOR` را داشته باشد."
697+
689698
msgid "Functions wrapped in :func:`functools.partialmethod` now return ``True`` if the wrapped function is a :term:`asynchronous generator` function."
690699
msgstr "توابع پوشش‌داده‌شده با :func:`functools.partialmethod` اکنون در صورتی ``True`` برمی‌گردانند که تابع پوشش‌داده‌شده یک تابع :term:`تولیدگر ناهمگام <asynchronous generator>` باشد."
691700

@@ -1598,14 +1607,5 @@ msgstr "گزینه‌ی ``--details`` اکنون از درون‌نگری پای
15981607
#~ msgid "encoded mapping of line numbers to bytecode indices"
15991608
#~ msgstr "نگاشت کدگذاری‌شده از شماره سطرها به اندیس‌های بایت‌کد"
16001609

1601-
#~ msgid ":term:`Duck-typed <duck-typing>` function-like objects now return ``True`` if their code object has the :data:`CO_GENERATOR` flag."
1602-
#~ msgstr ":term:`نوع‌دهی اردکی <duck-typing>` شیءهای شبیه‌تابع اکنون ``True`` برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_GENERATOR` را داشته باشد."
1603-
1604-
#~ msgid ":term:`Duck-typed <duck-typing>` function-like objects now return ``True`` if their code object has the :data:`CO_COROUTINE` flag."
1605-
#~ msgstr ":term:`نوع‌دهی اردکی <duck-typing>` شیءهای شبیه‌تابع اکنون ``True`` برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_COROUTINE` را داشته باشد."
1606-
1607-
#~ msgid ":term:`Duck-typed <duck-typing>` function-like objects now return ``True`` if their code object has the :data:`CO_ASYNC_GENERATOR` flag."
1608-
#~ msgstr ":term:`نوع‌دهی اردکی <duck-typing>` شیءهای شبیه‌به‌تابع اکنون ``True`` را برمی‌گردانند اگر شیء کد آن‌ها پرچم :data:`CO_ASYNC_GENERATOR` را داشته باشد."
1609-
16101610
#~ msgid "Get the documentation string for an object, cleaned up with :func:`cleandoc`. If the documentation string for an object is not provided and the object is a class, a method, a property or a descriptor, retrieve the documentation string from the inheritance hierarchy. Return ``None`` if the documentation string is invalid or missing."
16111611
#~ msgstr "رشته مستندات یک شیء را، پاک‌سازی‌شده با :func:`cleandoc`، دریافت کنید. اگر رشته مستندات یک شیء فراهم‌نشده باشد و آن شیء یک کلاس، یک متد، یک ویژگی یا یک توصیف‌گر باشد، رشته مستندات را از سلسله‌مراتب وراثت بازیابی کنید. اگر رشته مستندات نامعتبر یا موجود نباشد، ``None`` را برگردانید."

0 commit comments

Comments
 (0)