Update documentation

This commit is contained in:
2025-12-08 19:53:03 +03:00
parent 183f069766
commit 22970f7115
6 changed files with 164 additions and 95 deletions
+47 -24
View File
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Argenta \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-02 22:27+0300\n"
"POT-Creation-Date: 2025-12-08 19:48+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: en\n"
@@ -30,8 +30,9 @@ msgid ""
"набора функций."
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."
"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 ""
@@ -56,8 +57,8 @@ msgid ""
"``title``: Необязательный заголовок для группы команд. Отображается в "
"списке доступных команд, помогая пользователю ориентироваться."
msgstr ""
"``title``: Optional title for the command group. Displayed in the list of "
"available commands to help users navigate."
"``title``: Optional title for the command group. Displayed in the list of"
" available commands to help users navigate."
#: ../../root/api/router.rst:24
msgid ""
@@ -67,11 +68,11 @@ msgid ""
"используется статическая разделительная линия. Подробнее см. в разделе "
":ref:`Переопределение стандартного вывода <root_redirect_stdout>`."
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 <root_redirect_stdout>` "
"for more details."
"``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 "
"<root_redirect_stdout>` for more details."
#: ../../root/api/router.rst:29
msgid "Регистрация команд"
@@ -82,7 +83,8 @@ msgid ""
"Для регистрации команды и привязки к ней обработчика используется "
"декоратор ``@command``."
msgstr ""
"The ``@command`` decorator is used to register a command and bind a handler to it."
"The ``@command`` decorator is used to register a command and bind a "
"handler to it."
#: ../../root/api/router.rst:35
msgid "Декоратор для регистрации функции как обработчика команды."
@@ -98,9 +100,9 @@ msgid ""
"Может быть строкой, которая станет триггером (без возможности настройки "
"флагов и описания)."
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)."
"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 "**Пример использования:**"
@@ -130,12 +132,13 @@ msgstr ""
#: ../../root/api/router.rst:57
msgid ""
"Вы можете добавлять свои команды в этот роутер. Для этого импортируйте "
"``argenta.router.defaults.system_router`` и используйте его декоратор "
"``@command``."
"Вы можете добавлять свои команды в этот роутер. Для этого используйте "
"атрибут ``.system_router`` у созданного экхемпляра ``Orchestrator`` и "
"используйте его декоратор ``@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."
"You can add your own commands to this router. To do this, use the "
"``.system_router`` attribute of the created ``Orchestrator`` instance "
"and use its ``@command`` decorator."
#: ../../root/api/router.rst:62
msgid "Возможные исключения"
@@ -146,15 +149,16 @@ msgid ""
"При регистрации команд и флагов в ``Router`` могут возникнуть следующие "
"исключения:"
msgstr ""
"The following exceptions may occur when registering commands and flags in ``Router``:"
"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."
"Raised if the command trigger in ``Command`` contains spaces. Triggers "
"must be a single word."
#: ../../root/api/router.rst:70
msgid "**Неправильно:** ``Command(\"add user\")``"
@@ -173,7 +177,8 @@ 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
#: ../../root/api/router.rst:78 ../../root/api/router.rst:96
#: ../../root/api/router.rst:115
msgid "**Пример, вызывающий исключение:**"
msgstr "**Example that raises an exception:**"
@@ -182,5 +187,23 @@ msgid ""
"Возникает, если обработчик команды не принимает обязательный аргумент "
"``Response``."
msgstr ""
"Raised if the command handler does not accept the required ``Response`` argument."
"Raised if the command handler does not accept the required ``Response`` "
"argument."
#: ../../root/api/router.rst:94
msgid ""
"Возникает, если при регистрации команд в роутере были использованы "
"дублирующиеся триггеры. Каждая команда должна иметь уникальный триггер в "
"рамках одного роутера."
msgstr ""
"Raised if duplicate triggers were used when registering commands in the "
"router. Each command must have a unique trigger within a single router."
#: ../../root/api/router.rst:113
msgid ""
"Возникает, если при регистрации команд были использованы дублирующиеся "
"алиасы. Алиасы должны быть уникальны в рамках всего роутера."
msgstr ""
"Raised if duplicate aliases were used when registering commands. Aliases "
"must be unique within the entire router."