mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
Update documentation
This commit is contained in:
+3
-3
@@ -24,10 +24,10 @@ Argenta предназначена для создания приложений,
|
||||
**Ключевые особенности:**
|
||||
|
||||
* **Интерактивные сессии**: В отличие от традиционных CLI-инструментов, ``Argenta`` создаёт циклические сессии, позволяя пользователю выполнять команды последовательно, не перезапуская приложение.
|
||||
* **Декларативный синтаксис**: Команды и их обработчики объявляются с помощью простых декораторов, что делает код чистым и интуитивно понятным.
|
||||
* **Нативный DI**: Благодаря интеграции с `dishka <https://dishka.readthedocs.io/en/stable/>`_, вы можете легко внедрять зависимости прямо в обработчики команд, что упрощает их тестирование и переиспользование.
|
||||
* **Декларативный синтаксис**: Команды и их обработчики объявляются с помощью простых декораторов, что делает код интуитивно понятным и позволяет сосредоточиться на том, "что" вы хотите сделать, а не "как".
|
||||
* **Нативный DI**: Благодаря интеграции с [dishka](https://dishka.readthedocs.io/en/stable/), вы можете легко внедрять зависимости прямо в обработчики команд, что упрощает их тестирование, позволяет избежать мутабельных глобалов и многое другое.
|
||||
* **Автоматическая валидация и парсинг**: Библиотека берёт на себя обработку флагов и аргументов командной строки, включая их парсинг, валидацию и преобразование типов.
|
||||
* **Гибкая настройка**: Вы можете легко кастомизировать системные сообщения, форматирование вывода и т.д.
|
||||
* **Гибкая настройка**: Вы можете легко кастомизировать системные сообщения, форматирование вывода, ссоздавать кастомные обработчики нестандартного поведения и т.д.
|
||||
|
||||
-----
|
||||
|
||||
|
||||
@@ -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-04 20:41+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -54,7 +54,9 @@ msgstr "What is it and why?"
|
||||
msgid ""
|
||||
"**Библиотека для построения модульных CLI-приложений с простым и приятным"
|
||||
" API.**"
|
||||
msgstr "**A library for building modular CLI applications with a simple and pleasant API.**"
|
||||
msgstr ""
|
||||
"**A library for building modular CLI applications with a simple and "
|
||||
"pleasant API.**"
|
||||
|
||||
#: ../../index.rst:14
|
||||
msgid ""
|
||||
@@ -64,8 +66,9 @@ msgid ""
|
||||
"предоставляя для этого удобные абстракции."
|
||||
msgstr ""
|
||||
"If you have functionality that you want to provide as a CLI application, "
|
||||
"Argenta will help you with that. The main goal of the library is to enable "
|
||||
"developers to focus on implementing their ideas by providing convenient abstractions."
|
||||
"Argenta will help you with that. The main goal of the library is to "
|
||||
"enable developers to focus on implementing their ideas by providing "
|
||||
"convenient abstractions."
|
||||
|
||||
#: ../../index.rst:17
|
||||
msgid "App example"
|
||||
@@ -74,24 +77,30 @@ msgstr ""
|
||||
#: ../../index.rst:20
|
||||
msgid ""
|
||||
"Argenta предназначена для создания приложений, работающих в собственном "
|
||||
"контексте (scope). Это означает, что при запуске пользователь входит в "
|
||||
"интерактивную сессию, где ему доступна вся реализованная вами "
|
||||
"функциональность."
|
||||
"контексте (scope). Это означает, что приложение запускается один раз и "
|
||||
"создаёт интерактивную сессию, похожую на Python REPL или MySQL консоль. "
|
||||
"При запуске пользователь входит в эту сессию, где ему доступна вся "
|
||||
"реализованная вами функциональность."
|
||||
msgstr ""
|
||||
"Argenta is designed for creating applications that work in their own context "
|
||||
"(scope). This means that when launched, the user enters an interactive session "
|
||||
"where all the functionality you've implemented is available."
|
||||
"Argenta is designed for creating applications that work in their own "
|
||||
"context (scope). This means that the application starts once and creates "
|
||||
"an interactive session, similar to Python REPL or MySQL console. When "
|
||||
"launched, the user enters this session where all the functionality you've "
|
||||
"implemented is available."
|
||||
|
||||
#: ../../index.rst:22
|
||||
msgid ""
|
||||
"Один из ключевых принципов библиотеки — цикличность. После выполнения "
|
||||
"команды пользователь остаётся в интерактивной сессии, в отличие от таких "
|
||||
"библиотек, как ``argparse``, ``click`` и ``typer``. Выход из сессии "
|
||||
"контролируется пользователем."
|
||||
"команды пользователь остаётся в интерактивной сессии и может выполнять "
|
||||
"следующие команды, в отличие от таких библиотек, как ``argparse``, "
|
||||
"``click`` и ``typer``, где приложение завершается после каждой команды. "
|
||||
"Выход из сессии контролируется пользователем."
|
||||
msgstr ""
|
||||
"One of the key principles of the library is cyclicity. After executing a command, "
|
||||
"the user remains in the interactive session, unlike libraries such as ``argparse``, "
|
||||
"``click``, and ``typer``. Exiting the session is controlled by the user."
|
||||
"One of the key principles of the library is cyclicity. After executing a "
|
||||
"command, the user remains in the interactive session and can execute "
|
||||
"subsequent commands, unlike libraries such as ``argparse``, ``click``, "
|
||||
"and ``typer``, where the application terminates after each command. "
|
||||
"Exiting the session is controlled by the user."
|
||||
|
||||
#: ../../index.rst:24
|
||||
msgid "**Ключевые особенности:**"
|
||||
@@ -103,28 +112,32 @@ msgid ""
|
||||
"``Argenta`` создаёт циклические сессии, позволяя пользователю выполнять "
|
||||
"команды последовательно, не перезапуская приложение."
|
||||
msgstr ""
|
||||
"**Interactive sessions**: Unlike traditional CLI tools, ``Argenta`` creates "
|
||||
"cyclical sessions, allowing users to execute commands sequentially without "
|
||||
"restarting the application."
|
||||
"**Interactive sessions**: Unlike traditional CLI tools, ``Argenta`` "
|
||||
"creates cyclical sessions, allowing users to execute commands "
|
||||
"sequentially without restarting the application."
|
||||
|
||||
#: ../../index.rst:27
|
||||
msgid ""
|
||||
"**Декларативный синтаксис**: Команды и их обработчики объявляются с "
|
||||
"помощью простых декораторов, что делает код чистым и интуитивно понятным."
|
||||
"помощью простых декораторов, что делает код интуитивно понятным и "
|
||||
"позволяет сосредоточиться на том, \"что\" вы хотите сделать, а не "
|
||||
"\"как\"."
|
||||
msgstr ""
|
||||
"**Declarative syntax**: Commands and their handlers are declared using simple "
|
||||
"decorators, making the code clean and intuitive."
|
||||
"**Declarative syntax**: Commands and their handlers are declared using "
|
||||
"simple decorators, making the code intuitive and allowing you to focus "
|
||||
"on \"what\" you want to do, not \"how\"."
|
||||
|
||||
#: ../../index.rst:28
|
||||
msgid ""
|
||||
"**Нативный DI**: Благодаря интеграции с `dishka "
|
||||
"<https://dishka.readthedocs.io/en/stable/>`_, вы можете легко внедрять "
|
||||
"зависимости прямо в обработчики команд, что упрощает их тестирование и "
|
||||
"переиспользование."
|
||||
"**Нативный DI**: Благодаря интеграции с "
|
||||
"[dishka](https://dishka.readthedocs.io/en/stable/), вы можете легко "
|
||||
"внедрять зависимости прямо в обработчики команд, что упрощает их "
|
||||
"тестирование, позволяет избежать мутабельных глобалов и многое другое."
|
||||
msgstr ""
|
||||
"**Native DI**: Thanks to integration with `dishka "
|
||||
"<https://dishka.readthedocs.io/en/stable/>`_, you can easily inject "
|
||||
"dependencies directly into command handlers, simplifying their testing and reuse."
|
||||
"dependencies directly into command handlers, simplifying their testing, "
|
||||
"avoiding mutable globals, and much more."
|
||||
|
||||
#: ../../index.rst:29
|
||||
msgid ""
|
||||
@@ -132,16 +145,19 @@ msgid ""
|
||||
"обработку флагов и аргументов командной строки, включая их парсинг, "
|
||||
"валидацию и преобразование типов."
|
||||
msgstr ""
|
||||
"**Automatic validation and parsing**: The library handles command-line flags "
|
||||
"and arguments, including their parsing, validation, and type conversion."
|
||||
"**Automatic validation and parsing**: The library handles command-line "
|
||||
"flags and arguments, including their parsing, validation, and type "
|
||||
"conversion."
|
||||
|
||||
#: ../../index.rst:30
|
||||
msgid ""
|
||||
"**Гибкая настройка**: Вы можете легко кастомизировать системные "
|
||||
"сообщения, форматирование вывода и т.д."
|
||||
"сообщения, форматирование вывода, создавать кастомные обработчики "
|
||||
"нестандартного поведения и т.д."
|
||||
msgstr ""
|
||||
"**Flexible configuration**: You can easily customize system messages, "
|
||||
"output formatting, and more."
|
||||
"output formatting, create custom handlers for non-standard behavior, "
|
||||
"and more."
|
||||
|
||||
#: ../../index.rst:35
|
||||
msgid "Архитектура и жизненный цикл"
|
||||
@@ -152,8 +168,8 @@ msgid ""
|
||||
"Следующая диаграмма иллюстрирует, как компоненты Argenta взаимодействуют "
|
||||
"друг с другом, обрабатывая ввод пользователя."
|
||||
msgstr ""
|
||||
"The following diagram illustrates how Argenta components interact with each "
|
||||
"other while processing user input."
|
||||
"The following diagram illustrates how Argenta components interact with "
|
||||
"each other while processing user input."
|
||||
|
||||
#: ../../index.rst:39
|
||||
msgid "Request Lifecycle Diagram"
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -20,7 +20,7 @@ msgstr ""
|
||||
|
||||
#: ../../root/api/app/index.rst:4
|
||||
msgid "App"
|
||||
msgstr ""
|
||||
msgstr "App"
|
||||
|
||||
#: ../../root/api/app/index.rst:6
|
||||
msgid ""
|
||||
@@ -30,8 +30,9 @@ msgid ""
|
||||
"роутеров, обработчиков и системных сообщений."
|
||||
msgstr ""
|
||||
"The ``App`` object is the core of your console application. It handles "
|
||||
"configuration, lifecycle management, command processing, and user interaction, "
|
||||
"coordinating the work of all components: routers, handlers, and system messages."
|
||||
"configuration, lifecycle management, command processing, and user "
|
||||
"interaction, coordinating the work of all components: routers, handlers, "
|
||||
"and system messages."
|
||||
|
||||
#: ../../root/api/app/index.rst:11
|
||||
msgid "Инициализация"
|
||||
@@ -58,57 +59,65 @@ msgid ""
|
||||
"``exit_command``: Команда, которая маркируется как триггер для выхода из "
|
||||
"приложения."
|
||||
msgstr ""
|
||||
"``exit_command``: Command that is marked as a trigger for exiting the application."
|
||||
"``exit_command``: Command that is marked as a trigger for exiting the "
|
||||
"application."
|
||||
|
||||
#: ../../root/api/app/index.rst:44
|
||||
msgid ""
|
||||
"``system_router_title``: Заголовок для системного роутера (содержит "
|
||||
"команду выхода)."
|
||||
msgstr ""
|
||||
"``system_router_title``: Title for the system router (contains the exit command)."
|
||||
"``system_router_title``: Title for the system router (contains the exit "
|
||||
"command)."
|
||||
|
||||
#: ../../root/api/app/index.rst:45
|
||||
msgid ""
|
||||
"``ignore_command_register``: Если ``True``, регистр вводимых команд "
|
||||
"игнорируется при поиске обработчика."
|
||||
msgstr ""
|
||||
"``ignore_command_register``: If ``True``, command case is ignored when searching for a handler."
|
||||
"``ignore_command_register``: If ``True``, command case is ignored when "
|
||||
"searching for a handler."
|
||||
|
||||
#: ../../root/api/app/index.rst:46
|
||||
msgid ""
|
||||
"``dividing_line``: Тип разделительной линии (``StaticDividingLine`` или "
|
||||
"``DynamicDividingLine``)."
|
||||
msgstr ""
|
||||
"``dividing_line``: Type of dividing line (``StaticDividingLine`` or ``DynamicDividingLine``)."
|
||||
"``dividing_line``: Type of dividing line (``StaticDividingLine`` or "
|
||||
"``DynamicDividingLine``)."
|
||||
|
||||
#: ../../root/api/app/index.rst:47
|
||||
msgid ""
|
||||
"``repeat_command_groups_printing``: Если ``True``, список доступных "
|
||||
"команд выводится перед каждым вводом."
|
||||
msgstr ""
|
||||
"``repeat_command_groups_printing``: If ``True``, the list of available commands is displayed before each input."
|
||||
"``repeat_command_groups_printing``: If ``True``, the list of available "
|
||||
"commands is displayed before each input."
|
||||
|
||||
#: ../../root/api/app/index.rst:48
|
||||
msgid ""
|
||||
"``override_system_messages``: Если ``True``, стандартное форматирование "
|
||||
"(цвета, ASCII-арт) отключается."
|
||||
msgstr ""
|
||||
"``override_system_messages``: If ``True``, standard formatting (colors, ASCII art) is disabled."
|
||||
"``override_system_messages``: If ``True``, standard formatting (colors, "
|
||||
"ASCII art) is disabled."
|
||||
|
||||
#: ../../root/api/app/index.rst:49
|
||||
msgid ""
|
||||
"``autocompleter``: Экземпляр класса :ref:`AutoCompleter "
|
||||
"<root_api_app_autocompleter>`, отвечающий за автодополнение команд."
|
||||
msgstr ""
|
||||
"``autocompleter``: Instance of the :ref:`AutoCompleter <root_api_app_autocompleter>` "
|
||||
"class responsible for command autocompletion."
|
||||
"``autocompleter``: Instance of the :ref:`AutoCompleter "
|
||||
"<root_api_app_autocompleter>` class responsible for command "
|
||||
"autocompletion."
|
||||
|
||||
#: ../../root/api/app/index.rst:50
|
||||
msgid ""
|
||||
"``print_func``: Функция для вывода всех системных сообщений (по умолчанию"
|
||||
" ``rich.Console().print``)."
|
||||
msgstr ""
|
||||
"``print_func``: Function for outputting all system messages (defaults to ``rich.Console().print``)."
|
||||
"``print_func``: Function for outputting all system messages (defaults to "
|
||||
"``rich.Console().print``)."
|
||||
|
||||
#: ../../root/api/app/index.rst:55
|
||||
msgid "Основные методы"
|
||||
@@ -119,7 +128,8 @@ msgid ""
|
||||
"Регистрирует роутер в приложении. Все команды из этого роутера становятся"
|
||||
" доступными для вызова."
|
||||
msgstr ""
|
||||
"Registers a router in the application. All commands from this router become available for invocation."
|
||||
"Registers a router in the application. All commands from this router "
|
||||
"become available for invocation."
|
||||
|
||||
#: ../../root/api/app/index.rst
|
||||
msgid "Parameters"
|
||||
@@ -142,7 +152,8 @@ msgid ""
|
||||
"Добавляет текстовое сообщение, которое выводится при запуске приложения "
|
||||
"после ``initial_message``."
|
||||
msgstr ""
|
||||
"Adds a text message that is displayed when the application starts after ``initial_message``."
|
||||
"Adds a text message that is displayed when the application starts after "
|
||||
"``initial_message``."
|
||||
|
||||
#: ../../root/api/app/index.rst:73
|
||||
msgid "Строка с сообщением."
|
||||
@@ -165,11 +176,12 @@ msgid ""
|
||||
"``App`` позволяет настраивать реакцию на различные события, такие как "
|
||||
"ошибки ввода или неизвестные команды."
|
||||
msgstr ""
|
||||
"``App`` allows you to configure responses to various events, such as input errors or unknown commands."
|
||||
"``App`` allows you to configure responses to various events, such as "
|
||||
"input errors or unknown commands."
|
||||
|
||||
#: ../../root/api/app/index.rst:86
|
||||
msgid ""
|
||||
"Подробнее о исключениях и их обработке в соответствующем :ref:`разделе "
|
||||
"Подробнее об исключениях и их обработке в соответствующем :ref:`разделе "
|
||||
"документации <root_error_handling>`."
|
||||
msgstr ""
|
||||
"For more details on exceptions and their handling, see the corresponding "
|
||||
@@ -181,7 +193,9 @@ msgstr "Sets the template for formatting command descriptions."
|
||||
|
||||
#: ../../root/api/app/index.rst:94
|
||||
msgid "Обработчик принимает триггер команды (``str``) и её описание (``str``)."
|
||||
msgstr "The handler accepts the command trigger (``str``) and its description (``str``)."
|
||||
msgstr ""
|
||||
"The handler accepts the command trigger (``str``) and its description "
|
||||
"(``str``)."
|
||||
|
||||
#: ../../root/api/app/index.rst:100
|
||||
msgid "Устанавливает обработчик при некорректном введённом синтаксисе флагов."
|
||||
@@ -201,7 +215,9 @@ msgstr "Sets the handler for entering an unknown command."
|
||||
|
||||
#: ../../root/api/app/index.rst:118
|
||||
msgid "Обработчик принимает объект ``InputCommand`` - объект введённой команды."
|
||||
msgstr "The handler accepts an ``InputCommand`` object - the entered command object."
|
||||
msgstr ""
|
||||
"The handler accepts an ``InputCommand`` object - the entered command "
|
||||
"object."
|
||||
|
||||
#: ../../root/api/app/index.rst:124
|
||||
msgid "Устанавливает обработчик при вводе пустой строки."
|
||||
@@ -230,12 +246,12 @@ msgid ""
|
||||
"``rich`` и предназначены для вывода стандартной информации, такой как "
|
||||
"подсказки по использованию."
|
||||
msgstr ""
|
||||
"``PredefinedMessages`` is a container containing a set of ready-to-use messages. "
|
||||
"They are formatted using ``rich`` syntax and are intended for displaying standard "
|
||||
"information, such as usage hints."
|
||||
"``PredefinedMessages`` is a container containing a set of ready-to-use "
|
||||
"messages. They are formatted using ``rich`` syntax and are intended for "
|
||||
"displaying standard information, such as usage hints."
|
||||
|
||||
#: ../../root/api/app/index.rst:151
|
||||
msgid "Реккомендуется использовать их при старте приложения."
|
||||
msgid "Рекомендуется использовать их при старте приложения."
|
||||
msgstr "It is recommended to use them when starting the application."
|
||||
|
||||
#: ../../root/api/app/index.rst:178
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -28,13 +28,13 @@ msgid ""
|
||||
"данных, которое существует в рамках одной сессии приложения (от запуска "
|
||||
"до выхода). Она предназначена для обмена данными между обработчиками."
|
||||
msgstr ""
|
||||
"``DataBridge`` is an entity that provides temporary data storage that exists within "
|
||||
"a single application session (from startup to exit). It is designed for data "
|
||||
"exchange between handlers."
|
||||
"``DataBridge`` is an entity that provides temporary data storage that "
|
||||
"exists within a single application session (from startup to exit). It is "
|
||||
"designed for data exchange between handlers."
|
||||
|
||||
#: ../../root/api/bridge.rst:8
|
||||
msgid "Основной способ получения доступа к ``DataBridge`` — через ``di``."
|
||||
msgstr "The main way to access ``DataBridge`` is through ``di``."
|
||||
msgid "Основной способ получения доступа к ``DataBridge`` — через DI."
|
||||
msgstr "The main way to access ``DataBridge`` is through DI."
|
||||
|
||||
#: ../../root/api/bridge.rst:21
|
||||
msgid "**Практический пример: Аутентификация**"
|
||||
@@ -45,8 +45,8 @@ msgid ""
|
||||
"Рассмотрим пример, где команда `login` сохраняет токен аутентификации, а "
|
||||
"команда `get-profile` использует его."
|
||||
msgstr ""
|
||||
"Let's consider an example where the `login` command saves an authentication token, "
|
||||
"and the `get-profile` command uses it."
|
||||
"Let's consider an example where the `login` command saves an "
|
||||
"authentication token, and the `get-profile` command uses it."
|
||||
|
||||
#: ../../root/api/bridge.rst:29
|
||||
msgid "**Как это работает:**"
|
||||
@@ -56,29 +56,32 @@ msgstr "**How it works:**"
|
||||
msgid ""
|
||||
"При вызове обработчика ``dishka`` автоматически внедряет экземпляр "
|
||||
"``DataBridge``."
|
||||
msgstr "When calling a handler, ``dishka`` automatically injects a ``DataBridge`` instance."
|
||||
msgstr ""
|
||||
"When calling a handler, ``dishka`` automatically injects a ``DataBridge``"
|
||||
" instance."
|
||||
|
||||
#: ../../root/api/bridge.rst:32
|
||||
msgid ""
|
||||
"Команда ``login --username <имя>`` вызывает ``login_handler``, который "
|
||||
"через внедрённый ``data_bridge`` сохраняет токен."
|
||||
msgstr ""
|
||||
"The ``login --username <name>`` command calls ``login_handler``, which saves the "
|
||||
"token through the injected ``data_bridge``."
|
||||
"The ``login --username <name>`` command calls ``login_handler``, which "
|
||||
"saves the token through the injected ``data_bridge``."
|
||||
|
||||
#: ../../root/api/bridge.rst:33
|
||||
msgid ""
|
||||
"Команда ``get-profile`` вызывает ``get_profile_handler``, который так же "
|
||||
"получает ``data_bridge`` и извлекает из него токен."
|
||||
msgstr ""
|
||||
"The ``get-profile`` command calls ``get_profile_handler``, which also receives "
|
||||
"``data_bridge`` and extracts the token from it."
|
||||
"The ``get-profile`` command calls ``get_profile_handler``, which also "
|
||||
"receives ``data_bridge`` and extracts the token from it."
|
||||
|
||||
#: ../../root/api/bridge.rst:42
|
||||
msgid ""
|
||||
"Инициализирует хранилище. При использовании через ``di`` вызывается "
|
||||
"Инициализирует хранилище. При использовании через DI вызывается "
|
||||
"автоматически."
|
||||
msgstr "Initializes the storage. When used through ``di``, it is called automatically."
|
||||
msgstr ""
|
||||
"Initializes the storage. When used through DI, it is called automatically."
|
||||
|
||||
#: ../../root/api/bridge.rst:46
|
||||
msgid "Обновляет хранилище данными из словаря."
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -20,7 +20,7 @@ msgstr ""
|
||||
|
||||
#: ../../root/api/command/index.rst:4
|
||||
msgid "Command"
|
||||
msgstr ""
|
||||
msgstr "Command"
|
||||
|
||||
#: ../../root/api/command/index.rst:6
|
||||
msgid ""
|
||||
@@ -28,16 +28,17 @@ msgid ""
|
||||
"команда связывает хэндлер с триггером, введя который он будет вызван для "
|
||||
"обработки."
|
||||
msgstr ""
|
||||
"``Command`` is the basic unit of functionality in an application. Each command "
|
||||
"links a handler to a trigger, which when entered will invoke it for processing."
|
||||
"``Command`` is the basic unit of functionality in an application. Each "
|
||||
"command links a handler to a trigger, which when entered will invoke it "
|
||||
"for processing."
|
||||
|
||||
#: ../../root/api/command/index.rst:8
|
||||
msgid ""
|
||||
"``Command`` инкапсулирует всю информацию о команде: её триггер (ключевое "
|
||||
"слово для вызова), описание, набор флагов и список псевдонимов."
|
||||
msgstr ""
|
||||
"``Command`` encapsulates all information about a command: its trigger (keyword for invocation), "
|
||||
"description, set of flags, and list of aliases."
|
||||
"``Command`` encapsulates all information about a command: its trigger "
|
||||
"(keyword for invocation), description, set of flags, and list of aliases."
|
||||
|
||||
#: ../../root/api/command/index.rst:13
|
||||
msgid "Инициализация"
|
||||
@@ -68,8 +69,8 @@ msgid ""
|
||||
"``flags``: Набор флагов для настройки поведения. Может быть одиночным "
|
||||
"объектом ``Flag`` или коллекцией ``Flags``."
|
||||
msgstr ""
|
||||
"``flags``: Set of flags for configuring behavior. Can be a single ``Flag`` "
|
||||
"object or a ``Flags`` collection."
|
||||
"``flags``: Set of flags for configuring behavior. Can be a single "
|
||||
"``Flag`` object or a ``Flags`` collection."
|
||||
|
||||
#: ../../root/api/command/index.rst:28
|
||||
msgid "``aliases``: Список строковых псевдонимов для основного триггера."
|
||||
@@ -84,14 +85,16 @@ msgid ""
|
||||
"Основной триггер команды. Используется для её идентификации при обработке"
|
||||
" пользовательского ввода."
|
||||
msgstr ""
|
||||
"The main command trigger. Used for its identification when processing user input."
|
||||
"The main command trigger. Used for its identification when processing "
|
||||
"user input."
|
||||
|
||||
#: ../../root/api/command/index.rst:38
|
||||
msgid ""
|
||||
"Текстовое описание команды. Если не передано, используется значение по "
|
||||
"умолчанию."
|
||||
msgstr ""
|
||||
"Text description of the command. If not provided, the default value is used."
|
||||
"Text description of the command. If not provided, the default value is "
|
||||
"used."
|
||||
|
||||
#: ../../root/api/command/index.rst:42
|
||||
msgid ""
|
||||
@@ -99,8 +102,9 @@ msgid ""
|
||||
"передан ``Flag``, то автоматически конвертируется из одиночного в "
|
||||
"коллекцию при инициализации."
|
||||
msgstr ""
|
||||
"A ``Flags`` object containing all registered flags. If a ``Flag`` was passed, "
|
||||
"it is automatically converted from a single flag to a collection during initialization."
|
||||
"A ``Flags`` object containing all registered flags. If a ``Flag`` was "
|
||||
"passed, it is automatically converted from a single flag to a collection "
|
||||
"during initialization."
|
||||
|
||||
#: ../../root/api/command/index.rst:46
|
||||
msgid "Список строковых псевдонимов. Пуст, если псевдонимы не заданы."
|
||||
@@ -113,9 +117,10 @@ msgstr "**Usage example:**"
|
||||
#: ../../root/api/command/index.rst:54
|
||||
msgid ""
|
||||
"Подробнее про флаги: :ref:`Flags <root_api_command_flags>` и :ref:`Флаги "
|
||||
"вводимых команд <root_flags>`."
|
||||
"команд <root_flags>`."
|
||||
msgstr ""
|
||||
"More about flags: :ref:`Flags <root_api_command_flags>` and :ref:`Input command flags <root_flags>`."
|
||||
"More about flags: :ref:`Flags <root_api_command_flags>` and :ref:`Command "
|
||||
"flags <root_flags>`."
|
||||
|
||||
#: ../../root/api/command/index.rst:59
|
||||
msgid "Регистрация команд"
|
||||
@@ -142,8 +147,8 @@ msgid ""
|
||||
"Псевдонимы позволяют вызывать один и тот же обработчик разными "
|
||||
"триггерами, сохраняя флаги и описание команды."
|
||||
msgstr ""
|
||||
"Aliases allow invoking the same handler with different triggers while preserving "
|
||||
"the command's flags and description."
|
||||
"Aliases allow invoking the same handler with different triggers while "
|
||||
"preserving the command's flags and description."
|
||||
|
||||
#: ../../root/api/command/index.rst:80
|
||||
msgid "**Пример с псевдонимами:**"
|
||||
@@ -168,16 +173,18 @@ msgid ""
|
||||
"обработке пользовательского ввода. Прямая работа с ним возможна при "
|
||||
"создании пользовательского обработчика для неизвестных команд."
|
||||
msgstr ""
|
||||
"``InputCommand`` represents a processed command entered by the user. This internal "
|
||||
"class is created automatically when processing user input. Direct work with it is "
|
||||
"possible when creating a custom handler for unknown commands."
|
||||
"``InputCommand`` represents a processed command entered by the user. This"
|
||||
" internal class is created automatically when processing user input. "
|
||||
"Direct work with it is possible when creating a custom handler for "
|
||||
"unknown commands."
|
||||
|
||||
#: ../../root/api/command/index.rst:106
|
||||
msgid ""
|
||||
"Подробнее о пользовательских обработчиках исключений см. :ref:`здесь "
|
||||
"<root_error_handling_unknown_command>`."
|
||||
msgstr ""
|
||||
"For more details on custom exception handlers, see :ref:`here <root_error_handling_unknown_command>`."
|
||||
"For more details on custom exception handlers, see :ref:`here "
|
||||
"<root_error_handling_unknown_command>`."
|
||||
|
||||
#: ../../root/api/command/index.rst:113
|
||||
msgid "Строковый триггер, введённый пользователем."
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -29,9 +29,10 @@ msgid ""
|
||||
"информацию о распознанном флаге: его имя, префикс, значение и статус "
|
||||
"валидации."
|
||||
msgstr ""
|
||||
"The ``InputFlag`` object represents a flag entered by the user. It is created "
|
||||
"as a result of processing user input and contains information about the recognized "
|
||||
"flag: its name, prefix, value, and validation status."
|
||||
"The ``InputFlag`` object represents a flag entered by the user. It is "
|
||||
"created as a result of processing user input and contains information "
|
||||
"about the recognized flag: its name, prefix, value, and validation "
|
||||
"status."
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:10
|
||||
msgid ""
|
||||
@@ -70,8 +71,12 @@ msgid "Префикс флага: ``-``, ``--`` или ``---``."
|
||||
msgstr "Flag prefix: ``-``, ``--``, or ``---``."
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:33
|
||||
msgid "Значение, переданное с флагом. Может быть `None` для флагов без значений."
|
||||
msgstr "Value passed with the flag. Can be `None` for flags without values."
|
||||
msgid ""
|
||||
"Значение, переданное с флагом. Может быть ``''`` (пустой строкой) для "
|
||||
"флагов без значений."
|
||||
msgstr ""
|
||||
"Value passed with the flag. Can be ``''`` (empty string) for flags "
|
||||
"without values."
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:38
|
||||
msgid ""
|
||||
@@ -87,11 +92,13 @@ msgstr "Properties"
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:46
|
||||
msgid "string_entity"
|
||||
msgstr ""
|
||||
msgstr "string_entity"
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:54
|
||||
msgid "Возвращает строковое представление флага в формате ``prefix + name``."
|
||||
msgstr "Returns the string representation of the flag in the format ``prefix + name``."
|
||||
msgstr ""
|
||||
"Returns the string representation of the flag in the format ``prefix + "
|
||||
"name``."
|
||||
|
||||
#: ../../root/api/command/input_flag.rst
|
||||
msgid "return"
|
||||
@@ -107,7 +114,7 @@ msgstr "Magic Methods"
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:64
|
||||
msgid "__str__"
|
||||
msgstr ""
|
||||
msgstr "__str__"
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:71
|
||||
msgid "Возвращает строковое представление флага вместе с его значением."
|
||||
@@ -124,7 +131,7 @@ msgstr "**Usage example:**"
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:84
|
||||
msgid "__repr__"
|
||||
msgstr ""
|
||||
msgstr "__repr__"
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:91
|
||||
msgid "Возвращает отладочное представление объекта."
|
||||
@@ -140,7 +147,7 @@ msgstr ""
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:104
|
||||
msgid "__eq__"
|
||||
msgstr ""
|
||||
msgstr "__eq__"
|
||||
|
||||
#: ../../root/api/command/input_flag.rst:111
|
||||
msgid "Сравнивает два введённых флага на равенство по имени."
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -28,17 +28,17 @@ msgid ""
|
||||
"аргументами командной строки. Его основная задача — предоставить удобный "
|
||||
"интерфейс для доступа к значениям, переданным при запуске приложения."
|
||||
msgstr ""
|
||||
"``ArgSpace`` is a container for storing and managing processed command-line arguments. "
|
||||
"Its main purpose is to provide a convenient interface for accessing values passed at "
|
||||
"application startup."
|
||||
"``ArgSpace`` is a container for storing and managing processed command-"
|
||||
"line arguments. Its main purpose is to provide a convenient interface for"
|
||||
" accessing values passed at application startup."
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:8
|
||||
msgid ""
|
||||
"``ArgSpace`` создаётся автоматически после обработки аргументов с помощью"
|
||||
" ``ArgParser`` и содержит коллекцию объектов ``InputArgument``."
|
||||
msgstr ""
|
||||
"``ArgSpace`` is created automatically after processing arguments using ``ArgParser`` "
|
||||
"and contains a collection of ``InputArgument`` objects."
|
||||
"``ArgSpace`` is created automatically after processing arguments using "
|
||||
"``ArgParser`` and contains a collection of ``InputArgument`` objects."
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:13
|
||||
msgid "Инициализация"
|
||||
@@ -49,8 +49,8 @@ msgid ""
|
||||
"Создание экземпляров класса ``ArgSpace`` происходит под `капотом`, вам не"
|
||||
" нужно создавать их вручную."
|
||||
msgstr ""
|
||||
"Creation of ``ArgSpace`` class instances happens under the hood, you don't need to "
|
||||
"create them manually."
|
||||
"Creation of ``ArgSpace`` class instances happens under the hood, you "
|
||||
"don't need to create them manually."
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:17
|
||||
msgid "**Атрибуты:**"
|
||||
@@ -66,7 +66,7 @@ msgstr "Methods"
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:29
|
||||
msgid "get_by_name"
|
||||
msgstr ""
|
||||
msgstr "get_by_name"
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:36
|
||||
msgid "Возвращает аргумент по имени."
|
||||
@@ -96,7 +96,7 @@ msgstr "**Usage example:**"
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:49
|
||||
msgid "get_by_type"
|
||||
msgstr ""
|
||||
msgstr "get_by_type"
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:56
|
||||
msgid "Возвращает все аргументы определённого типа."
|
||||
@@ -119,8 +119,8 @@ msgid ""
|
||||
"Метод фильтрует ``all_arguments`` по атрибуту ``founder_class`` и "
|
||||
"возвращает аргументы, созданные из указанного типа."
|
||||
msgstr ""
|
||||
"The method filters ``all_arguments`` by the ``founder_class`` attribute and "
|
||||
"returns arguments created from the specified type."
|
||||
"The method filters ``all_arguments`` by the ``founder_class`` attribute "
|
||||
"and returns arguments created from the specified type."
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:71
|
||||
msgid "InputArgument"
|
||||
@@ -144,9 +144,9 @@ msgid ""
|
||||
"запуска приложения. Типичный сценарий включает обработку аргументов через"
|
||||
" ``ArgParser`` и последующее извлечение значений из ``ArgSpace``."
|
||||
msgstr ""
|
||||
"``ArgSpace`` is used to access argument values after the application starts. "
|
||||
"A typical scenario includes processing arguments through ``ArgParser`` and subsequent "
|
||||
"extraction of values from ``ArgSpace``."
|
||||
"``ArgSpace`` is used to access argument values after the application "
|
||||
"starts. A typical scenario includes processing arguments through "
|
||||
"``ArgParser`` and subsequent extraction of values from ``ArgSpace``."
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:83
|
||||
msgid "**Полный пример:**"
|
||||
@@ -154,11 +154,11 @@ msgstr "**Complete example:**"
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:88
|
||||
msgid ""
|
||||
"Доступ к аргументам из обработчиков осуществляется с помощью ``di``. "
|
||||
"Доступ к аргументам из обработчиков осуществляется с помощью DI. "
|
||||
"Подробнее см. :ref:`здесь <root_dependency_injection>`."
|
||||
msgstr ""
|
||||
"Access to arguments from handlers is done using ``di``. "
|
||||
"For more details, see :ref:`here <root_dependency_injection>`."
|
||||
"Access to arguments from handlers is done using DI. For more details, see"
|
||||
" :ref:`here <root_dependency_injection>`."
|
||||
|
||||
#: ../../root/api/orchestrator/argspace.rst:95
|
||||
msgid "**Запуск приложения:**"
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -25,11 +25,12 @@ msgstr "Orchestrator"
|
||||
#: ../../root/api/orchestrator/index.rst:6
|
||||
msgid ""
|
||||
"``Orchestrator`` — это высокоуровневый компонент, который конфигурирует и"
|
||||
" оркестрирует приложение, парсер командной строки, ``di`` и остальные "
|
||||
" оркестрирует приложение, парсер командной строки, DI и остальные "
|
||||
"компоненты, находящиеся по иерархии на уровне с ``App``."
|
||||
msgstr ""
|
||||
"``Orchestrator`` is a high-level component that configures and orchestrates the application, "
|
||||
"command-line parser, ``di``, and other components at the same hierarchical level as ``App``."
|
||||
"``Orchestrator`` is a high-level component that configures and "
|
||||
"orchestrates the application, command-line parser, DI, and other "
|
||||
"components at the same hierarchical level as ``App``."
|
||||
|
||||
#: ../../root/api/orchestrator/index.rst:8
|
||||
msgid ""
|
||||
@@ -37,8 +38,9 @@ msgid ""
|
||||
"команд, маршрутизация), ``Orchestrator`` подготавливает окружение для его"
|
||||
" работы и служит точкой входа в приложение."
|
||||
msgstr ""
|
||||
"While ``App`` is responsible for interactive session logic (command input, routing), "
|
||||
"``Orchestrator`` prepares the environment for its operation and serves as the entry point to the application."
|
||||
"While ``App`` is responsible for interactive session logic (command "
|
||||
"input, routing), ``Orchestrator`` prepares the environment for its "
|
||||
"operation and serves as the entry point to the application."
|
||||
|
||||
#: ../../root/api/orchestrator/index.rst:13
|
||||
msgid "Инициализация"
|
||||
@@ -54,17 +56,19 @@ msgid ""
|
||||
" командной строки при запуске скрипта (не путать с командами в "
|
||||
"интерактивном режиме)."
|
||||
msgstr ""
|
||||
"``arg_parser``: ``ArgParser`` instance responsible for parsing command-line arguments "
|
||||
"at script startup (not to be confused with commands in interactive mode)."
|
||||
"``arg_parser``: ``ArgParser`` instance responsible for parsing command-"
|
||||
"line arguments at script startup (not to be confused with commands in "
|
||||
"interactive mode)."
|
||||
|
||||
#: ../../root/api/orchestrator/index.rst:31
|
||||
msgid ""
|
||||
"``custom_providers``: Список пользовательских провайдеров "
|
||||
"``dishka.Provider`` для добавления ваших сервисов (например, подключений "
|
||||
"к БД или API-клиентов) в DI-контейнер."
|
||||
"к БД или API-клиентов) в di-контейнер."
|
||||
msgstr ""
|
||||
"``custom_providers``: List of custom ``dishka.Provider`` providers for adding your services "
|
||||
"(e.g., database connections or API clients) to the``di``container."
|
||||
"``custom_providers``: List of custom ``dishka.Provider`` providers for "
|
||||
"adding your services (e.g., database connections or API clients) to the "
|
||||
"DI container."
|
||||
|
||||
#: ../../root/api/orchestrator/index.rst:32
|
||||
msgid ""
|
||||
@@ -72,8 +76,9 @@ msgid ""
|
||||
"автоматически внедрит зависимости в обработчики команд, инспектируя их "
|
||||
"сигнатуры."
|
||||
msgstr ""
|
||||
"``auto_inject_handlers``: If **True** (default), ``dishka`` will automatically inject "
|
||||
"dependencies into command handlers by inspecting their signatures."
|
||||
"``auto_inject_handlers``: If **True** (default), ``dishka`` will "
|
||||
"automatically inject dependencies into command handlers by inspecting "
|
||||
"their signatures."
|
||||
|
||||
#: ../../root/api/orchestrator/index.rst:37
|
||||
msgid "Основные методы"
|
||||
@@ -84,7 +89,8 @@ msgid ""
|
||||
"Это главный метод, который запускает приложение. Он запускает бесконечный"
|
||||
" цикл ввода -> вывода."
|
||||
msgstr ""
|
||||
"This is the main method that starts the application. It launches an infinite input -> output loop."
|
||||
"This is the main method that starts the application. It launches an "
|
||||
"infinite input -> output loop."
|
||||
|
||||
#: ../../root/api/orchestrator/index.rst
|
||||
msgid "Parameters"
|
||||
@@ -100,10 +106,11 @@ msgstr "Purpose and Usage"
|
||||
|
||||
#: ../../root/api/orchestrator/index.rst:50
|
||||
msgid ""
|
||||
"``Orchestrator`` абстрагирует сложность, связанную с настройкой ``di`` и "
|
||||
"``Orchestrator`` абстрагирует сложность, связанную с настройкой DI и "
|
||||
"парсингом стартовых аргументов."
|
||||
msgstr ""
|
||||
"``Orchestrator`` abstracts the complexity associated with setting up ``di`` and parsing startup arguments."
|
||||
"``Orchestrator`` abstracts the complexity associated with setting up DI "
|
||||
"and parsing startup arguments."
|
||||
|
||||
#: ../../root/api/orchestrator/index.rst:52
|
||||
msgid ""
|
||||
@@ -111,8 +118,9 @@ msgid ""
|
||||
"интерактивной сессии, а ``Orchestrator`` — за подготовку окружения и "
|
||||
"запуск приложения."
|
||||
msgstr ""
|
||||
"This approach separates responsibilities: ``App`` is responsible for interactive session logic, "
|
||||
"while ``Orchestrator`` handles environment preparation and application launch."
|
||||
"This approach separates responsibilities: ``App`` is responsible for "
|
||||
"interactive session logic, while ``Orchestrator`` handles environment "
|
||||
"preparation and application launch."
|
||||
|
||||
#: ../../root/api/orchestrator/index.rst:54
|
||||
msgid "**Пример использования:**"
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -29,22 +29,24 @@ msgid ""
|
||||
" и расширяемый код. Вместо того чтобы обработчики сами создавали нужные "
|
||||
"им объекты (зависимости), они получают их извне."
|
||||
msgstr ""
|
||||
"Dependency Injection (DI) is a design pattern that helps write loosely coupled, "
|
||||
"easily testable, and extensible code. Instead of handlers creating the objects "
|
||||
"(dependencies) they need themselves, they receive them from outside."
|
||||
"Dependency Injection (DI) is a design pattern that helps write loosely "
|
||||
"coupled, easily testable, and extensible code. Instead of handlers "
|
||||
"creating the objects (dependencies) they need themselves, they receive "
|
||||
"them from outside."
|
||||
|
||||
#: ../../root/dependency_injection.rst:8
|
||||
msgid ""
|
||||
"``Argenta`` использует библиотеку ``dishka`` для реализации DI, что "
|
||||
"позволяет декларативно объявлять зависимости прямо в сигнатурах ваших "
|
||||
"обработчиков. Подробнее о **DI**, **IoC** и API для создания провайдеров "
|
||||
"можно прочитать в `официальной документации dishka "
|
||||
"обработчиков. Подробнее о DI, IoC и API для создания провайдеров можно "
|
||||
"прочитать в `официальной документации dishka "
|
||||
"<https://dishka.readthedocs.io/en/stable/di_intro.html>`_."
|
||||
msgstr ""
|
||||
"``Argenta`` uses the ``dishka`` library to implement DI, which allows you to "
|
||||
"declaratively declare dependencies directly in your handler signatures. You can "
|
||||
"read more about **DI**, **IoC**, and the API for creating providers in the "
|
||||
"`official dishka documentation <https://dishka.readthedocs.io/en/stable/di_intro.html>`_."
|
||||
"``Argenta`` uses the ``dishka`` library to implement DI, which allows you"
|
||||
" to declaratively declare dependencies directly in your handler "
|
||||
"signatures. You can read more about DI, IoC, and the API for "
|
||||
"creating providers in the `official dishka documentation "
|
||||
"<https://dishka.readthedocs.io/en/stable/di_intro.html>`_."
|
||||
|
||||
#: ../../root/dependency_injection.rst:14
|
||||
msgid "Основная идея"
|
||||
@@ -56,22 +58,22 @@ msgid ""
|
||||
"данных. Вместо импорта и инициализации соединения внутри функции, вы "
|
||||
"просто объявляете его как аргумент с аннотацией типа:"
|
||||
msgstr ""
|
||||
"Imagine your handler needs access to a database to work. Instead of importing and "
|
||||
"initializing the connection inside the function, you simply declare it as an "
|
||||
"argument with a type annotation:"
|
||||
"Imagine your handler needs access to a database to work. Instead of "
|
||||
"importing and initializing the connection inside the function, you simply"
|
||||
" declare it as an argument with a type annotation:"
|
||||
|
||||
#: ../../root/dependency_injection.rst:19
|
||||
msgid ""
|
||||
"``argenta.di.FromDishka`` является алиасом для ``dishka.FromDishka``, и "
|
||||
"они полностью взаимозаменяемы."
|
||||
msgstr ""
|
||||
"``argenta.di.FromDishka`` is an alias for ``dishka.FromDishka``, and they are "
|
||||
"fully interchangeable."
|
||||
"``argenta.di.FromDishka`` is an alias for ``dishka.FromDishka``, and they"
|
||||
" are fully interchangeable."
|
||||
|
||||
#: ../../root/dependency_injection.rst:21
|
||||
#: ../../root/dependency_injection.rst:29
|
||||
#: ../../root/dependency_injection.rst:37
|
||||
#: ../../root/dependency_injection.rst:60
|
||||
#: ../../root/dependency_injection.rst:40
|
||||
#: ../../root/dependency_injection.rst:63
|
||||
msgid "**Пример использования:**"
|
||||
msgstr "**Usage example:**"
|
||||
|
||||
@@ -81,76 +83,93 @@ msgid ""
|
||||
"``Connection`` и внедрит её. Но прежде чем использовать зависимость, её "
|
||||
"необходимо объявить в провайдере:"
|
||||
msgstr ""
|
||||
"``Argenta`` with ``dishka`` will resolve the dependency by type ``Connection`` and "
|
||||
"inject it. But before using the dependency, it must be declared in a provider:"
|
||||
"``Argenta`` with ``dishka`` will resolve the dependency by type "
|
||||
"``Connection`` and inject it. But before using the dependency, it must be"
|
||||
" declared in a provider:"
|
||||
|
||||
#: ../../root/dependency_injection.rst:35
|
||||
msgid "После создания провайдера его необходимо зарегистрировать в оркестраторе:"
|
||||
msgstr "After creating the provider, it must be registered in the orchestrator:"
|
||||
msgid "После создания провайдера его необходимо зарегистрировать в оркестраторе."
|
||||
msgstr "After creating the provider, it must be registered in the orchestrator."
|
||||
|
||||
#: ../../root/dependency_injection.rst:46
|
||||
#: ../../root/dependency_injection.rst:38
|
||||
msgid ""
|
||||
"Провайдеры регистрируются в ``Orchestrator``, а не в ``App``, так как "
|
||||
"оркестратор отвечает за настройку DI-контейнера на уровне всего "
|
||||
"приложения. Вы можете передать список из нескольких провайдеров через "
|
||||
"параметр ``custom_providers``."
|
||||
msgstr ""
|
||||
"Providers are registered in ``Orchestrator``, not in ``App``, because "
|
||||
"the orchestrator is responsible for configuring the DI container at the "
|
||||
"application level. You can pass a list of multiple providers through the "
|
||||
"``custom_providers`` parameter."
|
||||
|
||||
#: ../../root/dependency_injection.rst:49
|
||||
msgid "Как это работает?"
|
||||
msgstr "How Does It Work?"
|
||||
|
||||
#: ../../root/dependency_injection.rst:48
|
||||
msgid "В основе``di``в Argenta лежат **провайдеры** и **контейнер**."
|
||||
msgstr "DI in Argenta is based on **providers** and a **container**."
|
||||
#: ../../root/dependency_injection.rst:51
|
||||
msgid "В основе DI в Argenta лежат **провайдеры** и **контейнер**."
|
||||
msgstr "At the core of DI in Argenta are **providers** and a **container**."
|
||||
|
||||
#: ../../root/dependency_injection.rst:50
|
||||
#: ../../root/dependency_injection.rst:53
|
||||
msgid ""
|
||||
"**Провайдер (Provider)** — это \"рецепт\", который объясняет, как "
|
||||
"создавать и настраивать ту или иную зависимость (например, подключение к "
|
||||
"БД, API-клиент или любой другой сервис)."
|
||||
msgstr ""
|
||||
"**Provider (Provider)** is a \"recipe\" that explains how to create and "
|
||||
"configure a particular dependency (for example, a database connection, API client, "
|
||||
"or any other service)."
|
||||
"configure a particular dependency (for example, a database connection, "
|
||||
"API client, or any other service)."
|
||||
|
||||
#: ../../root/dependency_injection.rst:51
|
||||
#: ../../root/dependency_injection.rst:54
|
||||
msgid ""
|
||||
"**Контейнер (IoC Container)** — это \"фабрика\", которая хранит все "
|
||||
"рецепты (провайдеры) и по запросу создаёт и выдаёт готовые зависимости."
|
||||
msgstr ""
|
||||
"**Container (IoC Container)** is a \"factory\" that stores all recipes (providers) "
|
||||
"and creates and provides ready dependencies on request."
|
||||
"**Container (IoC Container)** is a \"factory\" that stores all recipes "
|
||||
"(providers) and creates and provides ready dependencies on request."
|
||||
|
||||
#: ../../root/dependency_injection.rst:56
|
||||
#: ../../root/dependency_injection.rst:59
|
||||
msgid "Встроенные провайдеры"
|
||||
msgstr "Built-in Providers"
|
||||
|
||||
#: ../../root/dependency_injection.rst:58
|
||||
#: ../../root/dependency_injection.rst:61
|
||||
msgid ""
|
||||
"``Argenta`` поставляется со встроенным провайдером, который даёт доступ к"
|
||||
" важным системным зависимостям без дополнительной настройки. Например, вы"
|
||||
" можете получить объект ``ArgSpace``, который содержит аргументы "
|
||||
"командной строки, переданные при запуске приложения."
|
||||
" можете получить объект :ref:`ArgSpace <root_api_orchestrator_argspace>`,"
|
||||
" который содержит аргументы командной строки, переданные при запуске "
|
||||
"приложения."
|
||||
msgstr ""
|
||||
"``Argenta`` comes with a built-in provider that gives access to important system "
|
||||
"dependencies without additional configuration. For example, you can get the "
|
||||
"``ArgSpace`` object, which contains the command-line arguments passed when the "
|
||||
"application was launched."
|
||||
"``Argenta`` comes with a built-in provider that gives access to important"
|
||||
" system dependencies without additional configuration. For example, you "
|
||||
"can get the :ref:`ArgSpace <root_api_orchestrator_argspace>` object, "
|
||||
"which contains the command-line arguments passed when the application was "
|
||||
"launched."
|
||||
|
||||
#: ../../root/dependency_injection.rst:69
|
||||
#: ../../root/dependency_injection.rst:72
|
||||
msgid "Обмен данными между обработчиками"
|
||||
msgstr "Data Exchange Between Handlers"
|
||||
|
||||
#: ../../root/dependency_injection.rst:71
|
||||
#: ../../root/dependency_injection.rst:74
|
||||
msgid ""
|
||||
"Помимо DI, обработчики могут обмениваться данными в рамках сессии через "
|
||||
"**объект контекста**. В ``Argenta`` эту роль выполняет объект "
|
||||
"``DataBridge``."
|
||||
msgstr ""
|
||||
"In addition to DI, handlers can exchange data within a session through a **context "
|
||||
"object**. In ``Argenta``, this role is performed by the ``DataBridge`` object."
|
||||
"In addition to DI, handlers can exchange data within a session through a "
|
||||
"**context object**. In ``Argenta``, this role is performed by the "
|
||||
"``DataBridge`` object."
|
||||
|
||||
#: ../../root/dependency_injection.rst:73
|
||||
#: ../../root/dependency_injection.rst:76
|
||||
msgid ""
|
||||
"Каждый обработчик может записывать в него данные, а также читать, "
|
||||
"обновлять и удалять их."
|
||||
msgstr ""
|
||||
"Each handler can write data to it, as well as read, update, and delete data."
|
||||
"Each handler can write data to it, as well as read, update, and delete "
|
||||
"data."
|
||||
|
||||
#: ../../root/dependency_injection.rst:76
|
||||
#: ../../root/dependency_injection.rst:79
|
||||
msgid "Подробнее об этом можно прочитать в разделе :ref:`root_api_bridge`."
|
||||
msgstr "You can read more about this in the :ref:`root_api_bridge` section."
|
||||
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -27,7 +27,8 @@ msgid ""
|
||||
"Флаги — это специальные параметры, которые пользователь может добавлять к"
|
||||
" командам для управления их поведением."
|
||||
msgstr ""
|
||||
"Flags are special parameters that users can add to commands to control their behavior."
|
||||
"Flags are special parameters that users can add to commands to control "
|
||||
"their behavior."
|
||||
|
||||
#: ../../root/flags.rst:9
|
||||
msgid "Зачем нужны флаги в командах"
|
||||
@@ -45,10 +46,10 @@ msgid ""
|
||||
"режимы по требованию пользователя, оставляя основную функциональность "
|
||||
"неизменной."
|
||||
msgstr ""
|
||||
"The main purpose of flags is to provide a way to change the command's logic without "
|
||||
"reworking it. A command can operate in several modes: standard, verbose, debug, or "
|
||||
"simplified. Flags switch these modes on user demand, keeping the core functionality "
|
||||
"unchanged."
|
||||
"The main purpose of flags is to provide a way to change the command's "
|
||||
"logic without reworking it. A command can operate in several modes: "
|
||||
"standard, verbose, debug, or simplified. Flags switch these modes on user"
|
||||
" demand, keeping the core functionality unchanged."
|
||||
|
||||
#: ../../root/flags.rst:17
|
||||
msgid "Опциональность и удобство"
|
||||
@@ -61,9 +62,10 @@ msgid ""
|
||||
" же позволяют задать значения только необходимые в конкретной ситуации, "
|
||||
"остальные используют значения по умолчанию."
|
||||
msgstr ""
|
||||
"Flags solve the problem of mandatory parameters. If all command parameters are made "
|
||||
"required, it makes the command difficult to use. Flags allow you to specify only "
|
||||
"the values needed in a specific situation, while others use default values."
|
||||
"Flags solve the problem of mandatory parameters. If all command "
|
||||
"parameters are made required, it makes the command difficult to use. "
|
||||
"Flags allow you to specify only the values needed in a specific "
|
||||
"situation, while others use default values."
|
||||
|
||||
#: ../../root/flags.rst:22
|
||||
msgid "Когда могут понадобиться флаги"
|
||||
@@ -79,8 +81,9 @@ msgid ""
|
||||
"фактического развёртывания (dry-run) для проверки. Флаг ``--dry-run`` "
|
||||
"переключит режим работы."
|
||||
msgstr ""
|
||||
"A command deploys an application normally, but a mode without actual deployment "
|
||||
"(dry-run) is needed for verification. The ``--dry-run`` flag will switch the mode."
|
||||
"A command deploys an application normally, but a mode without actual "
|
||||
"deployment (dry-run) is needed for verification. The ``--dry-run`` flag "
|
||||
"will switch the mode."
|
||||
|
||||
#: ../../root/flags.rst:27
|
||||
msgid "**Настройка уровня детальности**"
|
||||
@@ -92,8 +95,9 @@ msgid ""
|
||||
" команды. Флаги ``--verbose`` или ``--debug`` предоставляют подробный "
|
||||
"вывод."
|
||||
msgstr ""
|
||||
"When debugging or analyzing, more information about the command execution process "
|
||||
"is required. The ``--verbose`` or ``--debug`` flags provide detailed output."
|
||||
"When debugging or analyzing, more information about the command execution"
|
||||
" process is required. The ``--verbose`` or ``--debug`` flags provide "
|
||||
"detailed output."
|
||||
|
||||
#: ../../root/flags.rst:30
|
||||
msgid "**Управление поведением при ошибках**"
|
||||
@@ -104,8 +108,8 @@ msgid ""
|
||||
"По умолчанию команда может прерваться при первой ошибке. Флаг ``--force``"
|
||||
" позволит продолжить работу, пропуская некритичные ошибки."
|
||||
msgstr ""
|
||||
"By default, a command may abort on the first error. The ``--force`` flag allows "
|
||||
"continuing execution, skipping non-critical errors."
|
||||
"By default, a command may abort on the first error. The ``--force`` flag "
|
||||
"allows continuing execution, skipping non-critical errors."
|
||||
|
||||
#: ../../root/flags.rst:33
|
||||
msgid "**Форматирование вывода**"
|
||||
@@ -116,8 +120,8 @@ msgid ""
|
||||
"Команда выводит данные текстом, но в некоторых сценариях нужен JSON или "
|
||||
"CSV. Флаг ``--format=json`` переключит формат вывода."
|
||||
msgstr ""
|
||||
"A command outputs data as text, but in some scenarios JSON or CSV is needed. The "
|
||||
"``--format=json`` flag will switch the output format."
|
||||
"A command outputs data as text, but in some scenarios JSON or CSV is "
|
||||
"needed. The ``--format=json`` flag will switch the output format."
|
||||
|
||||
#: ../../root/flags.rst:36
|
||||
msgid "**Комбинирование опций**"
|
||||
@@ -128,8 +132,8 @@ msgid ""
|
||||
"Часто нужна комбинация нескольких изменений: подробный вывод, dry-run "
|
||||
"режим и JSON формат. Несколько флагов решают эту задачу одновременно."
|
||||
msgstr ""
|
||||
"Often a combination of several changes is needed: verbose output, dry-run mode, and "
|
||||
"JSON format. Multiple flags solve this task simultaneously."
|
||||
"Often a combination of several changes is needed: verbose output, dry-run"
|
||||
" mode, and JSON format. Multiple flags solve this task simultaneously."
|
||||
|
||||
#: ../../root/flags.rst:40
|
||||
msgid "Практическое значение"
|
||||
@@ -142,9 +146,10 @@ msgid ""
|
||||
"необходимости. Это особенно важно при автоматизации задач в скриптах, где"
|
||||
" гибкость интерфейса критична."
|
||||
msgstr ""
|
||||
"Flags make commands more predictable and controllable. Users can start with simple "
|
||||
"usage and then add flags as needed. This is especially important when automating "
|
||||
"tasks in scripts, where interface flexibility is critical."
|
||||
"Flags make commands more predictable and controllable. Users can start "
|
||||
"with simple usage and then add flags as needed. This is especially "
|
||||
"important when automating tasks in scripts, where interface flexibility "
|
||||
"is critical."
|
||||
|
||||
#: ../../root/flags.rst:44
|
||||
msgid ""
|
||||
@@ -152,9 +157,9 @@ msgid ""
|
||||
"дополнительное поведение достигается без изменения структуры команды, а "
|
||||
"только через передачу опциональных параметров."
|
||||
msgstr ""
|
||||
"Flags also facilitate command integration into various systems, as additional "
|
||||
"behavior is achieved without changing the command structure, only through passing "
|
||||
"optional parameters."
|
||||
"Flags also facilitate command integration into various systems, as "
|
||||
"additional behavior is achieved without changing the command structure, "
|
||||
"only through passing optional parameters."
|
||||
|
||||
#: ../../root/flags.rst:49
|
||||
msgid "Синтаксис флагов"
|
||||
@@ -169,24 +174,75 @@ msgid ""
|
||||
"Флаг состоит из префикса (``-``, ``--`` или ``---``), имени и, "
|
||||
"опционально, значения, которое указывается через пробел."
|
||||
msgstr ""
|
||||
"A flag consists of a prefix (``-``, ``--``, or ``---``), a name, and optionally a "
|
||||
"value, which is specified with a space."
|
||||
"A flag consists of a prefix (``-``, ``--``, or ``---``), a name, and "
|
||||
"optionally a value, which is specified with a space."
|
||||
|
||||
#: ../../root/flags.rst:62
|
||||
#: ../../root/flags.rst:59
|
||||
msgid "**Примеры:**"
|
||||
msgstr "**Examples:**"
|
||||
|
||||
#: ../../root/flags.rst:70
|
||||
msgid "Работа с флагами в обработчиках"
|
||||
msgstr "Working with Flags in Handlers"
|
||||
|
||||
#: ../../root/flags.rst:72
|
||||
msgid ""
|
||||
"Чтобы получить значение флага в обработчике, используйте объект "
|
||||
"``response.input_flags`` типа :ref:`InputFlags "
|
||||
"<root_api_command_input_flags>`."
|
||||
msgstr ""
|
||||
"To get the flag value in a handler, use the ``response.input_flags`` "
|
||||
"object of type :ref:`InputFlags <root_api_command_input_flags>`."
|
||||
|
||||
#: ../../root/flags.rst:74
|
||||
msgid "**Пример с флагом, имеющим значение:**"
|
||||
msgstr "**Example with a flag that has a value:**"
|
||||
|
||||
#: ../../root/flags.rst:80
|
||||
msgid "**Пример с флагом-переключателем:**"
|
||||
msgstr "**Example with a toggle flag:**"
|
||||
|
||||
#: ../../root/flags.rst:87
|
||||
msgid ""
|
||||
"Подробнее о работе с объектом ``InputFlags`` см. в разделе "
|
||||
":ref:`InputFlags <root_api_command_input_flags>`."
|
||||
msgstr ""
|
||||
"For more details on working with the ``InputFlags`` object, see the "
|
||||
":ref:`InputFlags <root_api_command_input_flags>` section."
|
||||
|
||||
#: ../../root/flags.rst:92
|
||||
msgid "Два типа флагов"
|
||||
msgstr "Two Types of Flags"
|
||||
|
||||
#: ../../root/flags.rst:64
|
||||
msgid ""
|
||||
"Флаги бывают двух основных видов: без значений (переключатели) и со "
|
||||
"значениями. ``Argenta`` позволяет регистрировать и вводить флаги обоих "
|
||||
"типов в любой последовательности для одной команды."
|
||||
msgstr ""
|
||||
"Flags come in two main types: without values (switches) and with values. "
|
||||
"``Argenta`` allows registering and entering flags of both types in any sequence "
|
||||
"for a single command."
|
||||
#: ../../root/flags.rst:94
|
||||
msgid "Флаги бывают двух основных видов:"
|
||||
msgstr "Flags come in two main types:"
|
||||
|
||||
#: ../../root/flags.rst:67
|
||||
#: ../../root/flags.rst:96
|
||||
msgid ""
|
||||
"**Флаги со значениями** — принимают параметр после имени флага (например,"
|
||||
" ``--name John``, ``--port 8080``)"
|
||||
msgstr ""
|
||||
"**Flags with values** — accept a parameter after the flag name (for "
|
||||
"example, ``--name John``, ``--port 8080``)"
|
||||
|
||||
#: ../../root/flags.rst:97
|
||||
msgid ""
|
||||
"**Флаги-переключатели** — не принимают значения, их наличие само по себе "
|
||||
"является сигналом (например, ``--verbose``, ``--force``)"
|
||||
msgstr ""
|
||||
"**Toggle flags** — do not accept values, their presence itself is a "
|
||||
"signal (for example, ``--verbose``, ``--force``)"
|
||||
|
||||
#: ../../root/flags.rst:99
|
||||
msgid ""
|
||||
"``Argenta`` позволяет регистрировать и вводить флаги обоих типов в любой "
|
||||
"последовательности для одной команды."
|
||||
msgstr ""
|
||||
"``Argenta`` allows registering and entering flags of both types in any "
|
||||
"sequence for a single command."
|
||||
|
||||
#: ../../root/flags.rst:102
|
||||
msgid ""
|
||||
"Ошибки валидации не выбрасывают исключений. Вместо этого у каждого "
|
||||
"объекта :ref:`InputFlag <root_api_command_input_flag>` есть атрибут "
|
||||
@@ -195,47 +251,44 @@ msgid ""
|
||||
" <root_api_command_flag>`."
|
||||
msgstr ""
|
||||
"Validation errors do not throw exceptions. Instead, each :ref:`InputFlag "
|
||||
"<root_api_command_input_flag>` object has a ``status`` attribute that can be used "
|
||||
"to determine if validation was successful. A detailed description of the API for "
|
||||
"creating flags is in the :ref:`Flag <root_api_command_flag>` section."
|
||||
"<root_api_command_input_flag>` object has a ``status`` attribute that can"
|
||||
" be used to determine if validation was successful. A detailed "
|
||||
"description of the API for creating flags is in the :ref:`Flag "
|
||||
"<root_api_command_flag>` section."
|
||||
|
||||
#: ../../root/flags.rst:69
|
||||
#: ../../root/flags.rst:104
|
||||
msgid ""
|
||||
"При регистрации флага можно задать правила валидации для его значения. По"
|
||||
" умолчанию любое значение считается корректным. Валидацию можно настроить"
|
||||
" несколькими способами:"
|
||||
msgstr ""
|
||||
"When registering a flag, you can set validation rules for its value. By default, "
|
||||
"any value is considered valid. Validation can be configured in several ways:"
|
||||
"When registering a flag, you can set validation rules for its value. By "
|
||||
"default, any value is considered valid. Validation can be configured in "
|
||||
"several ways:"
|
||||
|
||||
#: ../../root/flags.rst:74
|
||||
#: ../../root/flags.rst:109
|
||||
msgid "Флаги против аргументов"
|
||||
msgstr "Flags vs Arguments"
|
||||
|
||||
#: ../../root/flags.rst:76
|
||||
#: ../../root/flags.rst:111
|
||||
msgid ""
|
||||
"В контексте Argenta флаги и аргументы относятся к разным уровням "
|
||||
"взаимодействия с приложением и имеют принципиально разные сферы действия."
|
||||
"взаимодействия с приложением."
|
||||
msgstr ""
|
||||
"In the context of Argenta, flags and arguments belong to different levels of "
|
||||
"interaction with the application and have fundamentally different scopes."
|
||||
"In the context of Argenta, flags and arguments belong to different levels"
|
||||
" of interaction with the application."
|
||||
|
||||
#: ../../root/flags.rst:79
|
||||
msgid "Определение и назначение"
|
||||
msgstr "Definition and Purpose"
|
||||
|
||||
#: ../../root/flags.rst:81
|
||||
#: ../../root/flags.rst:113
|
||||
msgid ""
|
||||
"**Аргументы** — это параметры, передаваемые при запуске приложения один "
|
||||
"раз при инициализации. Они определяют глобальное состояние и конфигурацию"
|
||||
" приложения на протяжении всей его работы, например адрес базы данных, "
|
||||
"уровень логирования или режим работы."
|
||||
"**Аргументы** — это параметры, передаваемые при запуске приложения. Они "
|
||||
"определяют глобальную конфигурацию на протяжении всей его работы "
|
||||
"(например, адрес базы данных, уровень логирования)."
|
||||
msgstr ""
|
||||
"**Arguments** are parameters passed when launching the application once during "
|
||||
"initialization. They define the global state and configuration of the application "
|
||||
"throughout its operation, such as database address, logging level, or operation mode."
|
||||
"**Arguments** are parameters passed when launching the application. They "
|
||||
"define the global configuration throughout its operation (for example, "
|
||||
"database address, logging level)."
|
||||
|
||||
#: ../../root/flags.rst:83
|
||||
#: ../../root/flags.rst:115
|
||||
msgid ""
|
||||
"API и более подробное описание в разделах :ref:`ArgParser "
|
||||
"<root_api_orchestrator_argparser>` и :ref:`Arguments "
|
||||
@@ -245,123 +298,143 @@ msgstr ""
|
||||
"<root_api_orchestrator_argparser>` and :ref:`Arguments "
|
||||
"<root_api_orchestrator_arguments>` sections."
|
||||
|
||||
#: ../../root/flags.rst:85
|
||||
#: ../../root/flags.rst:117
|
||||
msgid ""
|
||||
"**Флаги** — это параметры командных операций, доступные в рамках "
|
||||
"интерактивной сессии при вводе каждой новой команды. Они позволяют "
|
||||
"модифицировать поведение конкретной команды без перезагрузки приложения."
|
||||
msgstr ""
|
||||
"**Flags** are command operation parameters available within an interactive session "
|
||||
"when entering each new command. They allow modifying the behavior of a specific "
|
||||
"command without restarting the application."
|
||||
"**Flags** are command operation parameters available within an "
|
||||
"interactive session when entering each new command. They allow modifying "
|
||||
"the behavior of a specific command without restarting the application."
|
||||
|
||||
#: ../../root/flags.rst:87
|
||||
#: ../../root/flags.rst:119
|
||||
msgid ""
|
||||
"API и более подробное описание в разделе :ref:`Flag "
|
||||
"<root_api_command_flag>`."
|
||||
msgstr "API and more detailed description in the :ref:`Flag <root_api_command_flag>` section."
|
||||
msgstr ""
|
||||
"API and more detailed description in the :ref:`Flag "
|
||||
"<root_api_command_flag>` section."
|
||||
|
||||
#: ../../root/flags.rst:92
|
||||
#: ../../root/flags.rst:124
|
||||
msgid "Ключевые различия"
|
||||
msgstr "Key Differences"
|
||||
|
||||
#: ../../root/flags.rst:94
|
||||
msgid "**Время жизни и область действия**"
|
||||
msgstr "**Lifetime and Scope**"
|
||||
#: ../../root/flags.rst:126
|
||||
msgid "**Время жизни**"
|
||||
msgstr "**Lifetime**"
|
||||
|
||||
#: ../../root/flags.rst:95
|
||||
#: ../../root/flags.rst:127
|
||||
msgid ""
|
||||
"Аргументы передаются один раз при запуске приложения и сохраняют действие"
|
||||
" на весь период работы (скоуп **APP**). Флаги наоборот локальны и живут в"
|
||||
" рамках скоупа **REQUEST**."
|
||||
"Аргументы передаются один раз при запуске и действуют на весь период "
|
||||
"работы приложения. Флаги локальны и существуют только в рамках выполнения"
|
||||
" команды."
|
||||
msgstr ""
|
||||
"Arguments are passed once when launching the application and remain in effect for "
|
||||
"the entire operation period (scope **APP**). Flags, on the contrary, are local and "
|
||||
"live within the **REQUEST** scope."
|
||||
"Arguments are passed once at startup and remain in effect for the entire "
|
||||
"application runtime. Flags are local and exist only within the execution "
|
||||
"of a command."
|
||||
|
||||
#: ../../root/flags.rst:97
|
||||
msgid "**Частота изменения**"
|
||||
msgstr "**Change Frequency**"
|
||||
#: ../../root/flags.rst:129
|
||||
msgid "**Изменяемость**"
|
||||
msgstr "**Mutability**"
|
||||
|
||||
#: ../../root/flags.rst:98
|
||||
#: ../../root/flags.rst:130
|
||||
msgid ""
|
||||
"Для изменения аргументов необходимо перезапустить приложение. Флаги можно"
|
||||
" менять между каждым вводом команды без остановки приложения."
|
||||
" менять при каждом вводе команды."
|
||||
msgstr ""
|
||||
"To change arguments, the application must be restarted. Flags can be changed "
|
||||
"between each command input without stopping the application."
|
||||
"To change arguments, the application must be restarted. Flags can be "
|
||||
"changed with each command input."
|
||||
|
||||
#: ../../root/flags.rst:100
|
||||
msgid "**Уровень конфигурации**"
|
||||
msgstr "**Configuration Level**"
|
||||
#: ../../root/flags.rst:132
|
||||
msgid "**Назначение**"
|
||||
msgstr "**Purpose**"
|
||||
|
||||
#: ../../root/flags.rst:101
|
||||
#: ../../root/flags.rst:133
|
||||
msgid ""
|
||||
"Аргументы управляют глобальной конфигурацией приложения и его окружением."
|
||||
" Флаги управляют поведением отдельных команд и операций пользователя."
|
||||
"Аргументы управляют глобальной конфигурацией приложения. Флаги управляют "
|
||||
"поведением отдельных команд."
|
||||
msgstr ""
|
||||
"Arguments control the global configuration of the application and its environment. "
|
||||
"Flags control the behavior of individual commands and user operations."
|
||||
"Arguments control the global configuration of the application. Flags "
|
||||
"control the behavior of individual commands."
|
||||
|
||||
#: ../../root/flags.rst:103
|
||||
msgid "**Использование**"
|
||||
msgstr "**Usage**"
|
||||
#: ../../root/flags.rst:138
|
||||
msgid "Практические примеры"
|
||||
msgstr "Practical Examples"
|
||||
|
||||
#: ../../root/flags.rst:104
|
||||
msgid ""
|
||||
"Аргументы задают начальное состояние системы: что подключить, как "
|
||||
"работать. Флаги управляют тактикой выполнения команд: как её выполнить, с"
|
||||
" какими изменениями."
|
||||
msgstr ""
|
||||
"Arguments set the initial state of the system: what to connect, how to operate. "
|
||||
"Flags control the tactics of command execution: how to execute it, with what changes."
|
||||
#: ../../root/flags.rst:140
|
||||
msgid "Аргументы при запуске приложения:"
|
||||
msgstr "Arguments at application startup:"
|
||||
|
||||
#: ../../root/flags.rst:109
|
||||
msgid "Практические примеры в Argenta"
|
||||
msgstr "Practical Examples in Argenta"
|
||||
|
||||
#: ../../root/flags.rst:111
|
||||
msgid "При запуске приложения Argenta передаются аргументы:"
|
||||
msgstr "When launching an Argenta application, arguments are passed:"
|
||||
|
||||
#: ../../root/flags.rst:113
|
||||
#: ../../root/flags.rst:142
|
||||
msgid "Адрес подключения к базе данных"
|
||||
msgstr "Database connection address"
|
||||
|
||||
#: ../../root/flags.rst:114
|
||||
#: ../../root/flags.rst:143
|
||||
msgid "Режим работы (production, development, testing)"
|
||||
msgstr "Operation mode (production, development, testing)"
|
||||
|
||||
#: ../../root/flags.rst:115
|
||||
#: ../../root/flags.rst:144
|
||||
msgid "Уровень логирования"
|
||||
msgstr "Logging level"
|
||||
|
||||
#: ../../root/flags.rst:116
|
||||
msgid "Путь к конфигурационным файлам"
|
||||
msgstr "Path to configuration files"
|
||||
#: ../../root/flags.rst:146
|
||||
msgid "Флаги в интерактивной сессии:"
|
||||
msgstr "Flags in an interactive session:"
|
||||
|
||||
#: ../../root/flags.rst:118
|
||||
msgid "В интерактивной сессии для каждой команды указываются флаги:"
|
||||
msgstr "In an interactive session, flags are specified for each command:"
|
||||
#: ../../root/flags.rst:148
|
||||
msgid "``deploy --verbose --dry-run`` — для команды развёртывания"
|
||||
msgstr "``deploy --verbose --dry-run`` — for the deployment command"
|
||||
|
||||
#: ../../root/flags.rst:120
|
||||
msgid "``deploy --verbose --dry-run`` — для текущей команды развёртывания"
|
||||
msgstr "``deploy --verbose --dry-run`` — for the current deployment command"
|
||||
|
||||
#: ../../root/flags.rst:121
|
||||
#: ../../root/flags.rst:149
|
||||
msgid "``backup --compress --encrypted`` — для команды резервного копирования"
|
||||
msgstr "``backup --compress --encrypted`` — for the backup command"
|
||||
|
||||
#: ../../root/flags.rst:122
|
||||
#: ../../root/flags.rst:150
|
||||
msgid "``test --parallel --coverage`` — для команды тестирования"
|
||||
msgstr "``test --parallel --coverage`` — for the testing command"
|
||||
|
||||
#: ../../root/flags.rst:124
|
||||
msgid ""
|
||||
"Один пользователь может выполнить разные команды с разными флагами в "
|
||||
"одной сессии приложения, без необходимости перезапуска с новыми "
|
||||
"аргументами."
|
||||
msgstr ""
|
||||
"A single user can execute different commands with different flags in one application "
|
||||
"session, without needing to restart with new arguments."
|
||||
#~ msgid "Определение и назначение"
|
||||
#~ msgstr "Definition and Purpose"
|
||||
|
||||
#~ msgid "**Частота изменения**"
|
||||
#~ msgstr "**Change Frequency**"
|
||||
|
||||
#~ msgid "**Уровень конфигурации**"
|
||||
#~ msgstr "**Configuration Level**"
|
||||
|
||||
#~ msgid "**Использование**"
|
||||
#~ msgstr "**Usage**"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Аргументы задают начальное состояние системы:"
|
||||
#~ " что подключить, как работать. Флаги "
|
||||
#~ "управляют тактикой выполнения команд: как "
|
||||
#~ "её выполнить, с какими изменениями."
|
||||
#~ msgstr ""
|
||||
#~ "Arguments set the initial state of "
|
||||
#~ "the system: what to connect, how "
|
||||
#~ "to operate. Flags control the tactics"
|
||||
#~ " of command execution: how to execute"
|
||||
#~ " it, with what changes."
|
||||
|
||||
#~ msgid "При запуске приложения Argenta передаются аргументы:"
|
||||
#~ msgstr "When launching an Argenta application, arguments are passed:"
|
||||
|
||||
#~ msgid "Путь к конфигурационным файлам"
|
||||
#~ msgstr "Path to configuration files"
|
||||
|
||||
#~ msgid "В интерактивной сессии для каждой команды указываются флаги:"
|
||||
#~ msgstr "In an interactive session, flags are specified for each command:"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Один пользователь может выполнить разные "
|
||||
#~ "команды с разными флагами в одной "
|
||||
#~ "сессии приложения, без необходимости "
|
||||
#~ "перезапуска с новыми аргументами."
|
||||
#~ msgstr ""
|
||||
#~ "A single user can execute different "
|
||||
#~ "commands with different flags in one "
|
||||
#~ "application session, without needing to "
|
||||
#~ "restart with new arguments."
|
||||
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -29,9 +29,10 @@ msgid ""
|
||||
"создавать таблицы, подсвечивать синтаксис и многое другое, что улучшает "
|
||||
"визуальное восприятие информации."
|
||||
msgstr ""
|
||||
"By default, ``Argenta`` uses the ``rich`` library for text output with enhanced "
|
||||
"formatting. It allows applying colors and styles, creating tables, highlighting "
|
||||
"syntax, and much more, which improves the visual perception of information."
|
||||
"By default, ``Argenta`` uses the ``rich`` library for text output with "
|
||||
"enhanced formatting. It allows applying colors and styles, creating "
|
||||
"tables, highlighting syntax, and much more, which improves the visual "
|
||||
"perception of information."
|
||||
|
||||
#: ../../root/overriding_formatting.rst:11
|
||||
msgid "Управление стандартным форматированием"
|
||||
@@ -43,16 +44,17 @@ msgid ""
|
||||
"``override_system_messages: bool`` (по умолчанию ``False``), который "
|
||||
"позволяет отключать стандартное форматирование."
|
||||
msgstr ""
|
||||
"When creating an ``App`` instance, you can use the ``override_system_messages: "
|
||||
"bool`` parameter (default ``False``), which allows disabling standard formatting."
|
||||
"When creating an ``App`` instance, you can use the "
|
||||
"``override_system_messages: bool`` parameter (default ``False``), which "
|
||||
"allows disabling standard formatting."
|
||||
|
||||
#: ../../root/overriding_formatting.rst:15
|
||||
msgid ""
|
||||
"Если установить его в ``True``, стилизация текста и ASCII-арт будут "
|
||||
"Если установить его в ``True``, стилизация текста и ASCII-графика будут "
|
||||
"отключены, а системные сообщения — выводиться в «сыром» виде."
|
||||
msgstr ""
|
||||
"If set to ``True``, text styling and ASCII art will be disabled, and system "
|
||||
"messages will be output in \"raw\" form."
|
||||
"If set to ``True``, text styling and ASCII graphics will be disabled, and"
|
||||
" system messages will be output in \"raw\" form."
|
||||
|
||||
#: ../../root/overriding_formatting.rst:20
|
||||
msgid "Приветственное и прощальное сообщения"
|
||||
@@ -63,8 +65,8 @@ msgid ""
|
||||
"Приветственное (``initial_message``) и прощальное (``farewell_message``) "
|
||||
"сообщения по умолчанию выводятся в виде ASCII-графики."
|
||||
msgstr ""
|
||||
"Welcome (``initial_message``) and farewell (``farewell_message``) messages are "
|
||||
"displayed as ASCII art by default."
|
||||
"Welcome (``initial_message``) and farewell (``farewell_message``) "
|
||||
"messages are displayed as ASCII art by default."
|
||||
|
||||
#: ../../root/overriding_formatting.rst:25
|
||||
msgid ""
|
||||
@@ -75,11 +77,11 @@ msgid ""
|
||||
"``override_system_messages=True`` или использовать только латинские "
|
||||
"символы."
|
||||
msgstr ""
|
||||
"The ``art`` library is designed to work with ASCII characters and **does not "
|
||||
"support Cyrillic**. This leads to distortion of Russian and other Cyrillic "
|
||||
"alphabet characters. If your message contains Cyrillic, it is recommended to "
|
||||
"disable formatting using ``override_system_messages=True`` or use only Latin "
|
||||
"characters."
|
||||
"The ``art`` library is designed to work with ASCII characters and **does "
|
||||
"not support Cyrillic**. This leads to distortion of Russian and other "
|
||||
"Cyrillic alphabet characters. If your message contains Cyrillic, it is "
|
||||
"recommended to disable formatting using ``override_system_messages=True``"
|
||||
" or use only Latin characters."
|
||||
|
||||
#: ../../root/overriding_formatting.rst:30
|
||||
msgid "Кастомизация вывода"
|
||||
@@ -90,8 +92,8 @@ msgid ""
|
||||
"Для полной замены логики вывода текста в конструкторе ``App`` "
|
||||
"предусмотрен параметр ``print_func``."
|
||||
msgstr ""
|
||||
"For complete replacement of text output logic, the ``App`` constructor provides "
|
||||
"the ``print_func`` parameter."
|
||||
"For complete replacement of text output logic, the ``App`` constructor "
|
||||
"provides the ``print_func`` parameter."
|
||||
|
||||
#: ../../root/overriding_formatting.rst:34
|
||||
msgid ""
|
||||
@@ -101,10 +103,11 @@ msgid ""
|
||||
"``rich.console.Console().print``. Вы можете передать сюда свою функцию, "
|
||||
"чтобы, например, логировать вывод в файл или отправлять его по сети."
|
||||
msgstr ""
|
||||
"**print_func**: ``Callable[[str], None]`` This parameter allows passing any "
|
||||
"callable entity (for example, a function) that will be used to output all system "
|
||||
"messages. By default, this is ``rich.console.Console().print``. You can pass your "
|
||||
"own function here to, for example, log output to a file or send it over the network."
|
||||
"**print_func**: ``Callable[[str], None]`` This parameter allows passing "
|
||||
"any callable entity (for example, a function) that will be used to output"
|
||||
" all system messages. By default, this is "
|
||||
"``rich.console.Console().print``. You can pass your own function here to,"
|
||||
" for example, log output to a file or send it over the network."
|
||||
|
||||
#: ../../root/overriding_formatting.rst:38
|
||||
msgid ""
|
||||
@@ -113,7 +116,8 @@ msgid ""
|
||||
"выводиться в сыром виде, в этом случае рекомендуется переопределить "
|
||||
"стандартное форматирование с помощью ``override_system_messages=True``."
|
||||
msgstr ""
|
||||
"When overriding the output function, you should ensure it supports ``rich`` markup, "
|
||||
"otherwise system messages will be output in raw form. In this case, it is "
|
||||
"recommended to override standard formatting using ``override_system_messages=True``."
|
||||
"When overriding the output function, you should ensure it supports "
|
||||
"``rich`` markup, otherwise system messages will be output in raw form. In"
|
||||
" this case, it is recommended to override standard formatting using "
|
||||
"``override_system_messages=True``."
|
||||
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -27,28 +27,30 @@ msgid ""
|
||||
"В этом руководстве мы рассмотрим два примера создания CLI-приложения с "
|
||||
"помощью Argenta:"
|
||||
msgstr ""
|
||||
"In this guide, we will look at two examples of creating a CLI application with Argenta:"
|
||||
"In this guide, we will look at two examples of creating a CLI application"
|
||||
" with Argenta:"
|
||||
|
||||
#: ../../root/quickstart.rst:8
|
||||
msgid ""
|
||||
"**Простой пример**: Минимальное приложение, быстрое знакомство с "
|
||||
"**Простой пример**: минимальное приложение для быстрого знакомства с "
|
||||
"основными компонентами."
|
||||
msgstr ""
|
||||
"**Simple example**: A minimal application, quick introduction to the main components."
|
||||
"**Simple example**: a minimal application for quick introduction to the "
|
||||
"main components."
|
||||
|
||||
#: ../../root/quickstart.rst:9
|
||||
msgid ""
|
||||
"**Более сложный пример**: Полнофункциональное приложение «Менеджер задач»"
|
||||
"**Более сложный пример**: полнофункциональное приложение «Менеджер задач»"
|
||||
" с внедрением зависимостей и бизнес-логикой."
|
||||
msgstr ""
|
||||
"**More complex example**: A full-featured \"Task Manager\" application with "
|
||||
"dependency injection and business logic."
|
||||
"**More complex example**: a full-featured \"Task Manager\" application "
|
||||
"with dependency injection and business logic."
|
||||
|
||||
#: ../../root/quickstart.rst:12
|
||||
msgid "Простой пример"
|
||||
msgstr "Simple Example"
|
||||
|
||||
#: ../../root/quickstart.rst:14 ../../root/quickstart.rst:38
|
||||
#: ../../root/quickstart.rst:14 ../../root/quickstart.rst:74
|
||||
msgid "**Установка**"
|
||||
msgstr "**Installation**"
|
||||
|
||||
@@ -58,81 +60,123 @@ msgid ""
|
||||
"запуска приложения. Вы можете скопировать этот код, запустить его и сразу"
|
||||
" увидеть результат."
|
||||
msgstr ""
|
||||
"This example demonstrates the absolute minimum required to create and run an "
|
||||
"application. You can copy this code, run it, and immediately see the result."
|
||||
"This example demonstrates the absolute minimum required to create and run"
|
||||
" an application. You can copy this code, run it, and immediately see the "
|
||||
"result."
|
||||
|
||||
#: ../../root/quickstart.rst:26 ../../root/quickstart.rst:76
|
||||
#: ../../root/quickstart.rst:26
|
||||
msgid "**Запуск**"
|
||||
msgstr "**Running**"
|
||||
|
||||
#: ../../root/quickstart.rst:28
|
||||
msgid "Сохраните код в файл (например, ``main.py``) и запустите:"
|
||||
msgstr "Save the code to a file (for example, ``main.py``) and run:"
|
||||
|
||||
#: ../../root/quickstart.rst:34 ../../root/quickstart.rst:112
|
||||
msgid "**Результат**"
|
||||
msgstr "**Result**"
|
||||
|
||||
#: ../../root/quickstart.rst:28
|
||||
msgid "Simple App Example"
|
||||
msgstr ""
|
||||
|
||||
#: ../../root/quickstart.rst:34
|
||||
msgid "Более сложный пример: Менеджер задач"
|
||||
msgstr "More Complex Example: Task Manager"
|
||||
|
||||
#: ../../root/quickstart.rst:36
|
||||
msgid ""
|
||||
"В этом руководстве мы создадим простое, но полнофункциональное "
|
||||
"CLI-приложение «Менеджер задач», которое продемонстрирует ключевые "
|
||||
"возможности Argenta."
|
||||
msgstr ""
|
||||
"In this guide, we will create a simple but full-featured CLI application \"Task "
|
||||
"Manager\" that will demonstrate the key features of Argenta."
|
||||
msgid "Simple App Example"
|
||||
msgstr "Simple App Example"
|
||||
|
||||
#: ../../root/quickstart.rst:42
|
||||
msgid "Промежуточный пример: Калькулятор с флагами"
|
||||
msgstr "Intermediate Example: Calculator with Flags"
|
||||
|
||||
#: ../../root/quickstart.rst:44
|
||||
msgid ""
|
||||
"Прежде чем перейти к сложному примеру с DI, рассмотрим промежуточный "
|
||||
"вариант — калькулятор, который использует флаги для управления "
|
||||
"поведением."
|
||||
msgstr ""
|
||||
"Before moving to a complex example with DI, let's consider an "
|
||||
"intermediate option — a calculator that uses flags to control behavior."
|
||||
|
||||
#: ../../root/quickstart.rst:50
|
||||
msgid "**Запуск:**"
|
||||
msgstr "**Running:**"
|
||||
|
||||
#: ../../root/quickstart.rst:52
|
||||
msgid "Сохраните код в файл ``calculator.py`` и запустите:"
|
||||
msgstr "Save the code to a file ``calculator.py`` and run:"
|
||||
|
||||
#: ../../root/quickstart.rst:58
|
||||
msgid "**Использование:**"
|
||||
msgstr "**Usage:**"
|
||||
|
||||
#: ../../root/quickstart.rst:65
|
||||
msgid ""
|
||||
"Этот пример показывает, как работать с флагами без использования DI. "
|
||||
"Теперь перейдём к более сложному примеру."
|
||||
msgstr ""
|
||||
"This example shows how to work with flags without using DI. Now let's "
|
||||
"move on to a more complex example."
|
||||
|
||||
#: ../../root/quickstart.rst:70
|
||||
msgid "Сложный пример: Менеджер задач с DI"
|
||||
msgstr "Complex Example: Task Manager with DI"
|
||||
|
||||
#: ../../root/quickstart.rst:72
|
||||
msgid ""
|
||||
"В этом руководстве мы создадим полнофункциональное CLI-приложение "
|
||||
"«Менеджер задач», которое продемонстрирует работу с внедрением "
|
||||
"зависимостей."
|
||||
msgstr ""
|
||||
"In this guide, we will create a full-featured CLI application \"Task "
|
||||
"Manager\" that will demonstrate working with dependency injection."
|
||||
|
||||
#: ../../root/quickstart.rst:80
|
||||
msgid "**Определение моделей данных и репозитория**"
|
||||
msgstr "**Defining Data Models and Repository**"
|
||||
|
||||
#: ../../root/quickstart.rst:46
|
||||
#: ../../root/quickstart.rst:82
|
||||
msgid "Сначала определим модели данных для задачи и репозиторий для их хранения."
|
||||
msgstr "First, let's define data models for tasks and a repository to store them."
|
||||
|
||||
#: ../../root/quickstart.rst:52
|
||||
#: ../../root/quickstart.rst:88
|
||||
msgid "**Создание провайдера для DI**"
|
||||
msgstr "**Creating a Provider for DI**"
|
||||
|
||||
#: ../../root/quickstart.rst:54
|
||||
#: ../../root/quickstart.rst:90
|
||||
msgid ""
|
||||
"Чтобы Argenta могла внедрять ``TaskRepository`` в наши обработчики, мы "
|
||||
"создадим провайдер для ``dishka``."
|
||||
msgstr ""
|
||||
"To allow Argenta to inject ``TaskRepository`` into our handlers, we will create a "
|
||||
"provider for ``dishka``."
|
||||
"To allow Argenta to inject ``TaskRepository`` into our handlers, we will "
|
||||
"create a provider for ``dishka``."
|
||||
|
||||
#: ../../root/quickstart.rst:60
|
||||
#: ../../root/quickstart.rst:96
|
||||
msgid "**Создание обработчиков команд**"
|
||||
msgstr "**Creating Command Handlers**"
|
||||
|
||||
#: ../../root/quickstart.rst:62
|
||||
#: ../../root/quickstart.rst:98
|
||||
msgid ""
|
||||
"Теперь создадим обработчики для команд ``add-task`` и ``list-tasks``. "
|
||||
"Обратите внимание, как мы используем флаги и внедряем ``TaskRepository``."
|
||||
msgstr ""
|
||||
"Now let's create handlers for the ``add-task`` and ``list-tasks`` commands. Notice "
|
||||
"how we use flags and inject ``TaskRepository``."
|
||||
"Now let's create handlers for the ``add-task`` and ``list-tasks`` "
|
||||
"commands. Notice how we use flags and inject ``TaskRepository``."
|
||||
|
||||
#: ../../root/quickstart.rst:68
|
||||
#: ../../root/quickstart.rst:104
|
||||
msgid "**Сборка и запуск приложения**"
|
||||
msgstr "**Building and Running the Application**"
|
||||
|
||||
#: ../../root/quickstart.rst:70
|
||||
#: ../../root/quickstart.rst:106
|
||||
msgid ""
|
||||
"Наконец, соберем все вместе: создадим экземпляр ``App``, подключим роутер"
|
||||
" и провайдер, а затем запустим приложение."
|
||||
msgstr ""
|
||||
"Finally, let's put it all together: create an ``App`` instance, connect the router "
|
||||
"and provider, and then run the application."
|
||||
"Finally, let's put it all together: create an ``App`` instance, connect "
|
||||
"the router and provider, and then run the application."
|
||||
|
||||
#: ../../root/quickstart.rst:78
|
||||
#: ../../root/quickstart.rst:114
|
||||
msgid ""
|
||||
"Теперь вы можете запустить ``main.py`` и взаимодействовать с вашим новым "
|
||||
"CLI-приложением."
|
||||
msgstr "Now you can run ``main.py`` and interact with your new CLI application."
|
||||
|
||||
#: ../../root/quickstart.rst:80
|
||||
#: ../../root/quickstart.rst:116
|
||||
msgid "Task Manager Example"
|
||||
msgstr ""
|
||||
msgstr "Task Manager Example"
|
||||
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -29,15 +29,46 @@ msgid ""
|
||||
"перехвата стандартного потока вывода (``stdout``), что накладывает "
|
||||
"некоторые особенности."
|
||||
msgstr ""
|
||||
"``Argenta`` provides flexible mechanisms for output formatting, including dynamic "
|
||||
"dividing lines. This is achieved by intercepting the standard output stream "
|
||||
"(``stdout``), which imposes certain specifics."
|
||||
"``Argenta`` provides flexible mechanisms for output formatting, including"
|
||||
" dynamic dividing lines. This is achieved by intercepting the standard "
|
||||
"output stream (``stdout``), which imposes certain specifics."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:11
|
||||
msgid "Когда нужно отключать перехват stdout"
|
||||
msgstr "When to Disable stdout Interception"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:13
|
||||
msgid ""
|
||||
"Отключайте перехват ``stdout`` (``disable_redirect_stdout=True`` в "
|
||||
"``Router``), если ваши команды:"
|
||||
msgstr ""
|
||||
"Disable ``stdout`` interception (``disable_redirect_stdout=True`` in "
|
||||
"``Router``) if your commands:"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:15
|
||||
msgid ""
|
||||
"✓ Используют ``input()`` для интерактивного ввода данных от пользователя "
|
||||
"✓ Используют прогресс-бары (``tqdm``, ``rich.progress``) ✓ Выводят данные"
|
||||
" в реальном времени (streaming, логи) ✓ Используют библиотеки, которые "
|
||||
"напрямую работают с ``stdout``"
|
||||
msgstr ""
|
||||
"✓ Use ``input()`` for interactive user input ✓ Use progress bars "
|
||||
"(``tqdm``, ``rich.progress``) ✓ Output data in real-time (streaming, "
|
||||
"logs) ✓ Use libraries that work directly with ``stdout``"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:20
|
||||
msgid ""
|
||||
"Для обычных команд с ``print()`` перехват можно оставить включённым — это"
|
||||
" не влияет на их работу."
|
||||
msgstr ""
|
||||
"For regular commands with ``print()``, interception can be left enabled —"
|
||||
" it does not affect their operation."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:25
|
||||
msgid "Механизм перехвата ``stdout``"
|
||||
msgstr "``stdout`` Interception Mechanism"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:13
|
||||
#: ../../root/redirect_stdout.rst:27
|
||||
msgid ""
|
||||
"По умолчанию ``Argenta`` перехватывает весь текст, выводимый в ``stdout``"
|
||||
" внутри обработчика команды. Это необходимо для реализации **динамических"
|
||||
@@ -46,145 +77,151 @@ msgid ""
|
||||
"создаёт аккуратный интерфейс, где вывод команды «обёрнут» в рамку, "
|
||||
"подогнанную под его содержимое."
|
||||
msgstr ""
|
||||
"By default, ``Argenta`` intercepts all text output to ``stdout`` inside a command "
|
||||
"handler. This is necessary to implement **dynamic dividers**: the system analyzes "
|
||||
"the output, finds the longest line, and uses it to draw the top and bottom borders. "
|
||||
"This approach creates a neat interface where the command output is \"wrapped\" in a "
|
||||
"frame fitted to its content."
|
||||
"By default, ``Argenta`` intercepts all text output to ``stdout`` inside a"
|
||||
" command handler. This is necessary to implement **dynamic dividers**: "
|
||||
"the system analyzes the output, finds the longest line, and uses it to "
|
||||
"draw the top and bottom borders. This approach creates a neat interface "
|
||||
"where the command output is \"wrapped\" in a frame fitted to its content."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:15
|
||||
#: ../../root/redirect_stdout.rst:29
|
||||
msgid "Пример приложения с динамической разделительной линией:"
|
||||
msgstr "Example of an application with a dynamic dividing line:"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:17
|
||||
#: ../../root/redirect_stdout.rst:31
|
||||
msgid "Example of an application with a dynamic dividing line"
|
||||
msgstr ""
|
||||
msgstr "Example of an application with a dynamic dividing line"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:20
|
||||
#: ../../root/redirect_stdout.rst:34
|
||||
msgid ""
|
||||
"Как вы можете заметить разделительная линия ровно той же длины, что и "
|
||||
"Как вы можете заметить, разделительная линия ровно той же длины, что и "
|
||||
"самая длинная строка в выводе."
|
||||
msgstr ""
|
||||
"As you can notice, the dividing line is exactly the same length as the longest line "
|
||||
"in the output."
|
||||
"As you can see, the dividing line is exactly the same length as the "
|
||||
"longest line in the output."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:22
|
||||
#: ../../root/redirect_stdout.rst:36
|
||||
msgid "То же приложение с статической линией:"
|
||||
msgstr "The same application with a static line:"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:24
|
||||
#: ../../root/redirect_stdout.rst:38
|
||||
msgid "Example of an application with a static dividing line"
|
||||
msgstr ""
|
||||
msgstr "Example of an application with a static dividing line"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:27
|
||||
#: ../../root/redirect_stdout.rst:41
|
||||
msgid ""
|
||||
"В этом примере разделительная линия имеет фиксированную длину (по "
|
||||
"умолчанию 25 символов)."
|
||||
msgstr "In this example, the dividing line has a fixed length (25 characters by default)."
|
||||
msgstr ""
|
||||
"In this example, the dividing line has a fixed length (25 characters by "
|
||||
"default)."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:32
|
||||
#: ../../root/redirect_stdout.rst:46
|
||||
msgid "Побочные эффекты перехвата ``stdout``"
|
||||
msgstr "Side Effects of ``stdout`` Interception"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:34
|
||||
#: ../../root/redirect_stdout.rst:48
|
||||
msgid ""
|
||||
"Побочный эффект этого механизма проявляется при использовании функций, "
|
||||
"которые последовательно выводят текст в консоль и ожидают ввод от "
|
||||
"пользователя. Классический пример — стандартная функция ``input()``."
|
||||
msgstr ""
|
||||
"A side effect of this mechanism manifests when using functions that sequentially "
|
||||
"output text to the console and expect user input. A classic example is the standard "
|
||||
"``input()`` function."
|
||||
"A side effect of this mechanism manifests when using functions that "
|
||||
"sequentially output text to the console and expect user input. A classic "
|
||||
"example is the standard ``input()`` function."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:44
|
||||
#: ../../root/redirect_stdout.rst:57
|
||||
msgid ""
|
||||
"При включённом перехвате ``stdout`` текст (например, ``\"Введите ваше "
|
||||
"имя: \"``) **не будет выведен в консоль немедленно**. Он попадёт в буфер "
|
||||
"и отобразится лишь после завершения работы обработчика вместе с остальным"
|
||||
" выводом. Это может сбить пользователя с толку."
|
||||
msgstr ""
|
||||
"With ``stdout`` interception enabled, text (for example, ``\"Enter your name: \"``) "
|
||||
"**will not be output to the console immediately**. It will go into a buffer and "
|
||||
"appear only after the handler finishes, along with the rest of the output. This can "
|
||||
"confuse the user."
|
||||
"With ``stdout`` interception enabled, text (for example, ``\"Enter your "
|
||||
"name: \"``) **will not be output to the console immediately**. It will go"
|
||||
" into a buffer and appear only after the handler finishes, along with the"
|
||||
" rest of the output. This can confuse the user."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:49
|
||||
#: ../../root/redirect_stdout.rst:62
|
||||
msgid "Отключение перехвата ``stdout`` с помощью ``disable_redirect_stdout``"
|
||||
msgstr "Disabling ``stdout`` Interception with ``disable_redirect_stdout``"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:51
|
||||
#: ../../root/redirect_stdout.rst:64
|
||||
msgid ""
|
||||
"Чтобы решить эту проблему, в конструкторе ``Router`` предусмотрен "
|
||||
"специальный аргумент:"
|
||||
msgstr "To solve this problem, the ``Router`` constructor provides a special argument:"
|
||||
msgstr ""
|
||||
"To solve this problem, the ``Router`` constructor provides a special "
|
||||
"argument:"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:53
|
||||
#: ../../root/redirect_stdout.rst:66
|
||||
msgid "**disable_redirect_stdout** (``bool``, по умолчанию ``False``)"
|
||||
msgstr "**disable_redirect_stdout** (``bool``, default ``False``)"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:55
|
||||
#: ../../root/redirect_stdout.rst:68
|
||||
msgid ""
|
||||
"Если при создании роутера установить ``disable_redirect_stdout=True``, "
|
||||
"механизм перехвата ``stdout`` будет отключён для всех его обработчиков."
|
||||
msgstr ""
|
||||
"If you set ``disable_redirect_stdout=True`` when creating a router, the ``stdout`` "
|
||||
"interception mechanism will be disabled for all its handlers."
|
||||
"If you set ``disable_redirect_stdout=True`` when creating a router, the "
|
||||
"``stdout`` interception mechanism will be disabled for all its handlers."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:57 ../../root/redirect_stdout.rst:87
|
||||
#: ../../root/redirect_stdout.rst:70 ../../root/redirect_stdout.rst:100
|
||||
msgid "**Пример использования:**"
|
||||
msgstr "**Usage example:**"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:63
|
||||
#: ../../root/redirect_stdout.rst:76
|
||||
msgid ""
|
||||
"В этом случае ``input()`` будет работать как обычно, и пользователь сразу"
|
||||
" увидит приглашение к вводу."
|
||||
msgstr ""
|
||||
"In this case, ``input()`` will work as usual, and the user will immediately see the "
|
||||
"input prompt."
|
||||
"In this case, ``input()`` will work as usual, and the user will "
|
||||
"immediately see the input prompt."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:68
|
||||
#: ../../root/redirect_stdout.rst:81
|
||||
msgid "Типы разделительных линий"
|
||||
msgstr "Types of Dividing Lines"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:70
|
||||
#: ../../root/redirect_stdout.rst:83
|
||||
msgid ""
|
||||
"``Argenta`` поддерживает два типа разделителей, которые настраиваются при"
|
||||
" инициализации ``App``:"
|
||||
msgstr ""
|
||||
"``Argenta`` supports two types of dividers, which are configured during ``App`` "
|
||||
"initialization:"
|
||||
"``Argenta`` supports two types of dividers, which are configured during "
|
||||
"``App`` initialization:"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:72
|
||||
#: ../../root/redirect_stdout.rst:85
|
||||
msgid "**``DynamicDividingLine()``**"
|
||||
msgstr ""
|
||||
msgstr "**``DynamicDividingLine()``**"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:73
|
||||
#: ../../root/redirect_stdout.rst:86
|
||||
msgid ""
|
||||
"Поведение по умолчанию. Длина линии динамически подстраивается под самый "
|
||||
"длинный текст в выводе."
|
||||
msgstr ""
|
||||
"Default behavior. The line length dynamically adjusts to the longest text in the output."
|
||||
"Default behavior. The line length dynamically adjusts to the longest text"
|
||||
" in the output."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:74
|
||||
#: ../../root/redirect_stdout.rst:87
|
||||
msgid ""
|
||||
"Требует включённого перехвата ``stdout`` "
|
||||
"(``disable_redirect_stdout=False`` в роутере)."
|
||||
msgstr ""
|
||||
"Requires enabled ``stdout`` interception (``disable_redirect_stdout=False`` in the router)."
|
||||
"Requires enabled ``stdout`` interception "
|
||||
"(``disable_redirect_stdout=False`` in the router)."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:76
|
||||
#: ../../root/redirect_stdout.rst:89
|
||||
msgid "**``StaticDividingLine(length: int = 25)``**"
|
||||
msgstr ""
|
||||
msgstr "**``StaticDividingLine(length: int = 25)``**"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:77
|
||||
#: ../../root/redirect_stdout.rst:90
|
||||
msgid ""
|
||||
"Линия имеет фиксированную длину (по умолчанию 25 символов), которую можно"
|
||||
" задать через аргумент ``length``."
|
||||
msgstr ""
|
||||
"The line has a fixed length (25 characters by default), which can be set via the "
|
||||
"``length`` argument."
|
||||
"The line has a fixed length (25 characters by default), which can be set "
|
||||
"via the ``length`` argument."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:78
|
||||
#: ../../root/redirect_stdout.rst:91
|
||||
msgid ""
|
||||
"Используется принудительно для роутеров с "
|
||||
"``disable_redirect_stdout=True``, так как без перехвата вывода невозможно"
|
||||
@@ -193,11 +230,11 @@ msgstr ""
|
||||
"Used forcibly for routers with ``disable_redirect_stdout=True``, as it is"
|
||||
" impossible to determine dynamic length without output interception."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:83
|
||||
#: ../../root/redirect_stdout.rst:96
|
||||
msgid "Настройка разделительной линии в ``App``"
|
||||
msgstr "Configuring the Dividing Line in ``App``"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:85
|
||||
#: ../../root/redirect_stdout.rst:98
|
||||
msgid ""
|
||||
"Вы можете глобально задать тип разделителя для всего приложения через "
|
||||
"аргумент ``dividing_line`` в конструкторе ``App``."
|
||||
@@ -205,69 +242,69 @@ msgstr ""
|
||||
"You can globally set the divider type for the entire application via the "
|
||||
"``dividing_line`` argument in the ``App`` constructor."
|
||||
|
||||
#: ../../root/redirect_stdout.rst:96
|
||||
#: ../../root/redirect_stdout.rst:109
|
||||
msgid "Итоговое поведение"
|
||||
msgstr "Resulting Behavior"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:102
|
||||
#: ../../root/redirect_stdout.rst:115
|
||||
msgid "``disable_redirect_stdout`` на ``Router``"
|
||||
msgstr "``disable_redirect_stdout`` on ``Router``"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:103
|
||||
#: ../../root/redirect_stdout.rst:116
|
||||
msgid "Тип линии в ``App``"
|
||||
msgstr "Line type in ``App``"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:104
|
||||
#: ../../root/redirect_stdout.rst:117
|
||||
msgid "Фактическое поведение"
|
||||
msgstr "Actual behavior"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:105
|
||||
#: ../../root/redirect_stdout.rst:118
|
||||
msgid "``input()`` работает корректно?"
|
||||
msgstr "Does ``input()`` work correctly?"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:106 ../../root/redirect_stdout.rst:110
|
||||
#: ../../root/redirect_stdout.rst:119 ../../root/redirect_stdout.rst:123
|
||||
msgid "``False`` (по умолчанию)"
|
||||
msgstr "``False`` (default)"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:107 ../../root/redirect_stdout.rst:115
|
||||
#: ../../root/redirect_stdout.rst:120 ../../root/redirect_stdout.rst:128
|
||||
msgid "``DynamicDividingLine``"
|
||||
msgstr ""
|
||||
msgstr "``DynamicDividingLine``"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:108
|
||||
#: ../../root/redirect_stdout.rst:121
|
||||
msgid "Динамическая линия, длина по содержимому"
|
||||
msgstr "Dynamic line, length by content"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:109 ../../root/redirect_stdout.rst:113
|
||||
#: ../../root/redirect_stdout.rst:122 ../../root/redirect_stdout.rst:126
|
||||
msgid "Нет"
|
||||
msgstr "No"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:111 ../../root/redirect_stdout.rst:119
|
||||
#: ../../root/redirect_stdout.rst:124 ../../root/redirect_stdout.rst:132
|
||||
msgid "``StaticDividingLine``"
|
||||
msgstr ""
|
||||
msgstr "``StaticDividingLine``"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:112 ../../root/redirect_stdout.rst:120
|
||||
#: ../../root/redirect_stdout.rst:125 ../../root/redirect_stdout.rst:133
|
||||
msgid "Статическая линия указанной длины"
|
||||
msgstr "Static line of specified length"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:114 ../../root/redirect_stdout.rst:118
|
||||
#: ../../root/redirect_stdout.rst:127 ../../root/redirect_stdout.rst:131
|
||||
msgid "``True``"
|
||||
msgstr ""
|
||||
msgstr "``True``"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:116
|
||||
#: ../../root/redirect_stdout.rst:129
|
||||
msgid "**Принудительно статическая линия** (длина по умолч.)"
|
||||
msgstr "**Forcibly static line** (default length)"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:117 ../../root/redirect_stdout.rst:121
|
||||
#: ../../root/redirect_stdout.rst:130 ../../root/redirect_stdout.rst:134
|
||||
msgid "Да"
|
||||
msgstr "Yes"
|
||||
|
||||
#: ../../root/redirect_stdout.rst:123
|
||||
#: ../../root/redirect_stdout.rst:136
|
||||
msgid ""
|
||||
"Таким образом, для интерактивных команд, требующих ввода от пользователя,"
|
||||
" отключайте перехват ``stdout`` на уровне роутера. Для всех остальных "
|
||||
"команд можно оставить поведение по умолчанию."
|
||||
msgstr ""
|
||||
"Thus, for interactive commands that require user input, disable ``stdout`` "
|
||||
"interception at the router level. For all other commands, you can leave the default "
|
||||
"behavior."
|
||||
"Thus, for interactive commands that require user input, disable "
|
||||
"``stdout`` interception at the router level. For all other commands, you "
|
||||
"can leave the default behavior."
|
||||
|
||||
|
||||
@@ -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-04 20:39+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: en\n"
|
||||
@@ -27,8 +27,8 @@ msgid ""
|
||||
"В этом разделе описаны практики тестирования приложений на основе "
|
||||
"``Argenta``. Примеры основаны на фактическом публичном API."
|
||||
msgstr ""
|
||||
"This section describes testing practices for applications based on ``Argenta``. "
|
||||
"Examples are based on the actual public API."
|
||||
"This section describes testing practices for applications based on "
|
||||
"``Argenta``. Examples are based on the actual public API."
|
||||
|
||||
#: ../../root/testing.rst:7
|
||||
msgid "Модульное тестирование обработчиков"
|
||||
@@ -40,12 +40,12 @@ msgid ""
|
||||
"чистые функции, не поднимая весь цикл приложения. Рекомендуются "
|
||||
"``unittest`` или ``pytest``."
|
||||
msgstr ""
|
||||
"Handlers in ``Argenta`` are regular functions. They are convenient to test as pure "
|
||||
"functions without starting the entire application cycle. ``unittest`` or ``pytest`` "
|
||||
"are recommended."
|
||||
"Handlers in ``Argenta`` are regular functions. They are convenient to "
|
||||
"test as pure functions without starting the entire application cycle. "
|
||||
"``unittest`` or ``pytest`` are recommended."
|
||||
|
||||
#: ../../root/testing.rst:11 ../../root/testing.rst:24
|
||||
#: ../../root/testing.rst:37 ../../root/testing.rst:53
|
||||
#: ../../root/testing.rst:37 ../../root/testing.rst:55
|
||||
msgid "**Пример использования:**"
|
||||
msgstr "**Usage example:**"
|
||||
|
||||
@@ -58,7 +58,8 @@ msgid ""
|
||||
"Если обработчику нужны зависимости, используйте ``dishka`` и интеграцию "
|
||||
"``Argenta``:"
|
||||
msgstr ""
|
||||
"If a handler needs dependencies, use ``dishka`` and ``Argenta`` integration:"
|
||||
"If a handler needs dependencies, use ``dishka`` and ``Argenta`` "
|
||||
"integration:"
|
||||
|
||||
#: ../../root/testing.rst:33
|
||||
msgid "Интеграционное тестирование приложения"
|
||||
@@ -71,9 +72,10 @@ msgid ""
|
||||
"ввода. Это даёт близкое к реальности поведение без необходимости "
|
||||
"симулировать ``stdin``."
|
||||
msgstr ""
|
||||
"For higher-level tests, assemble ``App`` and ``Router`` and call handlers through "
|
||||
"command parsing, bypassing the infinite input loop. This provides behavior close to "
|
||||
"reality without the need to simulate ``stdin``."
|
||||
"For higher-level tests, assemble ``App`` and ``Router`` and call handlers"
|
||||
" through command parsing, bypassing the infinite input loop. This "
|
||||
"provides behavior close to reality without the need to simulate "
|
||||
"``stdin``."
|
||||
|
||||
#: ../../root/testing.rst:46
|
||||
msgid "E2E-тестирование цикла"
|
||||
@@ -85,54 +87,57 @@ msgid ""
|
||||
"передачей строк в ``stdin``. Это тяжелее и обычно не требуется. Если всё "
|
||||
"же необходимо — пример ниже."
|
||||
msgstr ""
|
||||
"Full execution of the ``start_polling`` loop can be covered through a subprocess "
|
||||
"with passing strings to ``stdin``. This is heavier and usually not required. If "
|
||||
"still necessary, an example is below."
|
||||
"Full execution of the ``start_polling`` loop can be covered through a "
|
||||
"subprocess with passing strings to ``stdin``. This is heavier and usually"
|
||||
" not required. If still necessary, an example is below."
|
||||
|
||||
#: ../../root/testing.rst:51
|
||||
msgid ""
|
||||
"Обязательно передавайте строковый триггер команды выхода последним "
|
||||
"элементом в списке, который передаёте в контекстном менеджере при патче "
|
||||
"``input`` как аргумент ``side_effects``, иначе тестируемое приложение "
|
||||
"будет ожидать ввода следующей команды и не сможет корректно завершиться."
|
||||
"**Важно:** Обязательно передавайте строковый триггер команды выхода "
|
||||
"последним элементом в списке ``side_effects`` при патче ``input``."
|
||||
msgstr ""
|
||||
"Be sure to pass the exit command string trigger as the last element in the list "
|
||||
"that you pass in the context manager when patching ``input`` as the ``side_effects`` "
|
||||
"argument, otherwise the application under test will wait for the next command input "
|
||||
"and will not be able to terminate correctly."
|
||||
"**Important:** Always pass the exit command string trigger as the last "
|
||||
"element in the ``side_effects`` list when patching ``input``."
|
||||
|
||||
#: ../../root/testing.rst:62
|
||||
#: ../../root/testing.rst:53
|
||||
msgid ""
|
||||
"Иначе тестируемое приложение будет ожидать ввода следующей команды и не "
|
||||
"сможет корректно завершиться."
|
||||
msgstr ""
|
||||
"Otherwise, the application under test will wait for the next command "
|
||||
"input and will not be able to terminate correctly."
|
||||
|
||||
#: ../../root/testing.rst:64
|
||||
msgid "Советы по тестированию"
|
||||
msgstr "Testing Tips"
|
||||
|
||||
#: ../../root/testing.rst:64
|
||||
#: ../../root/testing.rst:66
|
||||
msgid "**Изолируйте тесты**: Каждый тест должен быть независимым от других."
|
||||
msgstr "**Isolate tests**: Each test should be independent of others."
|
||||
|
||||
#: ../../root/testing.rst:65
|
||||
#: ../../root/testing.rst:67
|
||||
msgid ""
|
||||
"**Моки для внешних интеграций**: БД, HTTP-клиенты и т.п. подменяйте "
|
||||
"заглушками и провайдерами ``dishka``."
|
||||
msgstr ""
|
||||
"**Mocks for external integrations**: Replace databases, HTTP clients, etc. with "
|
||||
"stubs and ``dishka`` providers."
|
||||
"**Mocks for external integrations**: Replace databases, HTTP clients, "
|
||||
"etc. with stubs and ``dishka`` providers."
|
||||
|
||||
#: ../../root/testing.rst:66
|
||||
#: ../../root/testing.rst:68
|
||||
msgid ""
|
||||
"**Покрывайте ошибочные сценарии**: Некорректные флаги, неизвестные "
|
||||
"команды, пустой ввод."
|
||||
msgstr ""
|
||||
"**Cover error scenarios**: Incorrect flags, unknown commands, empty input."
|
||||
msgstr "**Cover error scenarios**: Incorrect flags, unknown commands, empty input."
|
||||
|
||||
#: ../../root/testing.rst:67
|
||||
#: ../../root/testing.rst:69
|
||||
msgid ""
|
||||
"**Минимизируйте зависимость от форматирования**: Сравнивайте ключевые "
|
||||
"фрагменты вывода, а не весь блок целиком."
|
||||
msgstr ""
|
||||
"**Minimize formatting dependency**: Compare key output fragments, not the entire "
|
||||
"block."
|
||||
"**Minimize formatting dependency**: Compare key output fragments, not the"
|
||||
" entire block."
|
||||
|
||||
#: ../../root/testing.rst:68
|
||||
#: ../../root/testing.rst:70
|
||||
msgid "**Измеряйте покрытие**: Используйте ``pytest-cov``."
|
||||
msgstr "**Measure coverage**: Use ``pytest-cov``."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user