# SOME DESCRIPTIVE TITLE. # Copyright (C) 2025, kolo # This file is distributed under the same license as the Argenta package. # FIRST AUTHOR , 2025. # msgid "" msgstr "" "Project-Id-Version: Argenta \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-12-02 22:27+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: en\n" "Language-Team: en \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 2.17.0\n" #: ../../root/api/router.rst:4 msgid "Router" msgstr "" #: ../../root/api/router.rst:6 msgid "" "``Router`` — это основной строительный блок для организации логики в " "приложении. Его задача — группировать связанные команды и их обработчики." " Каждый роутер представляет собой логический контейнер для определённого " "набора функций." msgstr "" "``Router`` is the main building block for organizing logic in an " "application. Its purpose is to group related commands and their handlers. " "Each router represents a logical container for a specific set of functions." #: ../../root/api/router.rst:8 msgid "" "Например, в приложении для управления пользователями один роутер может " "отвечать за аутентификацию (``login``, ``logout``), а другой — за " "операции с профилем (``profile-show``, ``profile-edit``)." msgstr "" "For example, in a user management application, one router can handle " "authentication (``login``, ``logout``), while another handles profile " "operations (``profile-show``, ``profile-edit``)." #: ../../root/api/router.rst:13 msgid "Инициализация" msgstr "Initialization" #: ../../root/api/router.rst:21 msgid "Создаёт новый экземпляр роутера." msgstr "Creates a new router instance." #: ../../root/api/router.rst:23 msgid "" "``title``: Необязательный заголовок для группы команд. Отображается в " "списке доступных команд, помогая пользователю ориентироваться." msgstr "" "``title``: Optional title for the command group. Displayed in the list of " "available commands to help users navigate." #: ../../root/api/router.rst:24 msgid "" "``disable_redirect_stdout``: Если ``True``, отключает перехват ``stdout``" " для всех команд этого роутера. Это необходимо для интерактивных команд " "(например, с ``input()``). При отключении перехвата автоматически " "используется статическая разделительная линия. Подробнее см. в разделе " ":ref:`Переопределение стандартного вывода `." msgstr "" "``disable_redirect_stdout``: If ``True``, disables ``stdout`` capture for " "all commands in this router. This is necessary for interactive commands " "(e.g., with ``input()``). When capture is disabled, a static separator line " "is automatically used. See :ref:`Overriding standard output ` " "for more details." #: ../../root/api/router.rst:29 msgid "Регистрация команд" msgstr "Command Registration" #: ../../root/api/router.rst:31 msgid "" "Для регистрации команды и привязки к ней обработчика используется " "декоратор ``@command``." msgstr "" "The ``@command`` decorator is used to register a command and bind a handler to it." #: ../../root/api/router.rst:35 msgid "Декоратор для регистрации функции как обработчика команды." msgstr "Decorator for registering a function as a command handler." #: ../../root/api/router.rst msgid "Parameters" msgstr "Parameters" #: ../../root/api/router.rst:37 msgid "" "Экземпляр ``Command``, описывающий триггер, флаги и описание команды. " "Может быть строкой, которая станет триггером (без возможности настройки " "флагов и описания)." msgstr "" "A ``Command`` instance describing the trigger, flags, and command description. " "Can be a string that will become the trigger (without the ability to configure " "flags and description)." #: ../../root/api/router.rst:39 msgid "**Пример использования:**" msgstr "**Usage example:**" #: ../../root/api/router.rst:48 msgid "Системный роутер" msgstr "System Router" #: ../../root/api/router.rst:50 msgid "" "``Argenta`` поставляется со встроенным системным роутером, который " "автоматически подключается к каждому приложению." msgstr "" "``Argenta`` comes with a built-in system router that is automatically " "connected to every application." #: ../../root/api/router.rst:55 msgid "" "Предопределённый экземпляр ``Router`` с базовыми системными командами (по" " умолчанию — команда выхода). Имеет заголовок **«System points:»**, " "который можно переопределить в ``App``." msgstr "" "A predefined ``Router`` instance with basic system commands (by default, " "the exit command). Has the title **\"System points:\"**, which can be " "overridden in ``App``." #: ../../root/api/router.rst:57 msgid "" "Вы можете добавлять свои команды в этот роутер. Для этого импортируйте " "``argenta.router.defaults.system_router`` и используйте его декоратор " "``@command``." msgstr "" "You can add your own commands to this router. To do this, import " "``argenta.router.defaults.system_router`` and use its ``@command`` decorator." #: ../../root/api/router.rst:62 msgid "Возможные исключения" msgstr "Possible Exceptions" #: ../../root/api/router.rst:64 msgid "" "При регистрации команд и флагов в ``Router`` могут возникнуть следующие " "исключения:" msgstr "" "The following exceptions may occur when registering commands and flags in ``Router``:" #: ../../root/api/router.rst:68 msgid "" "Выбрасывается, если триггер команды в ``Command`` содержит пробелы. " "Триггеры должны быть одним словом." msgstr "" "Raised if the command trigger in ``Command`` contains spaces. " "Triggers must be a single word." #: ../../root/api/router.rst:70 msgid "**Неправильно:** ``Command(\"add user\")``" msgstr "**Incorrect:** ``Command(\"add user\")``" #: ../../root/api/router.rst:72 msgid "**Правильно:** ``Command(\"add-user\")``" msgstr "**Correct:** ``Command(\"add-user\")``" #: ../../root/api/router.rst:76 msgid "" "Возникает, если при определении флагов для команды были использованы " "дублирующиеся имена. Имена флагов в рамках одной команды должны быть " "уникальны." msgstr "" "Raised if duplicate names were used when defining flags for a command. " "Flag names within a single command must be unique." #: ../../root/api/router.rst:78 msgid "**Пример, вызывающий исключение:**" msgstr "**Example that raises an exception:**" #: ../../root/api/router.rst:90 msgid "" "Возникает, если обработчик команды не принимает обязательный аргумент " "``Response``." msgstr "" "Raised if the command handler does not accept the required ``Response`` argument."