# SOME DESCRIPTIVE TITLE. # Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR , YEAR. # # Translators: # Rafael Fontenelle , 2025 # Revisto , 2025 # Sepehr Rasouli , 2026 # msgid "" msgstr "" "Project-Id-Version: Python 3.14\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-09-16 12:56+0000\n" "PO-Revision-Date: 2026-09-15 13:20+0330\n" "Last-Translator: Sepehr Rasouli , 2026\n" "Language-Team: Persian (https://github.com/python/python-docs-fa/)\n" "Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" "X-Generator: Poedit 3.6\n" msgid "Monitoring C API" msgstr "API پایش C" msgid "Added in version 3.13." msgstr "در نسخه 3.13 افزوده شد." msgid "An extension may need to interact with the event monitoring system. Subscribing to events and registering callbacks can be done via the Python API exposed in :mod:`sys.monitoring`." msgstr "یک ماژول توسعه‌ای ممکن است نیاز به تعامل با سامانه پایش رویدادها داشته باشد. اشتراک در رویدادها و ثبت کال‌بک‌ها را می‌توان از طریق API پایتون ارائه‌شده در :mod:`sys.monitoring` انجام داد." msgid "Generating Execution Events" msgstr "تولید رویدادهای اجرا" msgid "The functions below make it possible for an extension to fire monitoring events as it emulates the execution of Python code. Each of these functions accepts a ``PyMonitoringState`` struct which contains concise information about the activation state of events, as well as the event arguments, which include a ``PyObject*`` representing the code object, the instruction offset and sometimes additional, event-specific arguments (see :mod:`sys.monitoring` for details about the signatures of the different event callbacks). The ``codelike`` argument should be an instance of :class:`types.CodeType` or of a type that emulates it." msgstr "توابع زیر این امکان را فراهم می‌کنند که یک ماژول توسعه‌ای بتواند هنگام شبیه‌سازی اجرای کد پایتون، رویدادهای پایش را ایجاد کند. هر یک از این توابع یک ساختار ``PyMonitoringState`` را می‌پذیرد که اطلاعات مختصری درباره‌ی وضعیت فعال‌سازی رویدادها و همچنین آرگومان‌های رویداد را در بر دارد؛ این آرگومان‌ها شامل یک ``PyObject*`` که نمایانگر شیء کد است، آفست دستورالعمل و گاهی آرگومان‌های اضافی خاص رویداد هستند (برای جزئیات درباره‌ی امضاهای کال‌بک‌های مختلف رویداد به :mod:`sys.monitoring` مراجعه کنید). آرگومان ``codelike`` باید نمونه‌ای از :class:`types.CodeType` یا از نوعی باشد که آن را شبیه‌سازی می‌کند." msgid "The VM disables tracing when firing an event, so there is no need for user code to do that." msgstr "ماشین مجازی هنگام فعال‌سازی رویداد، ردگیری را غیر‌فعال می‌کند، بنابراین نیازی نیست که کد کاربر این کار را انجام دهد." msgid "Monitoring functions should not be called with an exception set, except those listed below as working with the current exception." msgstr "توابع نظارت نباید در حالی که استثنایی تنظیم شده است فراخوانی شوند، به‌جز مواردی که در ادامه به‌عنوان توابعی که با استثنای جاری کار می‌کنند فهرست شده‌اند." msgid "Representation of the state of an event type. It is allocated by the user while its contents are maintained by the monitoring API functions described below." msgstr "بازنمایی وضعیت یک نوع رویداد. آن توسط کاربر تخصیص داده می‌شود، در حالی که محتویات آن توسط توابع API پایش که در ادامه توضیح داده شده‌اند، نگهداری می‌شود." msgid "All of the functions below return 0 on success and -1 (with an exception set) on error." msgstr "تمام توابع زیر در صورت موفقیت 0 و در صورت خطا -1 (همراه با تنظیم استثنا) را برمی‌گردانند." msgid "See :mod:`sys.monitoring` for descriptions of the events." msgstr "برای توضیحات رویدادها به :mod:`sys.monitoring` مراجعه کنید." msgid "Fire a ``PY_START`` event." msgstr "رویداد ``PY_START`` را فعال می‌کند." msgid "Fire a ``PY_RESUME`` event." msgstr "رویداد ``PY_RESUME`` را فعال می‌کند." msgid "Fire a ``PY_RETURN`` event." msgstr "رویداد ``PY_RETURN`` فعال می‌شود." msgid "Fire a ``PY_YIELD`` event." msgstr "رویداد ``PY_YIELD`` را فعال می‌کند." msgid "Fire a ``CALL`` event." msgstr "رویداد ``CALL`` را فراخوانی می‌کند." msgid "Fire a ``LINE`` event." msgstr "رویداد ``LINE`` فعال می‌شود." msgid "Fire a ``JUMP`` event." msgstr "رویداد ``JUMP`` فعال می‌شود." msgid "Fire a ``BRANCH_LEFT`` event." msgstr "رویداد ``BRANCH_LEFT`` را فعال کنید." msgid "Fire a ``BRANCH_RIGHT`` event." msgstr "رویداد ``BRANCH_RIGHT`` را فعال کنید." msgid "Fire a ``C_RETURN`` event." msgstr "رویداد ``C_RETURN`` فعال می‌شود." msgid "Fire a ``PY_THROW`` event with the current exception (as returned by :c:func:`PyErr_GetRaisedException`)." msgstr "رویداد ``PY_THROW`` را با استثنای فعلی (همان‌طور که :c:func:`PyErr_GetRaisedException` برمی‌گرداند) فعال می‌کند." msgid "Fire a ``RAISE`` event with the current exception (as returned by :c:func:`PyErr_GetRaisedException`)." msgstr "رویداد ``RAISE`` به همراه استثنای فعلی (همان‌طور که توسط :c:func:`PyErr_GetRaisedException` برگردانده می‌شود) شلیک می‌شود." msgid "Fire a ``C_RAISE`` event with the current exception (as returned by :c:func:`PyErr_GetRaisedException`)." msgstr "رویداد ``C_RAISE`` را همراه با استثنای فعلی (همان‌طور که توسط :c:func:`PyErr_GetRaisedException` برگردانده می‌شود) فعال می‌کند." msgid "Fire a ``RERAISE`` event with the current exception (as returned by :c:func:`PyErr_GetRaisedException`)." msgstr "رویداد ``RERAISE`` را با استثنای فعلی (که توسط :c:func:`PyErr_GetRaisedException` برگردانده می‌شود) صادر می‌کند." msgid "Fire an ``EXCEPTION_HANDLED`` event with the current exception (as returned by :c:func:`PyErr_GetRaisedException`)." msgstr "رویداد ``EXCEPTION_HANDLED`` را همراه با استثنای فعلی (که توسط :c:func:`PyErr_GetRaisedException` برگردانده می‌شود) فعال می‌کند." msgid "Fire a ``PY_UNWIND`` event with the current exception (as returned by :c:func:`PyErr_GetRaisedException`)." msgstr "رویداد ``PY_UNWIND`` را با استثنای فعلی (همان‌طور که توسط :c:func:`PyErr_GetRaisedException` برگردانده می‌شود) فعال کنید." msgid "Fire a ``STOP_ITERATION`` event. If ``value`` is an instance of :exc:`StopIteration`, it is used. Otherwise, a new :exc:`StopIteration` instance is created with ``value`` as its argument." msgstr "رویداد ``STOP_ITERATION`` را اجرا می‌کند. اگر ``value`` نمونه‌ای از :exc:`StopIteration` باشد، از آن استفاده می‌شود. در غیر این صورت، نمونه‌ی جدیدی از :exc:`StopIteration` با ``value`` به‌عنوان آرگومان آن ایجاد می‌شود." msgid "Managing the Monitoring State" msgstr "مدیریت وضعیت پایش" msgid "Monitoring states can be managed with the help of monitoring scopes. A scope would typically correspond to a Python function." msgstr "وضعیت‌های نظارت را می‌توان با کمک محدوده‌های نظارت مدیریت کرد. یک محدوده معمولاً متناظر با یک تابع پایتون است." msgid "Enter a monitored scope. ``event_types`` is an array of the event IDs for events that may be fired from the scope. For example, the ID of a ``PY_START`` event is the value ``PY_MONITORING_EVENT_PY_START``, which is numerically equal to the base-2 logarithm of ``sys.monitoring.events.PY_START``. ``state_array`` is an array with a monitoring state entry for each event in ``event_types``, it is allocated by the user but populated by :c:func:`!PyMonitoring_EnterScope` with information about the activation state of the event. The size of ``event_types`` (and hence also of ``state_array``) is given in ``length``." msgstr "ورود به یک محدوده‌ی پایش‌شده. ``event_types`` آرایه‌ای از شناسه‌های رویداد برای رویدادهایی است که ممکن است از این محدوده رخ دهند. برای مثال، شناسه‌ی رویداد ``PY_START`` مقدار ``PY_MONITORING_EVENT_PY_START`` است که از نظر عددی با لگاریتم پایه ۲ ``sys.monitoring.events.PY_START`` برابر است. ``state_array`` آرایه‌ای است که برای هر رویداد در ``event_types`` یک ورودی وضعیت پایش دارد؛ این آرایه توسط کاربر تخصیص داده می‌شود، اما توسط :c:func:`!PyMonitoring_EnterScope` با اطلاعاتی درباره‌ی وضعیت فعال‌سازی رویداد پر می‌شود. اندازه‌ی ``event_types`` (و در نتیجه ``state_array`` نیز) در ``length`` داده می‌شود." msgid "The ``version`` argument is a pointer to a value which should be allocated by the user together with ``state_array`` and initialized to 0, and then set only by :c:func:`!PyMonitoring_EnterScope` itself. It allows this function to determine whether event states have changed since the previous call, and to return quickly if they have not." msgstr "آرگومان ``version`` اشاره‌گری به مقداری است که باید توسط کاربر همراه با ``state_array`` تخصیص داده شود و به 0 مقداردهی اولیه گردد، و سپس تنها توسط خودِ :c:func:`!PyMonitoring_EnterScope` تنظیم شود. این به تابع امکان می‌دهد تشخیص دهد که آیا وضعیت‌های رویداد از فراخوانی قبلی تغییر کرده‌اند یا خیر، و در صورت عدم تغییر، به‌سرعت بازگردد." msgid "The scopes referred to here are lexical scopes: a function, class or method. :c:func:`!PyMonitoring_EnterScope` should be called whenever the lexical scope is entered. Scopes can be reentered, reusing the same *state_array* and *version*, in situations like when emulating a recursive Python function. When a code-like's execution is paused, such as when emulating a generator, the scope needs to be exited and re-entered." msgstr "محدوده‌هایی که در اینجا به آن‌ها اشاره می‌شود، محدوده‌های واژگانی هستند: یک تابع، کلاس یا متد. هرگاه به محدوده واژگانی وارد می‌شود، باید :c:func:`!PyMonitoring_EnterScope` فراخوانی شود. در موقعیت‌هایی مانند هنگام شبیه‌سازی یک تابع بازگشتی پایتون، می‌توان دوباره وارد محدوده‌ها شد و از همان *state_array* و *version* استفاده مجدد کرد. هنگامی که اجرای یک شیء شبه‌کد (code-like) متوقف می‌شود، مانند هنگام شبیه‌سازی یک تولیدگر، باید از محدوده خارج و دوباره به آن وارد شد." msgid "The macros for *event_types* are:" msgstr "ماکروهای *event_types* عبارت‌اند از:" msgid "Macro" msgstr "ماکرو" msgid "Event" msgstr "رویداد" msgid ":monitoring-event:`BRANCH_LEFT`" msgstr ":monitoring-event:`BRANCH_LEFT`" msgid ":monitoring-event:`BRANCH_RIGHT`" msgstr ":monitoring-event:`BRANCH_RIGHT`" msgid ":monitoring-event:`CALL`" msgstr ":monitoring-event:`CALL`" msgid ":monitoring-event:`C_RAISE`" msgstr ":monitoring-event:`C_RAISE`" msgid ":monitoring-event:`C_RETURN`" msgstr ":monitoring-event:`C_RETURN`" msgid ":monitoring-event:`EXCEPTION_HANDLED`" msgstr ":monitoring-event:`EXCEPTION_HANDLED`" msgid ":monitoring-event:`INSTRUCTION`" msgstr ":monitoring-event:`INSTRUCTION`" msgid ":monitoring-event:`JUMP`" msgstr ":monitoring-event:`JUMP`" msgid ":monitoring-event:`LINE`" msgstr ":monitoring-event:`LINE`" msgid ":monitoring-event:`PY_RESUME`" msgstr ":monitoring-event:`PY_RESUME`" msgid ":monitoring-event:`PY_RETURN`" msgstr ":monitoring-event:`PY_RETURN`" msgid ":monitoring-event:`PY_START`" msgstr ":monitoring-event:`PY_START`" msgid ":monitoring-event:`PY_THROW`" msgstr ":monitoring-event:`PY_THROW`" msgid ":monitoring-event:`PY_UNWIND`" msgstr ":monitoring-event:`PY_UNWIND`" msgid ":monitoring-event:`PY_YIELD`" msgstr ":monitoring-event:`PY_YIELD`" msgid ":monitoring-event:`RAISE`" msgstr ":monitoring-event:`RAISE`" msgid ":monitoring-event:`RERAISE`" msgstr ":monitoring-event:`RERAISE`" msgid ":monitoring-event:`STOP_ITERATION`" msgstr ":monitoring-event:`STOP_ITERATION`" msgid "Exit the last scope that was entered with :c:func:`!PyMonitoring_EnterScope`." msgstr "از آخرین محدوده‌ای که با :c:func:`!PyMonitoring_EnterScope` وارد شده بود، خارج شوید." msgid "Return true if the event corresponding to the event ID *ev* is a :ref:`local event `." msgstr "اگر رویداد متناظر با شناسه‌ی رویداد *ev* یک :ref:`رویداد محلی ` باشد، مقدار true برمی‌گرداند."