mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 18:15:28 +03:00
Update documentation and code snippets
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
# This file is distributed under the same license as the Argenta package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Argenta \n"
|
||||
@@ -30,180 +29,199 @@ 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."
|
||||
|
||||
#: ../../root/api/app/index.rst:11
|
||||
msgid "Инициализация"
|
||||
msgstr ""
|
||||
msgstr "Initialization"
|
||||
|
||||
#: ../../root/api/app/index.rst:38
|
||||
msgid "Создаёт и настраивает экземпляр приложения."
|
||||
msgstr ""
|
||||
msgstr "Creates and configures an application instance."
|
||||
|
||||
#: ../../root/api/app/index.rst:40
|
||||
msgid "``prompt``: Приглашение к вводу, отображаемое перед каждой командой."
|
||||
msgstr ""
|
||||
msgstr "``prompt``: Input prompt displayed before each command."
|
||||
|
||||
#: ../../root/api/app/index.rst:41
|
||||
msgid "``initial_message``: Сообщение, выводимое при запуске приложения."
|
||||
msgstr ""
|
||||
msgstr "``initial_message``: Message displayed when the application starts."
|
||||
|
||||
#: ../../root/api/app/index.rst:42
|
||||
msgid "``farewell_message``: Сообщение, выводимое при выходе из приложения."
|
||||
msgstr ""
|
||||
msgstr "``farewell_message``: Message displayed when exiting the application."
|
||||
|
||||
#: ../../root/api/app/index.rst:43
|
||||
msgid ""
|
||||
"``exit_command``: Команда, которая маркируется как триггер для выхода из "
|
||||
"приложения."
|
||||
msgstr ""
|
||||
"``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)."
|
||||
|
||||
#: ../../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."
|
||||
|
||||
#: ../../root/api/app/index.rst:46
|
||||
msgid ""
|
||||
"``dividing_line``: Тип разделительной линии (``StaticDividingLine`` или "
|
||||
"``DynamicDividingLine``)."
|
||||
msgstr ""
|
||||
"``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."
|
||||
|
||||
#: ../../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."
|
||||
|
||||
#: ../../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."
|
||||
|
||||
#: ../../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``)."
|
||||
|
||||
#: ../../root/api/app/index.rst:55
|
||||
msgid "Основные методы"
|
||||
msgstr ""
|
||||
msgstr "Main Methods"
|
||||
|
||||
#: ../../root/api/app/index.rst:59
|
||||
msgid ""
|
||||
"Регистрирует роутер в приложении. Все команды из этого роутера становятся"
|
||||
" доступными для вызова."
|
||||
msgstr ""
|
||||
"Registers a router in the application. All commands from this router become available for invocation."
|
||||
|
||||
#: ../../root/api/app/index.rst
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
msgstr "Parameters"
|
||||
|
||||
#: ../../root/api/app/index.rst:61
|
||||
msgid "Экземпляр ``Router`` для регистрации."
|
||||
msgstr ""
|
||||
msgstr "``Router`` instance to register."
|
||||
|
||||
#: ../../root/api/app/index.rst:65
|
||||
msgid "Регистрирует несколько роутеров одновременно."
|
||||
msgstr ""
|
||||
msgstr "Registers multiple routers simultaneously."
|
||||
|
||||
#: ../../root/api/app/index.rst:67
|
||||
msgid "Последовательность экземпляров ``Router`` для регистрации."
|
||||
msgstr ""
|
||||
msgstr "Sequence of ``Router`` instances to register."
|
||||
|
||||
#: ../../root/api/app/index.rst:71
|
||||
msgid ""
|
||||
"Добавляет текстовое сообщение, которое выводится при запуске приложения "
|
||||
"после ``initial_message``."
|
||||
msgstr ""
|
||||
"Adds a text message that is displayed when the application starts after ``initial_message``."
|
||||
|
||||
#: ../../root/api/app/index.rst:73
|
||||
msgid "Строка с сообщением."
|
||||
msgstr ""
|
||||
msgstr "String with the message."
|
||||
|
||||
#: ../../root/api/app/index.rst:76
|
||||
msgid ""
|
||||
"Для вывода стандартных сообщений можно использовать готовые шаблоны из "
|
||||
":ref:`PredefinedMessages <root_api_predefined_messages>`."
|
||||
msgstr ""
|
||||
"For outputting standard messages, you can use ready-made templates from "
|
||||
":ref:`PredefinedMessages <root_api_predefined_messages>`."
|
||||
|
||||
#: ../../root/api/app/index.rst:81
|
||||
msgid "Методы установки обработчиков"
|
||||
msgstr ""
|
||||
msgstr "Handler Setup Methods"
|
||||
|
||||
#: ../../root/api/app/index.rst:83
|
||||
msgid ""
|
||||
"``App`` позволяет настраивать реакцию на различные события, такие как "
|
||||
"ошибки ввода или неизвестные команды."
|
||||
msgstr ""
|
||||
"``App`` allows you to configure responses to various events, such as input errors or unknown commands."
|
||||
|
||||
#: ../../root/api/app/index.rst:86
|
||||
msgid ""
|
||||
"Подробнее о исключениях и их обработке в соответствующем :ref:`разделе "
|
||||
"документации <root_error_handling>`."
|
||||
msgstr ""
|
||||
"For more details on exceptions and their handling, see the corresponding "
|
||||
":ref:`documentation section <root_error_handling>`."
|
||||
|
||||
#: ../../root/api/app/index.rst:92
|
||||
msgid "Устанавливает шаблон для форматирования описания команды."
|
||||
msgstr ""
|
||||
msgstr "Sets the template for formatting command descriptions."
|
||||
|
||||
#: ../../root/api/app/index.rst:94
|
||||
msgid "Обработчик принимает триггер команды (``str``) и её описание (``str``)."
|
||||
msgstr ""
|
||||
msgstr "The handler accepts the command trigger (``str``) and its description (``str``)."
|
||||
|
||||
#: ../../root/api/app/index.rst:100
|
||||
msgid "Устанавливает обработчик при некорректном введённом синтаксисе флагов."
|
||||
msgstr ""
|
||||
msgstr "Sets the handler for incorrect flag syntax input."
|
||||
|
||||
#: ../../root/api/app/index.rst:102 ../../root/api/app/index.rst:110
|
||||
msgid "Обработчик принимает строку, введённую пользователем."
|
||||
msgstr ""
|
||||
msgstr "The handler accepts the string entered by the user."
|
||||
|
||||
#: ../../root/api/app/index.rst:108
|
||||
msgid "Устанавливает обработчик при повторяющихся флагах в введённой команде."
|
||||
msgstr ""
|
||||
msgstr "Sets the handler for duplicate flags in the entered command."
|
||||
|
||||
#: ../../root/api/app/index.rst:116
|
||||
msgid "Устанавливает обработчик при вводе неизвестной команды."
|
||||
msgstr ""
|
||||
msgstr "Sets the handler for entering an unknown command."
|
||||
|
||||
#: ../../root/api/app/index.rst:118
|
||||
msgid "Обработчик принимает объект ``InputCommand`` - объект введённой команды."
|
||||
msgstr ""
|
||||
msgstr "The handler accepts an ``InputCommand`` object - the entered command object."
|
||||
|
||||
#: ../../root/api/app/index.rst:124
|
||||
msgid "Устанавливает обработчик при вводе пустой строки."
|
||||
msgstr ""
|
||||
msgstr "Sets the handler for entering an empty string."
|
||||
|
||||
#: ../../root/api/app/index.rst:126
|
||||
msgid "Обработчик не принимает аргументов."
|
||||
msgstr ""
|
||||
msgstr "The handler accepts no arguments."
|
||||
|
||||
#: ../../root/api/app/index.rst:132
|
||||
msgid "Переопределяет стандартное поведение при вызове команды выхода."
|
||||
msgstr ""
|
||||
msgstr "Overrides the default behavior when the exit command is invoked."
|
||||
|
||||
#: ../../root/api/app/index.rst:134
|
||||
msgid "Обработчик принимает объект ``Response``."
|
||||
msgstr ""
|
||||
msgstr "The handler accepts a ``Response`` object."
|
||||
|
||||
#: ../../root/api/app/index.rst:147
|
||||
msgid "PredefinedMessages"
|
||||
msgstr ""
|
||||
msgstr "PredefinedMessages"
|
||||
|
||||
#: ../../root/api/app/index.rst:149
|
||||
msgid ""
|
||||
@@ -212,32 +230,35 @@ 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."
|
||||
|
||||
#: ../../root/api/app/index.rst:151
|
||||
msgid "Реккомендуется использовать их при старте приложения."
|
||||
msgstr ""
|
||||
msgstr "It is recommended to use them when starting the application."
|
||||
|
||||
#: ../../root/api/app/index.rst:178
|
||||
msgid "Строка: ``[b dim]Usage[/b dim]: [i]<command> <[green]flags[/green]>[/i]``"
|
||||
msgstr ""
|
||||
msgstr "String: ``[b dim]Usage[/b dim]: [i]<command> <[green]flags[/green]>[/i]``"
|
||||
|
||||
#: ../../root/api/app/index.rst:180
|
||||
msgid "Отображается как: ``Usage: <command> <flags>``"
|
||||
msgstr ""
|
||||
msgstr "Displayed as: ``Usage: <command> <flags>``"
|
||||
|
||||
#: ../../root/api/app/index.rst:184
|
||||
msgid "Строка: ``[b dim]Help[/b dim]: [i]<command>[/i] [b red]--help[/b red]``"
|
||||
msgstr ""
|
||||
msgstr "String: ``[b dim]Help[/b dim]: [i]<command>[/i] [b red]--help[/b red]``"
|
||||
|
||||
#: ../../root/api/app/index.rst:186
|
||||
msgid "Отображается как: ``Help: <command> --help``"
|
||||
msgstr ""
|
||||
msgstr "Displayed as: ``Help: <command> --help``"
|
||||
|
||||
#: ../../root/api/app/index.rst:190
|
||||
msgid "Строка: ``[b dim]Autocomplete[/b dim]: [i]<part>[/i] [bold]<tab>``"
|
||||
msgstr ""
|
||||
msgstr "String: ``[b dim]Autocomplete[/b dim]: [i]<part>[/i] [bold]<tab>``"
|
||||
|
||||
#: ../../root/api/app/index.rst:192
|
||||
msgid "Отображается как: ``Autocomplete: <part> <tab>``"
|
||||
msgstr ""
|
||||
msgstr "Displayed as: ``Autocomplete: <part> <tab>``"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user