mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge branch 'dev-3.x' into feature/message-forward
This commit is contained in:
commit
a37919c056
8 changed files with 251 additions and 254 deletions
1
CHANGES/1029.doc.rst
Normal file
1
CHANGES/1029.doc.rst
Normal file
|
|
@ -0,0 +1 @@
|
|||
Fix typehints for `Message` `reply_media_group` & `answer_media_group` methods
|
||||
|
|
@ -17,7 +17,7 @@ class TelegramEventObserver:
|
|||
"""
|
||||
Event observer for Telegram events
|
||||
|
||||
Here you can register handler with filters or bounded filters which can be used as keyword arguments instead of writing full references when you register new handlers.
|
||||
Here you can register handler with filter.
|
||||
This observer will stop event propagation when first handler is pass.
|
||||
"""
|
||||
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ if TYPE_CHECKING:
|
|||
from .inline_keyboard_markup import InlineKeyboardMarkup
|
||||
from .input_file import InputFile
|
||||
from .input_media import InputMedia
|
||||
from .input_media_audio import InputMediaAudio
|
||||
from .input_media_document import InputMediaDocument
|
||||
from .input_media_photo import InputMediaPhoto
|
||||
from .input_media_video import InputMediaVideo
|
||||
from .invoice import Invoice
|
||||
|
|
@ -904,7 +906,7 @@ class Message(TelegramObject):
|
|||
|
||||
def reply_media_group(
|
||||
self,
|
||||
media: List[Union[InputMediaPhoto, InputMediaVideo]],
|
||||
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
) -> SendMediaGroup:
|
||||
|
|
@ -928,7 +930,7 @@ class Message(TelegramObject):
|
|||
|
||||
def answer_media_group(
|
||||
self,
|
||||
media: List[Union[InputMediaPhoto, InputMediaVideo]],
|
||||
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
|
||||
disable_notification: Optional[bool] = None,
|
||||
) -> SendMediaGroup:
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: aiogram \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-10-01 22:51+0300\n"
|
||||
"POT-Creation-Date: 2022-10-19 22:52+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
|
@ -83,10 +83,8 @@ msgstr ""
|
|||
|
||||
#: aiogram.dispatcher.event.telegram.TelegramEventObserver:3 of
|
||||
msgid ""
|
||||
"Here you can register handler with filters or bounded filters which can "
|
||||
"be used as keyword arguments instead of writing full references when you "
|
||||
"register new handlers. This observer will stop event propagation when "
|
||||
"first handler is pass."
|
||||
"Here you can register handler with filter. This observer will stop event "
|
||||
"propagation when first handler is pass."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.dispatcher.event.telegram.TelegramEventObserver.register:1 of
|
||||
|
|
@ -98,3 +96,14 @@ msgid ""
|
|||
"Propagate event to handlers and stops propagation on first match. Handler"
|
||||
" will be called when all its filters is pass."
|
||||
msgstr ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Here you can register handler with "
|
||||
#~ "filters or bounded filters which can "
|
||||
#~ "be used as keyword arguments instead "
|
||||
#~ "of writing full references when you "
|
||||
#~ "register new handlers. This observer "
|
||||
#~ "will stop event propagation when first"
|
||||
#~ " handler is pass."
|
||||
#~ msgstr ""
|
||||
|
||||
|
|
|
|||
|
|
@ -3,128 +3,155 @@
|
|||
# This file is distributed under the same license as the aiogram package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: aiogram \n"
|
||||
"Project-Id-Version: aiogram\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-10-01 22:51+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-10-20 21:29+0300\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.10.3\n"
|
||||
"X-Generator: Poedit 3.1.1\n"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:3
|
||||
msgid "Finite State Machine"
|
||||
msgstr ""
|
||||
msgstr "Кінцевий автомат (FSM)"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:5
|
||||
msgid ""
|
||||
"A finite-state machine (FSM) or finite-state automaton (FSA, plural: "
|
||||
"automata), finite automaton, or simply a state machine, is a mathematical"
|
||||
" model of computation."
|
||||
"automata), finite automaton, or simply a state machine, is a mathematical "
|
||||
"model of computation."
|
||||
msgstr ""
|
||||
"Кінцевий автомат, кінцевий автоматон, або машина станів (FSM, FSA, finite "
|
||||
"automaton, state machine) - це математична модель обчислень."
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:8
|
||||
msgid ""
|
||||
"It is an abstract machine that can be in exactly one of a finite number "
|
||||
"of states at any given time. The FSM can change from one state to another"
|
||||
" in response to some inputs; the change from one state to another is "
|
||||
"called a transition."
|
||||
"It is an abstract machine that can be in exactly one of a finite number of "
|
||||
"states at any given time. The FSM can change from one state to another in "
|
||||
"response to some inputs; the change from one state to another is called a "
|
||||
"transition."
|
||||
msgstr ""
|
||||
"Це абстрактна машина, яка може перебувати в одному зі скінченної кількості "
|
||||
"станів у будь-який момент часу. Кінцевий автомат може переходити з одного "
|
||||
"стану в інший у відповідь на деякі вхідні дані; перехід з одного стану в інший "
|
||||
"називається переходом."
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:12
|
||||
msgid ""
|
||||
"An FSM is defined by a list of its states, its initial state, and the "
|
||||
"inputs that trigger each transition."
|
||||
"An FSM is defined by a list of its states, its initial state, and the inputs "
|
||||
"that trigger each transition."
|
||||
msgstr ""
|
||||
"Кінцевий автомат визначається списком його станів, початковим станом і "
|
||||
"вхідними даними, які запускають кожен перехід."
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:19
|
||||
msgid "Source: `WikiPedia <wiki>`_"
|
||||
msgstr ""
|
||||
msgstr "Джерело: `WikiPedia <wiki>`_"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:22
|
||||
msgid "Usage example"
|
||||
msgstr ""
|
||||
msgstr "Приклад використання"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:24
|
||||
msgid ""
|
||||
"Not all functionality of the bot can be implemented as single handler, "
|
||||
"for example you will need to collect some data from user in separated "
|
||||
"steps you will need to use FSM."
|
||||
"Not all functionality of the bot can be implemented as single handler, for "
|
||||
"example you will need to collect some data from user in separated steps you "
|
||||
"will need to use FSM."
|
||||
msgstr ""
|
||||
"Не всі функції бота можна реалізувати як єдиний обробник (handler), наприклад, "
|
||||
"якщо Вам потрібно буде збирати деякі дані від користувача в окремих кроках, "
|
||||
"вам потрібно буде використовувати FSM."
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:-1
|
||||
msgid "FSM Example"
|
||||
msgstr ""
|
||||
msgstr "Приклад кінцевого автомату"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:31
|
||||
msgid "Let's see how to do that step-by-step"
|
||||
msgstr ""
|
||||
msgstr "Гайда, подивимось як реалізувати це крок за кроком"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:34
|
||||
msgid "Step by step"
|
||||
msgstr ""
|
||||
msgstr "Крок за кроком"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:36
|
||||
msgid ""
|
||||
"Before handle any states you will need to specify what kind of states you"
|
||||
" want to handle"
|
||||
"Before handle any states you will need to specify what kind of states you want "
|
||||
"to handle"
|
||||
msgstr ""
|
||||
"Перед обробкою будь-яких станів Вам потрібно буде вказати тип станів, які Ви "
|
||||
"хочете обробляти"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:44
|
||||
msgid "And then write handler for each state separately from the start of dialog"
|
||||
msgstr ""
|
||||
"А потім напишіть обробник (handler) для кожного стану окремо від початку "
|
||||
"діалогу"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:46
|
||||
msgid ""
|
||||
"Here is dialog can be started only via command :code:`/start`, so lets "
|
||||
"handle it and make transition user to state :code:`Form.name`"
|
||||
"Here is dialog can be started only via command :code:`/start`, so lets handle "
|
||||
"it and make transition user to state :code:`Form.name`"
|
||||
msgstr ""
|
||||
"Тут діалог можна почати лише за допомогою команди :code:`/start`, тому давайте "
|
||||
"обробимо її та зробимо перехід користувача до стану :code:`Form.name`"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:54
|
||||
msgid ""
|
||||
"After that you will need to save some data to the storage and make "
|
||||
"transition to next step."
|
||||
"After that you will need to save some data to the storage and make transition "
|
||||
"to next step."
|
||||
msgstr ""
|
||||
"Після цього Вам потрібно буде зберегти деякі дані в пам’яті та перейти до "
|
||||
"наступного кроку."
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:62
|
||||
msgid ""
|
||||
"At the next steps user can make different answers, it can be `yes`, `no` "
|
||||
"or any other"
|
||||
"At the next steps user can make different answers, it can be `yes`, `no` or "
|
||||
"any other"
|
||||
msgstr ""
|
||||
"На наступних кроках користувач може дати різні відповіді, це може бути «так», "
|
||||
"«ні» або будь-що інше"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:64
|
||||
msgid "Handle :code:`yes` and soon we need to handle :code:`Form.language` state"
|
||||
msgstr ""
|
||||
"Обробка :code:`yes` і скоро нам потрібно буде обробити стан :code:`Form."
|
||||
"language`"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:72
|
||||
msgid "Handle :code:`no`"
|
||||
msgstr ""
|
||||
msgstr "Обробка :code:`no`"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:80
|
||||
msgid "And handle any other answers"
|
||||
msgstr ""
|
||||
msgstr "І обробка будь-яких інших відповідей"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:88
|
||||
msgid ""
|
||||
"All possible cases of `like_bots` step was covered, let's implement "
|
||||
"finally step"
|
||||
"All possible cases of `like_bots` step was covered, let's implement finally "
|
||||
"step"
|
||||
msgstr ""
|
||||
"Всі можливі випадки кроку `like_bots` було розглянуто, нумо реалізуємо "
|
||||
"останній крок"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:96
|
||||
msgid ""
|
||||
"And now you have covered all steps from the image, but you can make "
|
||||
"possibility to cancel conversation, lets do that via command or text"
|
||||
msgstr ""
|
||||
"І тепер Ви виконали всі кроки на зображенні, але ви можете зробити можливість "
|
||||
"скасувати діалог, давайте зробимо це за допомогою команди або тексту"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:105
|
||||
msgid "Complete example"
|
||||
msgstr ""
|
||||
msgstr "Повний приклад"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/index.rst:112
|
||||
msgid "Read more"
|
||||
msgstr ""
|
||||
msgstr "Читайте також"
|
||||
|
|
|
|||
|
|
@ -3,166 +3,77 @@
|
|||
# This file is distributed under the same license as the aiogram package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: aiogram \n"
|
||||
"Project-Id-Version: aiogram\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-10-01 22:51+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"POT-Creation-Date: 2022-10-19 02:13+0300\n"
|
||||
"PO-Revision-Date: 2022-10-20 22:00+0300\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.10.3\n"
|
||||
"X-Generator: Poedit 3.1.1\n"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/storages.rst:3
|
||||
msgid "Storages"
|
||||
msgstr ""
|
||||
msgstr "Сховища"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/storages.rst:6
|
||||
msgid "Storages out of the box"
|
||||
msgstr ""
|
||||
msgstr "Вбудоване сховище"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/storages.rst:9
|
||||
msgid "MemoryStorage"
|
||||
msgstr ""
|
||||
msgstr "MemoryStorage"
|
||||
|
||||
#: aiogram.fsm.storage.memory.MemoryStorage:1 of
|
||||
msgid ""
|
||||
"Default FSM storage, stores all data in :class:`dict` and loss everything"
|
||||
" on shutdown"
|
||||
"Default FSM storage, stores all data in :class:`dict` and loss "
|
||||
"everything on shutdown"
|
||||
msgstr ""
|
||||
"Сховище кінцевого автомату за замовчуванням, зберігає всі дані в :class:"
|
||||
"`dict` і забуває все під час вимкнення"
|
||||
|
||||
#: aiogram.fsm.storage.memory.MemoryStorage:5 of
|
||||
msgid ""
|
||||
"Is not recommended using in production in due to you will lose all data "
|
||||
"when your bot restarts"
|
||||
msgstr ""
|
||||
"Не рекомендується використовувати на production, оскільки, Ви втратите "
|
||||
"всі дані під час перезапуску бота"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/storages.rst:16
|
||||
msgid "RedisStorage"
|
||||
msgstr ""
|
||||
msgstr "RedisStorage"
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage:1 of
|
||||
msgid ""
|
||||
"Redis storage required :code:`aioredis` package installed (:code:`pip "
|
||||
"install aioredis`)"
|
||||
#: ../../dispatcher/finite_state_machine/storages.rst:22
|
||||
msgid "Keys inside storage can be customized via key builders:"
|
||||
msgstr ""
|
||||
"Ключі всередині сховища можна налаштувати за допомогою конструкторів "
|
||||
"ключів:"
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/storages.rst:34
|
||||
msgid "Writing own storages"
|
||||
msgstr "Написання власних сховищ"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage:1 of
|
||||
msgid "Base class for all FSM storages"
|
||||
msgstr "Основний клас для всіх сховищ кінцевого автомату"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.set_state:1 of
|
||||
msgid "Set state for specified key"
|
||||
msgstr "Установити стан для вказаного ключа"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_data
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_state
|
||||
#: aiogram.fsm.storage.base.BaseStorage.set_data
|
||||
#: aiogram.fsm.storage.base.BaseStorage.set_state
|
||||
#: aiogram.fsm.storage.base.BaseStorage.update_data
|
||||
#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build
|
||||
#: aiogram.fsm.storage.redis.KeyBuilder.build
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.__init__
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.from_url of
|
||||
#: aiogram.fsm.storage.base.BaseStorage.update_data of
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.__init__:1 of
|
||||
msgid "Instance of Redis connection"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.__init__:2 of
|
||||
msgid "builder that helps to convert contextual key to string"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.__init__:3 of
|
||||
msgid "TTL for state records"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.__init__:4 of
|
||||
msgid "TTL for data records"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.__init__:5 of
|
||||
msgid "Custom arguments for Redis lock"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.from_url:1 of
|
||||
msgid ""
|
||||
"Create an instance of :class:`RedisStorage` with specifying the "
|
||||
"connection string"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.from_url:3 of
|
||||
msgid "for example :code:`redis://user:password@host:port/db`"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.from_url:4 of
|
||||
msgid "see :code:`aioredis` docs"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.from_url:5 of
|
||||
msgid "arguments to be passed to :class:`RedisStorage`"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_data
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_state
|
||||
#: aiogram.fsm.storage.base.BaseStorage.update_data
|
||||
#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build
|
||||
#: aiogram.fsm.storage.redis.KeyBuilder.build
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.from_url of
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.RedisStorage.from_url:6 of
|
||||
msgid "an instance of :class:`RedisStorage`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/storages.rst:22
|
||||
msgid "Keys inside storage can be customized via key builders:"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.KeyBuilder:1 of
|
||||
msgid "Base class for Redis key builder"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build:1
|
||||
#: aiogram.fsm.storage.redis.KeyBuilder.build:1 of
|
||||
msgid "This method should be implemented in subclasses"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build:3
|
||||
#: aiogram.fsm.storage.redis.KeyBuilder.build:3 of
|
||||
msgid "contextual key"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build:4
|
||||
#: aiogram.fsm.storage.redis.KeyBuilder.build:4 of
|
||||
msgid "part of the record"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.DefaultKeyBuilder.build:5
|
||||
#: aiogram.fsm.storage.redis.KeyBuilder.build:5 of
|
||||
msgid "key to be used in Redis queries"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.DefaultKeyBuilder:1 of
|
||||
msgid "Simple Redis key builder with default prefix."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.redis.DefaultKeyBuilder:3 of
|
||||
msgid ""
|
||||
"Generates a colon-joined string with prefix, chat_id, user_id, optional "
|
||||
"bot_id and optional destiny."
|
||||
msgstr ""
|
||||
|
||||
#: ../../dispatcher/finite_state_machine/storages.rst:34
|
||||
msgid "Writing own storages"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage:1 of
|
||||
msgid "Base class for all FSM storages"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.set_state:1 of
|
||||
msgid "Set state for specified key"
|
||||
msgstr ""
|
||||
msgstr "Параметри"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_data:3
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_state:3
|
||||
|
|
@ -170,7 +81,7 @@ msgstr ""
|
|||
#: aiogram.fsm.storage.base.BaseStorage.set_state:3
|
||||
#: aiogram.fsm.storage.base.BaseStorage.update_data:3 of
|
||||
msgid "instance of the current bot"
|
||||
msgstr ""
|
||||
msgstr "екземпляр поточного бота"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_data:4
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_state:4
|
||||
|
|
@ -178,45 +89,51 @@ msgstr ""
|
|||
#: aiogram.fsm.storage.base.BaseStorage.set_state:4
|
||||
#: aiogram.fsm.storage.base.BaseStorage.update_data:4 of
|
||||
msgid "storage key"
|
||||
msgstr ""
|
||||
msgstr "ключ сховища"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.set_state:5 of
|
||||
msgid "new state"
|
||||
msgstr ""
|
||||
msgstr "новий стан"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_state:1 of
|
||||
msgid "Get key state"
|
||||
msgstr ""
|
||||
msgstr "Отримання стану ключа"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_data
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_state
|
||||
#: aiogram.fsm.storage.base.BaseStorage.update_data of
|
||||
msgid "Returns"
|
||||
msgstr "Повертає"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_state:5 of
|
||||
msgid "current state"
|
||||
msgstr ""
|
||||
msgstr "поточний стан"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.set_data:1 of
|
||||
msgid "Write data (replace)"
|
||||
msgstr ""
|
||||
msgstr "Запис даних (заміна)"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.set_data:5
|
||||
#: aiogram.fsm.storage.base.BaseStorage.update_data:6 of
|
||||
msgid "new data"
|
||||
msgstr ""
|
||||
msgstr "нові дані"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_data:1 of
|
||||
msgid "Get current data for key"
|
||||
msgstr ""
|
||||
msgstr "Отримання поточних даних для ключа"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.get_data:5 of
|
||||
msgid "current data"
|
||||
msgstr ""
|
||||
msgstr "нинішні дані"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.update_data:1 of
|
||||
msgid "Update date in the storage for key (like dict.update)"
|
||||
msgstr ""
|
||||
msgstr "Дата оновлення в сховищі для ключа (наприклад, dict.update)"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.update_data:5 of
|
||||
msgid "partial data"
|
||||
msgstr ""
|
||||
msgstr "неповні дані"
|
||||
|
||||
#: aiogram.fsm.storage.base.BaseStorage.close:1 of
|
||||
msgid "Close storage (database connection, file or etc.)"
|
||||
msgstr ""
|
||||
msgstr "Закриття сховища (підключення до бази даних, файлу тощо)"
|
||||
|
|
|
|||
|
|
@ -3,179 +3,211 @@
|
|||
# This file is distributed under the same license as the aiogram package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: aiogram \n"
|
||||
"Project-Id-Version: aiogram\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-10-01 22:51+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"PO-Revision-Date: 2022-10-20 20:56+0300\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.10.3\n"
|
||||
"X-Generator: Poedit 3.1.1\n"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:3
|
||||
msgid "Middlewares"
|
||||
msgstr ""
|
||||
msgstr "Проміжні програми"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:5
|
||||
msgid ""
|
||||
"**aiogram** provides powerful mechanism for customizing event handlers "
|
||||
"via middlewares."
|
||||
"**aiogram** provides powerful mechanism for customizing event handlers via "
|
||||
"middlewares."
|
||||
msgstr ""
|
||||
"**aiogram** надає потужний механізм для налаштування обробників(handler) "
|
||||
"подій через проміжні програми."
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:7
|
||||
msgid ""
|
||||
"Middlewares in bot framework seems like Middlewares mechanism in web-"
|
||||
"frameworks like `aiohttp "
|
||||
"<https://docs.aiohttp.org/en/stable/web_advanced.html#aiohttp-web-"
|
||||
"middlewares>`_, `fastapi "
|
||||
"<https://fastapi.tiangolo.com/tutorial/middleware/>`_, `Django "
|
||||
"<https://docs.djangoproject.com/en/3.0/topics/http/middleware/>`_ or "
|
||||
"etc.) with small difference - here is implemented two layers of "
|
||||
"middlewares (before and after filters)."
|
||||
"frameworks like `aiohttp <https://docs.aiohttp.org/en/stable/web_advanced."
|
||||
"html#aiohttp-web-middlewares>`_, `fastapi <https://fastapi.tiangolo.com/"
|
||||
"tutorial/middleware/>`_, `Django <https://docs.djangoproject.com/en/3.0/"
|
||||
"topics/http/middleware/>`_ or etc.) with small difference - here is "
|
||||
"implemented two layers of middlewares (before and after filters)."
|
||||
msgstr ""
|
||||
"Проміжні програми у фреймворку для ботів виглядають як механізм проміжних "
|
||||
"програм у веб-фреймворках, таких як `aiohttp <https://docs.aiohttp.org/en/"
|
||||
"stable/web_advanced.html#aiohttp-web-middlewares>`_, `fastapi <https://"
|
||||
"fastapi.tiangolo.com/tutorial/middleware/>`_, `Django <https://docs."
|
||||
"djangoproject.com/en/3.0/topics/http/middleware/>`_ тощо) з невеликою "
|
||||
"різницею – тут реалізовано два рівні проміжного програмних програм (до та "
|
||||
"після фільтрів)."
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:15
|
||||
msgid ""
|
||||
"Middleware is function that triggered on every event received from "
|
||||
"Telegram Bot API in many points on processing pipeline."
|
||||
"Middleware is function that triggered on every event received from Telegram "
|
||||
"Bot API in many points on processing pipeline."
|
||||
msgstr ""
|
||||
"Проміжна програма — це функція, яка запускається під час кожної події, "
|
||||
"отриманої від Telegram Bot API у багатьох точках процесу обробки."
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:19
|
||||
msgid "Base theory"
|
||||
msgstr ""
|
||||
msgstr "Основні поняття"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:21
|
||||
msgid "As many books and other literature in internet says:"
|
||||
msgstr ""
|
||||
msgstr "Більшість книг та Інтернет-джерел стверджують:"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:23
|
||||
msgid ""
|
||||
"Middleware is reusable software that leverages patterns and frameworks to"
|
||||
" bridge the gap between the functional requirements of applications and "
|
||||
"the underlying operating systems, network protocol stacks, and databases."
|
||||
"Middleware is reusable software that leverages patterns and frameworks to "
|
||||
"bridge the gap between the functional requirements of applications and the "
|
||||
"underlying operating systems, network protocol stacks, and databases."
|
||||
msgstr ""
|
||||
"Проміжна програма — це програма, багаторазового використання, що "
|
||||
"використовує шаблони та фреймворки для ліквідування розриву між "
|
||||
"функціональними вимогами додатків і основними операційними системами, "
|
||||
"стеками мережевих протоколів і базами даних."
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:27
|
||||
msgid ""
|
||||
"Middleware can modify, extend or reject processing event in many places "
|
||||
"of pipeline."
|
||||
"Middleware can modify, extend or reject processing event in many places of "
|
||||
"pipeline."
|
||||
msgstr ""
|
||||
"Проміжна програма може змінювати, розширювати або відхиляти подію обробки у "
|
||||
"багатьох точках процесу обробки."
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:30
|
||||
msgid "Basics"
|
||||
msgstr ""
|
||||
msgstr "Основи"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:32
|
||||
msgid ""
|
||||
"Middleware instance can be applied for every type of Telegram Event "
|
||||
"(Update, Message, etc.) in two places"
|
||||
"Middleware instance can be applied for every type of Telegram Event (Update, "
|
||||
"Message, etc.) in two places"
|
||||
msgstr ""
|
||||
"Екземпляр проміжної програми можна застосувати для кожного типу події "
|
||||
"Telegram (оновлення, повідомлення тощо) у двох місцях"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:34
|
||||
msgid ""
|
||||
"Outer scope - before processing filters "
|
||||
"(:code:`<router>.<event>.outer_middleware(...)`)"
|
||||
"Outer scope - before processing filters (:code:`<router>.<event>."
|
||||
"outer_middleware(...)`)"
|
||||
msgstr ""
|
||||
"Зовнішня область - перед обробкою фільтрами (:code:`<router>.<event>."
|
||||
"outer_middleware(...)`)"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:35
|
||||
msgid ""
|
||||
"Inner scope - after processing filters but before handler "
|
||||
"(:code:`<router>.<event>.middleware(...)`)"
|
||||
"Inner scope - after processing filters but before handler (:code:`<router>."
|
||||
"<event>.middleware(...)`)"
|
||||
msgstr ""
|
||||
"Внутрішня область – після обробки фільтрами, але перед обробником (handler) "
|
||||
"(:code:`<router>.<event>.middleware(...)`)"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:-1
|
||||
msgid "Middleware basics"
|
||||
msgstr ""
|
||||
msgstr "Основи проміжних програм"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:42
|
||||
msgid ""
|
||||
"Middleware should be subclass of :code:`BaseMiddleware` (:code:`from "
|
||||
"aiogram import BaseMiddleware`) or any async callable"
|
||||
"Middleware should be subclass of :code:`BaseMiddleware` (:code:`from aiogram "
|
||||
"import BaseMiddleware`) or any async callable"
|
||||
msgstr ""
|
||||
"Проміжна програма має бути підкласом :code:`BaseMiddleware` (:code:`from "
|
||||
"aiogram import BaseMiddleware`) або будь-якою асинхронною функцією"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:45
|
||||
msgid "Arguments specification"
|
||||
msgstr ""
|
||||
msgstr "Специфікація аргументів"
|
||||
|
||||
#: aiogram.dispatcher.middlewares.base.BaseMiddleware:1 of
|
||||
msgid "Bases: :py:class:`~abc.ABC`"
|
||||
msgstr ""
|
||||
msgstr "Основа: :py:class:`~abc.ABC`"
|
||||
|
||||
#: aiogram.dispatcher.middlewares.base.BaseMiddleware:1 of
|
||||
msgid "Generic middleware class"
|
||||
msgstr ""
|
||||
msgstr "Узагальнений клас проміжних програм"
|
||||
|
||||
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:1 of
|
||||
msgid "Execute middleware"
|
||||
msgstr ""
|
||||
msgstr "Виконання проміжної програми"
|
||||
|
||||
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__ of
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
msgstr "Параметри"
|
||||
|
||||
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:3 of
|
||||
msgid "Wrapped handler in middlewares chain"
|
||||
msgstr ""
|
||||
msgstr "Обробник (handler), обгорнутий у ланцюжок проміжних програм"
|
||||
|
||||
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:4 of
|
||||
msgid "Incoming event (Subclass of :class:`aiogram.types.base.TelegramObject`)"
|
||||
msgstr ""
|
||||
msgstr "Вхідна подія (підклас :class:`aiogram.types.base.TelegramObject`)"
|
||||
|
||||
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:5 of
|
||||
msgid "Contextual data. Will be mapped to handler arguments"
|
||||
msgstr ""
|
||||
msgstr "Контекстні дані. Будуть зіставлені з аргументами обробника"
|
||||
|
||||
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__ of
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
msgstr "Повертає"
|
||||
|
||||
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:6 of
|
||||
msgid ":class:`Any`"
|
||||
msgstr ""
|
||||
msgstr ":class:`Any`"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:56
|
||||
msgid "Examples"
|
||||
msgstr ""
|
||||
msgstr "Приклади"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:60
|
||||
msgid ""
|
||||
"Middleware should always call :code:`await handler(event, data)` to "
|
||||
"propagate event for next middleware/handler"
|
||||
msgstr ""
|
||||
"Проміжні програми мають завжди викликати :code:`await handler(event, "
|
||||
"data)` , щоб передавати подію для наступної проміжної програми/обробника "
|
||||
"(handler)"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:64
|
||||
msgid "Class-based"
|
||||
msgstr ""
|
||||
msgstr "Класово орієнтований"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:85
|
||||
msgid "and then"
|
||||
msgstr ""
|
||||
msgstr "і тоді"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:94
|
||||
msgid "Function-based"
|
||||
msgstr ""
|
||||
msgstr "Функціонально-орієнтований"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:109
|
||||
msgid "Facts"
|
||||
msgstr ""
|
||||
msgstr "Факти"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:111
|
||||
msgid "Middlewares from outer scope will be called on every incoming event"
|
||||
msgstr ""
|
||||
"Проміжні програми із зовнішньої області викликатимуться під час кожної "
|
||||
"вхідної події"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:112
|
||||
msgid "Middlewares from inner scope will be called only when filters pass"
|
||||
msgstr ""
|
||||
"Проміжні програми із внутрішньої області викликатимуться лише після "
|
||||
"проходження фільтрів"
|
||||
|
||||
#: ../../dispatcher/middlewares.rst:113
|
||||
msgid ""
|
||||
"Inner middlewares is always calls for "
|
||||
":class:`aiogram.types.update.Update` event type in due to all incoming "
|
||||
"updates going to specific event type handler through built in update "
|
||||
"handler"
|
||||
"Inner middlewares is always calls for :class:`aiogram.types.update.Update` "
|
||||
"event type in due to all incoming updates going to specific event type "
|
||||
"handler through built in update handler"
|
||||
msgstr ""
|
||||
"Внутрішні проміжні програми викликають тип події :class:`aiogram.types."
|
||||
"update.Update` , через те, що всі вхідні оновлення надходять до обробника "
|
||||
"(handler) певного типу подій через вбудований обробник (handler) оновлень"
|
||||
|
|
|
|||
|
|
@ -3,15 +3,14 @@
|
|||
# This file is distributed under the same license as the aiogram package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2022.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: aiogram \n"
|
||||
"Project-Id-Version: aiogram\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-10-01 22:51+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"POT-Creation-Date: 2022-10-19 22:52+0300\n"
|
||||
"PO-Revision-Date: 2022-10-19 22:50+0300\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
|
@ -19,7 +18,7 @@ msgstr ""
|
|||
|
||||
#: ../../dispatcher/observer.rst:3
|
||||
msgid "Observer"
|
||||
msgstr ""
|
||||
msgstr "Обсервер"
|
||||
|
||||
#: ../../dispatcher/observer.rst:5
|
||||
msgid ""
|
||||
|
|
@ -27,74 +26,84 @@ msgid ""
|
|||
"part of internal API with some public methods and is recommended to don't"
|
||||
" use methods is not listed here."
|
||||
msgstr ""
|
||||
"Обсервер використовується для фільтрації та обробки різних подій. Це "
|
||||
"частина внутрішнього API з деякими публічними методами, тому "
|
||||
"рекомендується не використовувати методи, яких тут немає."
|
||||
|
||||
#: ../../dispatcher/observer.rst:7
|
||||
msgid "In `aiogram` framework is available two variants of observer:"
|
||||
msgstr ""
|
||||
msgstr "У фреймвоку `aiogram` доступні два варіанти обсервера:"
|
||||
|
||||
#: ../../dispatcher/observer.rst:9
|
||||
msgid "`EventObserver <#eventobserver>`__"
|
||||
msgstr ""
|
||||
msgstr "`EventObserver <#eventobserver>`__"
|
||||
|
||||
#: ../../dispatcher/observer.rst:10
|
||||
msgid "`TelegramEventObserver <#telegrameventobserver>`__"
|
||||
msgstr ""
|
||||
msgstr "`TelegramEventObserver <#telegrameventobserver>`__"
|
||||
|
||||
#: ../../dispatcher/observer.rst:14
|
||||
msgid "EventObserver"
|
||||
msgstr ""
|
||||
msgstr "EventObserver"
|
||||
|
||||
#: aiogram.dispatcher.event.event.EventObserver:1 of
|
||||
msgid "Simple events observer"
|
||||
msgstr ""
|
||||
msgstr "Простий обсервер(спостерігач) подій"
|
||||
|
||||
#: aiogram.dispatcher.event.event.EventObserver:3 of
|
||||
msgid ""
|
||||
"Is used for managing events is not related with Telegram (For example "
|
||||
"startup/shutdown processes)"
|
||||
msgstr ""
|
||||
"Використовується для керування подіями, не пов’язаними з Telegram "
|
||||
"(наприклад, запуску/вимкнення процесів)"
|
||||
|
||||
#: aiogram.dispatcher.event.event.EventObserver:5 of
|
||||
msgid "Handlers can be registered via decorator or method"
|
||||
msgstr ""
|
||||
msgstr "Обробники(Handler) можна зареєструвати за допомогою декоратора або методу"
|
||||
|
||||
#: aiogram.dispatcher.event.event.EventObserver.register:1 of
|
||||
msgid "Register callback with filters"
|
||||
msgstr ""
|
||||
msgstr "Реєстрація обробника(callback) з фільтрами"
|
||||
|
||||
#: aiogram.dispatcher.event.event.EventObserver.trigger:1 of
|
||||
msgid ""
|
||||
"Propagate event to handlers. Handler will be called when all its filters "
|
||||
"is pass."
|
||||
msgstr ""
|
||||
"Передача події обробникам подій(handler). Обробник буде викликано, коли "
|
||||
"всі його фільтри пройдено."
|
||||
|
||||
#: aiogram.dispatcher.event.event.EventObserver.__call__:1
|
||||
#: aiogram.dispatcher.event.telegram.TelegramEventObserver.__call__:1 of
|
||||
msgid "Decorator for registering event handlers"
|
||||
msgstr ""
|
||||
msgstr "Декоратор для реєстрації обробника подій(handler)"
|
||||
|
||||
#: ../../dispatcher/observer.rst:22
|
||||
msgid "TelegramEventObserver"
|
||||
msgstr ""
|
||||
msgstr "TelegramEventObserver"
|
||||
|
||||
#: aiogram.dispatcher.event.telegram.TelegramEventObserver:1 of
|
||||
msgid "Event observer for Telegram events"
|
||||
msgstr ""
|
||||
msgstr "Обсервер подій для подій Telegram"
|
||||
|
||||
#: aiogram.dispatcher.event.telegram.TelegramEventObserver:3 of
|
||||
msgid ""
|
||||
"Here you can register handler with filters or bounded filters which can "
|
||||
"be used as keyword arguments instead of writing full references when you "
|
||||
"register new handlers. This observer will stop event propagation when "
|
||||
"first handler is pass."
|
||||
"Here you can register handler with filter. This observer will stop event "
|
||||
"propagation when first handler is pass."
|
||||
msgstr ""
|
||||
"Тут Ви можете зареєструвати обробник(handler) із фільтрами. Цей обсервер "
|
||||
"зупинить розповсюдження події, коли справцює перший обробник(handler)."
|
||||
|
||||
#: aiogram.dispatcher.event.telegram.TelegramEventObserver.register:1 of
|
||||
msgid "Register event handler"
|
||||
msgstr ""
|
||||
msgstr "Реєстрація обробника подій(handler)"
|
||||
|
||||
#: aiogram.dispatcher.event.telegram.TelegramEventObserver.trigger:1 of
|
||||
msgid ""
|
||||
"Propagate event to handlers and stops propagation on first match. Handler"
|
||||
" will be called when all its filters is pass."
|
||||
msgstr ""
|
||||
"Передача події обробнику подій(handler) та зупинка при першому ж збігу. "
|
||||
"Обробник(handler) буде викликало, коли всі його фільтри пройдено."
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue