Remove filters factory, introduce docs translation (#978)

* Rewrite filters

* Update README.rst

* Fixed tests

* Small optimization of the Text filter (TY to @bomzheg)

* Remove dataclass slots argument in due to the only Python 3.10 has an slots argument

* Fixed mypy

* Update tests

* Disable Python 3.11

* Fixed #1013: Empty mention should be None instead of empty string.

* Added #990 to the changelog

* Added #942 to the changelog

* Fixed coverage

* Update poetry and dependencies

* Fixed mypy

* Remove deprecated code

* Added more tests, update pyproject.toml

* Partial update docs

* Added initial Docs translation files

* Added more changes

* Added log message when connection is established in polling process

* Fixed action

* Disable lint for PyPy

* Added changelog for docs translation
This commit is contained in:
Alex Root Junior 2022-10-02 00:04:31 +03:00 committed by GitHub
parent 94030903ec
commit f4251382e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
610 changed files with 61738 additions and 1687 deletions

View file

@ -0,0 +1,56 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/base.rst:5
msgid "BaseHandler"
msgstr ""
#: ../../dispatcher/class_based_handlers/base.rst:7
msgid ""
"Base handler is generic abstract class and should be used in all other "
"class-based handlers."
msgstr ""
#: ../../dispatcher/class_based_handlers/base.rst:9
msgid "Import: :code:`from aiogram.handler import BaseHandler`"
msgstr ""
#: ../../dispatcher/class_based_handlers/base.rst:11
msgid ""
"By default you will need to override only method :code:`async def "
"handle(self) -> Any: ...`"
msgstr ""
#: ../../dispatcher/class_based_handlers/base.rst:13
msgid ""
"This class is also have an default initializer and you don't need to "
"change it. Initializer accepts current event and all contextual data and "
"which can be accessed from the handler through attributes: :code:`event: "
"TelegramEvent` and :code:`data: Dict[Any, str]`"
msgstr ""
#: ../../dispatcher/class_based_handlers/base.rst:17
msgid ""
"If instance of the bot is specified in context data or current context it"
" can be accessed through *bot* class attribute."
msgstr ""
#: ../../dispatcher/class_based_handlers/base.rst:20
msgid "Example"
msgstr ""

View file

@ -0,0 +1,42 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/callback_query.rst:3
msgid "CallbackQueryHandler"
msgstr ""
#: aiogram.handlers.callback_query.CallbackQueryHandler:1 of
msgid "There is base class for callback query handlers."
msgstr ""
#: aiogram.handlers.callback_query.CallbackQueryHandler:13 of
msgid "Example:"
msgstr ""
#: aiogram.handlers.callback_query.CallbackQueryHandler.from_user:1 of
msgid "Is alias for `event.from_user`"
msgstr ""
#: aiogram.handlers.callback_query.CallbackQueryHandler.message:1 of
msgid "Is alias for `event.message`"
msgstr ""
#: aiogram.handlers.callback_query.CallbackQueryHandler.callback_data:1 of
msgid "Is alias for `event.data`"
msgstr ""

View file

@ -0,0 +1,44 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/chat_member.rst:3
msgid "ChatMemberHandler"
msgstr ""
#: ../../dispatcher/class_based_handlers/chat_member.rst:5
msgid "There is base class for chat member updated events."
msgstr ""
#: ../../dispatcher/class_based_handlers/chat_member.rst:8
msgid "Simple usage"
msgstr ""
#: ../../dispatcher/class_based_handlers/chat_member.rst:23
msgid "Extension"
msgstr ""
#: ../../dispatcher/class_based_handlers/chat_member.rst:25
msgid ""
"This base handler is subclass of :ref:`BaseHandler <cbh-base-handler>` "
"with some extensions:"
msgstr ""
#: ../../dispatcher/class_based_handlers/chat_member.rst:27
msgid ":code:`self.chat` is alias for :code:`self.event.chat`"
msgstr ""

View file

@ -0,0 +1,48 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:3
msgid "ChosenInlineResultHandler"
msgstr ""
#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:5
msgid "There is base class for chosen inline result handlers."
msgstr ""
#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:8
msgid "Simple usage"
msgstr ""
#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:22
msgid "Extension"
msgstr ""
#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:24
msgid ""
"This base handler is subclass of :ref:`BaseHandler <cbh-base-handler>` "
"with some extensions:"
msgstr ""
#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:26
msgid ":code:`self.chat` is alias for :code:`self.event.chat`"
msgstr ""
#: ../../dispatcher/class_based_handlers/chosen_inline_result.rst:27
msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`"
msgstr ""

View file

@ -0,0 +1,50 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/error.rst:3
msgid "ErrorHandler"
msgstr ""
#: ../../dispatcher/class_based_handlers/error.rst:5
msgid "There is base class for error handlers."
msgstr ""
#: ../../dispatcher/class_based_handlers/error.rst:8
msgid "Simple usage"
msgstr ""
#: ../../dispatcher/class_based_handlers/error.rst:27
msgid "Extension"
msgstr ""
#: ../../dispatcher/class_based_handlers/error.rst:29
msgid ""
"This base handler is subclass of :ref:`BaseHandler <cbh-base-handler>` "
"with some extensions:"
msgstr ""
#: ../../dispatcher/class_based_handlers/error.rst:31
msgid ""
":code:`self.exception_name` is alias for "
":code:`self.event.__class__.__name__`"
msgstr ""
#: ../../dispatcher/class_based_handlers/error.rst:32
msgid ":code:`self.exception_message` is alias for :code:`str(self.event)`"
msgstr ""

View file

@ -0,0 +1,42 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/index.rst:3
msgid "Class based handlers"
msgstr ""
#: ../../dispatcher/class_based_handlers/index.rst:5
msgid ""
"A handler is a async callable which takes a event with contextual data "
"and returns a response."
msgstr ""
#: ../../dispatcher/class_based_handlers/index.rst:7
msgid ""
"In **aiogram** it can be more than just an async function, these allow "
"you to use classes which can be used as Telegram event handlers to "
"structure your event handlers and reuse code by harnessing inheritance "
"and mixins."
msgstr ""
#: ../../dispatcher/class_based_handlers/index.rst:10
msgid ""
"There are some base class based handlers what you need to use in your own"
" handlers:"
msgstr ""

View file

@ -0,0 +1,48 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/inline_query.rst:3
msgid "InlineQueryHandler"
msgstr ""
#: ../../dispatcher/class_based_handlers/inline_query.rst:5
msgid "There is base class for inline query handlers."
msgstr ""
#: ../../dispatcher/class_based_handlers/inline_query.rst:8
msgid "Simple usage"
msgstr ""
#: ../../dispatcher/class_based_handlers/inline_query.rst:22
msgid "Extension"
msgstr ""
#: ../../dispatcher/class_based_handlers/inline_query.rst:24
msgid ""
"This base handler is subclass of :ref:`BaseHandler <cbh-base-handler>` "
"with some extensions:"
msgstr ""
#: ../../dispatcher/class_based_handlers/inline_query.rst:26
msgid ":code:`self.chat` is alias for :code:`self.event.chat`"
msgstr ""
#: ../../dispatcher/class_based_handlers/inline_query.rst:27
msgid ":code:`self.query` is alias for :code:`self.event.query`"
msgstr ""

View file

@ -0,0 +1,48 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/message.rst:3
msgid "MessageHandler"
msgstr ""
#: ../../dispatcher/class_based_handlers/message.rst:5
msgid "There is base class for message handlers."
msgstr ""
#: ../../dispatcher/class_based_handlers/message.rst:8
msgid "Simple usage"
msgstr ""
#: ../../dispatcher/class_based_handlers/message.rst:22
msgid "Extension"
msgstr ""
#: ../../dispatcher/class_based_handlers/message.rst:24
msgid ""
"This base handler is subclass of [BaseHandler](basics.md#basehandler) "
"with some extensions:"
msgstr ""
#: ../../dispatcher/class_based_handlers/message.rst:26
msgid ":code:`self.chat` is alias for :code:`self.event.chat`"
msgstr ""
#: ../../dispatcher/class_based_handlers/message.rst:27
msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`"
msgstr ""

View file

@ -0,0 +1,48 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/poll.rst:3
msgid "PollHandler"
msgstr ""
#: ../../dispatcher/class_based_handlers/poll.rst:5
msgid "There is base class for poll handlers."
msgstr ""
#: ../../dispatcher/class_based_handlers/poll.rst:8
msgid "Simple usage"
msgstr ""
#: ../../dispatcher/class_based_handlers/poll.rst:21
msgid "Extension"
msgstr ""
#: ../../dispatcher/class_based_handlers/poll.rst:23
msgid ""
"This base handler is subclass of :ref:`BaseHandler <cbh-base-handler>` "
"with some extensions:"
msgstr ""
#: ../../dispatcher/class_based_handlers/poll.rst:25
msgid ":code:`self.question` is alias for :code:`self.event.question`"
msgstr ""
#: ../../dispatcher/class_based_handlers/poll.rst:26
msgid ":code:`self.options` is alias for :code:`self.event.options`"
msgstr ""

View file

@ -0,0 +1,44 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:3
msgid "PreCheckoutQueryHandler"
msgstr ""
#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:5
msgid "There is base class for callback query handlers."
msgstr ""
#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:8
msgid "Simple usage"
msgstr ""
#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:21
msgid "Extension"
msgstr ""
#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:23
msgid ""
"This base handler is subclass of :ref:`BaseHandler <cbh-base-handler>` "
"with some extensions:"
msgstr ""
#: ../../dispatcher/class_based_handlers/pre_checkout_query.rst:25
msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`"
msgstr ""

View file

@ -0,0 +1,44 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/class_based_handlers/shipping_query.rst:3
msgid "ShippingQueryHandler"
msgstr ""
#: ../../dispatcher/class_based_handlers/shipping_query.rst:5
msgid "There is base class for callback query handlers."
msgstr ""
#: ../../dispatcher/class_based_handlers/shipping_query.rst:8
msgid "Simple usage"
msgstr ""
#: ../../dispatcher/class_based_handlers/shipping_query.rst:21
msgid "Extension"
msgstr ""
#: ../../dispatcher/class_based_handlers/shipping_query.rst:23
msgid ""
"This base handler is subclass of :ref:`BaseHandler <cbh-base-handler>` "
"with some extensions:"
msgstr ""
#: ../../dispatcher/class_based_handlers/shipping_query.rst:25
msgid ":code:`self.from_user` is alias for :code:`self.event.from_user`"
msgstr ""

View file

@ -0,0 +1,144 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/dispatcher.rst:3
msgid "Dispatcher"
msgstr ""
#: ../../dispatcher/dispatcher.rst:5
msgid ""
"Dispatcher is root :obj:`Router` and in code Dispatcher can be used "
"directly for routing updates or attach another routers into dispatcher."
msgstr ""
#: ../../dispatcher/dispatcher.rst:7
msgid ""
"Here is only listed base information about Dispatcher. All about writing "
"handlers, filters and etc. you can found in next pages:"
msgstr ""
#: ../../dispatcher/dispatcher.rst:9
msgid "`Router <router.html>`__"
msgstr ""
#: ../../dispatcher/dispatcher.rst:10
msgid "`Observer <observer.html>`__"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher:1
#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:1 of
msgid "Root router"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.__init__
#: aiogram.dispatcher.dispatcher.Dispatcher.feed_raw_update
#: aiogram.dispatcher.dispatcher.Dispatcher.feed_update
#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling
#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling of
msgid "Parameters"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:3 of
msgid "Storage for FSM"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:4 of
msgid "FSM strategy"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:5 of
msgid "Events isolation"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:6 of
msgid ""
"Disable FSM, note that if you disable FSM then you should not use storage"
" and events isolation"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.__init__:8 of
msgid "Other arguments, will be passed as keyword arguments to handlers"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.feed_raw_update:1 of
msgid ""
"Main entry point for incoming updates with automatic Dict->Update "
"serializer"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.feed_update:1 of
msgid ""
"Main entry point for incoming updates Response of this method can be used"
" as Webhook response"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:1 of
msgid "Run many bots with polling"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:3 of
msgid "Bot instances"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:4 of
msgid "Poling timeout"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:6 of
msgid "Run task for each event and no wait result"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:7 of
msgid "List of the update types you want your bot to receive"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling:8 of
msgid "contextual data"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.run_polling
#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling of
msgid "Returns"
msgstr ""
#: aiogram.dispatcher.dispatcher.Dispatcher.start_polling:1 of
msgid "Polling runner"
msgstr ""
#: ../../dispatcher/dispatcher.rst:18
msgid "Simple usage"
msgstr ""
#: ../../dispatcher/dispatcher.rst:20 ../../dispatcher/dispatcher.rst:33
msgid "Example:"
msgstr ""
#: ../../dispatcher/dispatcher.rst:31
msgid "Including routers"
msgstr ""
#: ../../dispatcher/dispatcher.rst:43
msgid "Handling updates"
msgstr ""
#: ../../dispatcher/dispatcher.rst:45
msgid ""
"All updates can be propagated to the dispatcher by "
":obj:`Dispatcher.feed_update(bot=..., update=...)` method:"
msgstr ""

View file

@ -0,0 +1,160 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/filters/callback_data.rst:3
msgid "Callback Data Factory & Filter"
msgstr ""
#: aiogram.filters.callback_data.CallbackData:1 of
msgid "Base class for callback data wrapper"
msgstr ""
#: aiogram.filters.callback_data.CallbackData:3 of
msgid "This class should be used as super-class of user-defined callbacks."
msgstr ""
#: aiogram.filters.callback_data.CallbackData:5 of
msgid ""
"The class-keyword :code:`prefix` is required to define prefix and also "
"the argument :code:`sep` can be passed to define separator (default is "
":code:`:`)."
msgstr ""
#: aiogram.filters.callback_data.CallbackData.pack:1 of
msgid "Generate callback data string"
msgstr ""
#: aiogram.filters.callback_data.CallbackData.filter
#: aiogram.filters.callback_data.CallbackData.pack
#: aiogram.filters.callback_data.CallbackData.unpack of
msgid "Returns"
msgstr ""
#: aiogram.filters.callback_data.CallbackData.pack:3 of
msgid "valid callback data for Telegram Bot API"
msgstr ""
#: aiogram.filters.callback_data.CallbackData.unpack:1 of
msgid "Parse callback data string"
msgstr ""
#: aiogram.filters.callback_data.CallbackData.filter
#: aiogram.filters.callback_data.CallbackData.unpack of
msgid "Parameters"
msgstr ""
#: aiogram.filters.callback_data.CallbackData.unpack:3 of
msgid "value from Telegram"
msgstr ""
#: aiogram.filters.callback_data.CallbackData.unpack:4 of
msgid "instance of CallbackData"
msgstr ""
#: aiogram.filters.callback_data.CallbackData.filter:1 of
msgid "Generates a filter for callback query with rule"
msgstr ""
#: aiogram.filters.callback_data.CallbackData.filter:3 of
msgid "magic rule"
msgstr ""
#: aiogram.filters.callback_data.CallbackData.filter:4 of
msgid "instance of filter"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:11
msgid "Usage"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:13
msgid "Create subclass of :code:`CallbackData`:"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:21
msgid "After that you can generate any callback based on this class, for example:"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:29
msgid ""
"So... Now you can use this class to generate any callbacks with defined "
"structure"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:41
msgid "... and handle by specific rules"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:52
msgid "Also can be used in :doc:`Keyboard builder </utils/keyboard>`:"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:63
msgid "Another abstract example:"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:101
msgid "Known limitations"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:103
msgid "Allowed types and their subclasses:"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:105
msgid ":code:`str`"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:106
msgid ":code:`int`"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:107
msgid ":code:`bool`"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:108
msgid ":code:`float`"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:109
msgid ":code:`Decimal` (:code:`from decimal import Decimal`)"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:110
msgid ":code:`Fraction` (:code:`from fractions import Fraction`)"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:111
msgid ":code:`UUID` (:code:`from uuid import UUID`)"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:112
msgid ":code:`Enum` (:code:`from enum import Enum`, only for string enums)"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:113
msgid ":code:`IntEnum` (:code:`from enum import IntEnum`, only for int enums)"
msgstr ""
#: ../../dispatcher/filters/callback_data.rst:118
msgid ""
"Note that the integer Enum's should be always is subclasses of "
":code:`IntEnum` in due to parsing issues."
msgstr ""

View file

@ -0,0 +1,224 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/filters/chat_member_updated.rst:3
msgid "ChatMemberUpdated"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:10
msgid ""
"You can import from :code:`aiogram.filters` all available variants of "
"`statuses`_, `status groups`_ or `transitions`_:"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:14
msgid "Statuses"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:17
#: ../../dispatcher/filters/chat_member_updated.rst:42
#: ../../dispatcher/filters/chat_member_updated.rst:62
msgid "name"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:17
#: ../../dispatcher/filters/chat_member_updated.rst:42
#: ../../dispatcher/filters/chat_member_updated.rst:62
msgid "Description"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:19
msgid ":code:`CREATOR`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:19
msgid "Chat owner"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:21
msgid ":code:`ADMINISTRATOR`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:21
msgid "Chat administrator"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:23
msgid ":code:`MEMBER`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:23
msgid "Member of the chat"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:25
msgid ":code:`RESTRICTED`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:25
msgid "Restricted user (can be not member)"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:27
msgid ":code:`LEFT`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:27
msgid "Isn't member of the chat"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:29
msgid ":code:`KICKED`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:29
msgid "Kicked member by administrators"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:32
msgid ""
"Statuses can be extended with `is_member` flag by prefixing with "
":code:`+` (for :code:`is_member == True)` or :code:`-` (for "
":code:`is_member == False`) symbol, like :code:`+RESTRICTED` or "
":code:`-RESTRICTED`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:37
msgid "Status groups"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:39
msgid ""
"The particular statuses can be combined via bitwise :code:`or` operator, "
"like :code:`CREATOR | ADMINISTRATOR`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:44
msgid ":code:`IS_MEMBER`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:44
msgid ""
"Combination of :code:`(CREATOR | ADMINISTRATOR | MEMBER | +RESTRICTED)` "
"statuses."
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:46
msgid ":code:`IS_ADMIN`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:46
msgid "Combination of :code:`(CREATOR | ADMINISTRATOR)` statuses."
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:48
msgid ":code:`IS_NOT_MEMBER`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:48
msgid "Combination of :code:`(LEFT | KICKED | -RESTRICTED)` statuses."
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:52
msgid "Transitions"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:54
msgid ""
"Transitions can be defined via bitwise shift operators :code:`>>` and "
":code:`<<`. Old chat member status should be defined in the left side for"
" :code:`>>` operator (right side for :code:`<<`) and new status should be"
" specified on the right side for :code:`>>` operator (left side for "
":code:`<<`)"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:58
msgid ""
"The direction of transition can be changed via bitwise inversion "
"operator: :code:`~JOIN_TRANSITION` will produce swap of old and new "
"statuses."
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:64
msgid ":code:`JOIN_TRANSITION`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:64
msgid ""
"Means status changed from :code:`IS_NOT_MEMBER` to :code:`IS_MEMBER` "
"(:code:`IS_NOT_MEMBER >> IS_MEMBER`)"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:67
msgid ":code:`LEAVE_TRANSITION`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:67
msgid ""
"Means status changed from :code:`IS_MEMBER` to :code:`IS_NOT_MEMBER` "
"(:code:`~JOIN_TRANSITION`)"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:70
msgid ":code:`PROMOTED_TRANSITION`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:70
msgid ""
"Means status changed from :code:`(MEMBER | RESTRICTED | LEFT | KICKED) >>"
" ADMINISTRATOR` (:code:`(MEMBER | RESTRICTED | LEFT | KICKED) >> "
"ADMINISTRATOR`)"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:77
msgid ""
"Note that if you define the status unions (via :code:`|`) you will need "
"to add brackets for the statement before use shift operator in due to "
"operator priorities."
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:81
msgid "Usage"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:83
msgid "Handle user leave or join events"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:95
msgid ""
"Or construct your own terms via using pre-defined set of statuses and "
"transitions."
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:98
msgid "Allowed handlers"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:100
msgid "Allowed update types for this filter:"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:102
msgid "`my_chat_member`"
msgstr ""
#: ../../dispatcher/filters/chat_member_updated.rst:103
msgid "`chat_member`"
msgstr ""

View file

@ -0,0 +1,156 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/filters/command.rst:3
msgid "Command"
msgstr ""
#: aiogram.filters.command.Command:1 of
msgid "This filter can be helpful for handling commands from the text messages."
msgstr ""
#: aiogram.filters.command.Command:3 of
msgid ""
"Works only with :class:`aiogram.types.message.Message` events which have "
"the :code:`text`."
msgstr ""
#: aiogram.filters.command.Command.__init__:1 of
msgid "List of commands (string or compiled regexp patterns)"
msgstr ""
#: aiogram.filters.command.Command.__init__ of
msgid "Parameters"
msgstr ""
#: aiogram.filters.command.Command.__init__:3 of
msgid ""
"Prefix for command. Prefix is always a single char but here you can pass "
"all of allowed prefixes, for example: :code:`\"/!\"` will work with "
"commands prefixed by :code:`\"/\"` or :code:`\"!\"`."
msgstr ""
#: aiogram.filters.command.Command.__init__:7 of
msgid "Ignore case (Does not work with regexp, use flags instead)"
msgstr ""
#: aiogram.filters.command.Command.__init__:8 of
msgid ""
"Ignore bot mention. By default, bot can not handle commands intended for "
"other bots"
msgstr ""
#: aiogram.filters.command.Command.__init__:10 of
msgid "Validate command object via Magic filter after all checks done"
msgstr ""
#: ../../dispatcher/filters/command.rst:10
msgid ""
"When filter is passed the :class:`aiogram.filters.command.CommandObject` "
"will be passed to the handler argument :code:`command`"
msgstr ""
#: aiogram.filters.command.CommandObject:1 of
msgid ""
"Instance of this object is always has command and it prefix. Can be "
"passed as keyword argument **command** to the handler"
msgstr ""
#: ../../docstring aiogram.filters.command.CommandObject.prefix:1 of
msgid "Command prefix"
msgstr ""
#: ../../docstring aiogram.filters.command.CommandObject.command:1 of
msgid "Command without prefix and mention"
msgstr ""
#: ../../docstring aiogram.filters.command.CommandObject.mention:1 of
msgid "Mention (if available)"
msgstr ""
#: ../../docstring aiogram.filters.command.CommandObject.args:1 of
msgid "Command argument"
msgstr ""
#: ../../docstring aiogram.filters.command.CommandObject.regexp_match:1 of
msgid ""
"Will be presented match result if the command is presented as regexp in "
"filter"
msgstr ""
#: aiogram.filters.command.CommandObject.mentioned:1 of
msgid "This command has mention?"
msgstr ""
#: aiogram.filters.command.CommandObject.text:1 of
msgid "Generate original text from object"
msgstr ""
#: ../../dispatcher/filters/command.rst:19
msgid "Usage"
msgstr ""
#: ../../dispatcher/filters/command.rst:21
msgid "Filter single variant of commands: :code:`Command(\"start\")`"
msgstr ""
#: ../../dispatcher/filters/command.rst:22
msgid ""
"Handle command by regexp pattern: "
":code:`Command(re.compile(r\"item_(\\d+)\"))`"
msgstr ""
#: ../../dispatcher/filters/command.rst:23
msgid ""
"Match command by multiple variants: :code:`Command(\"item\", "
"re.compile(r\"item_(\\d+)\"))`"
msgstr ""
#: ../../dispatcher/filters/command.rst:24
msgid ""
"Handle commands in public chats intended for other bots: "
":code:`Command(\"command\", ignore_mention=True)`"
msgstr ""
#: ../../dispatcher/filters/command.rst:25
msgid ""
"Use :class:`aiogram.types.bot_command.BotCommand` object as command "
"reference :code:`Command(BotCommand(command=\"command\", description=\"My"
" awesome command\")`"
msgstr ""
#: ../../dispatcher/filters/command.rst:29
msgid "Command cannot include spaces or any whitespace"
msgstr ""
#: ../../dispatcher/filters/command.rst:32
msgid "Allowed handlers"
msgstr ""
#: ../../dispatcher/filters/command.rst:34
msgid "Allowed update types for this filter:"
msgstr ""
#: ../../dispatcher/filters/command.rst:36
msgid "`message`"
msgstr ""
#: ../../dispatcher/filters/command.rst:37
msgid "`edited_message`"
msgstr ""

View file

@ -0,0 +1,46 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/filters/exception.rst:3
msgid "Exceptions"
msgstr ""
#: ../../dispatcher/filters/exception.rst:5
msgid "This filters can be helpful for handling errors from the text messages."
msgstr ""
#: aiogram.filters.exception.ExceptionTypeFilter:1 of
msgid "Allows to match exception by type"
msgstr ""
#: aiogram.filters.exception.ExceptionMessageFilter:1 of
msgid "Allow to match exception by message"
msgstr ""
#: ../../dispatcher/filters/exception.rst:18
msgid "Allowed handlers"
msgstr ""
#: ../../dispatcher/filters/exception.rst:20
msgid "Allowed update types for this filters:"
msgstr ""
#: ../../dispatcher/filters/exception.rst:22
msgid ":code:`error`"
msgstr ""

View file

@ -0,0 +1,128 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/filters/index.rst:3
msgid "Filtering events"
msgstr ""
#: ../../dispatcher/filters/index.rst:5
msgid ""
"Filters is needed for routing updates to the specific handler. Searching "
"of handler is always stops on first match set of filters are pass."
msgstr ""
#: ../../dispatcher/filters/index.rst:8
msgid "*aiogram* has some builtin useful filters."
msgstr ""
#: ../../dispatcher/filters/index.rst:11
msgid "Builtin filters"
msgstr ""
#: ../../dispatcher/filters/index.rst:13
msgid "Here is list of builtin filters:"
msgstr ""
#: ../../dispatcher/filters/index.rst:27
msgid "Writing own filters"
msgstr ""
#: ../../dispatcher/filters/index.rst:29
msgid "Filters can be:"
msgstr ""
#: ../../dispatcher/filters/index.rst:31
msgid "Asynchronous function (:code:`async def my_filter(*args, **kwargs): pass`)"
msgstr ""
#: ../../dispatcher/filters/index.rst:32
msgid "Synchronous function (:code:`def my_filter(*args, **kwargs): pass`)"
msgstr ""
#: ../../dispatcher/filters/index.rst:33
msgid "Anonymous function (:code:`lambda event: True`)"
msgstr ""
#: ../../dispatcher/filters/index.rst:34
msgid "Any awaitable object"
msgstr ""
#: ../../dispatcher/filters/index.rst:35
msgid "Subclass of :class:`aiogram.filters.base.Filter`"
msgstr ""
#: ../../dispatcher/filters/index.rst:36
msgid "Instances of :ref:`MagicFilter <magic-filters>`"
msgstr ""
#: ../../dispatcher/filters/index.rst:38
msgid ""
"and should return bool or dict. If the dictionary is passed as result of "
"filter - resulted data will be propagated to the next filters and handler"
" as keywords arguments."
msgstr ""
#: ../../dispatcher/filters/index.rst:43
msgid "Base class for own filters"
msgstr ""
#: aiogram.filters.base.Filter:1 of
msgid ""
"If you want to register own filters like builtin filters you will need to"
" write subclass of this class with overriding the :code:`__call__` method"
" and adding filter attributes."
msgstr ""
#: aiogram.filters.base.Filter.__call__:1 of
msgid "This method should be overridden."
msgstr ""
#: aiogram.filters.base.Filter.__call__:3 of
msgid "Accepts incoming event and should return boolean or dict."
msgstr ""
#: aiogram.filters.base.Filter.__call__ of
msgid "Returns"
msgstr ""
#: aiogram.filters.base.Filter.__call__:5 of
msgid ":class:`bool` or :class:`Dict[str, Any]`"
msgstr ""
#: aiogram.filters.base.Filter.update_handler_flags:1 of
msgid ""
"Also if you want to extend handler flags with using this filter you "
"should implement this method"
msgstr ""
#: aiogram.filters.base.Filter.update_handler_flags of
msgid "Parameters"
msgstr ""
#: aiogram.filters.base.Filter.update_handler_flags:3 of
msgid "existing flags, can be updated directly"
msgstr ""
#: ../../dispatcher/filters/index.rst:51
msgid "Own filter example"
msgstr ""
#: ../../dispatcher/filters/index.rst:53
msgid "For example if you need to make simple text filter:"
msgstr ""

View file

@ -0,0 +1,114 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/filters/magic_data.rst:3
msgid "MagicData"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:10
msgid "Can be imported:"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:12
msgid ":code:`from aiogram.filters import MagicData`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:14
msgid ""
"Or used from filters factory by passing corresponding arguments to "
"handler registration line"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:17
msgid "Usage"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:19
msgid ""
":code:`MagicData(F.event.from_user.id == F.config.admin_id)` (Note that "
":code:`config` should be passed from middleware)"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:23
msgid "Allowed handlers"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:25
msgid "Allowed update types for this filter:"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:27
msgid ":code:`message`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:28
msgid ":code:`edited_message`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:29
msgid ":code:`channel_post`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:30
msgid ":code:`edited_channel_post`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:31
msgid ":code:`inline_query`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:32
msgid ":code:`chosen_inline_result`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:33
msgid ":code:`callback_query`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:34
msgid ":code:`shipping_query`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:35
msgid ":code:`pre_checkout_query`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:36
msgid ":code:`poll`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:37
msgid ":code:`poll_answer`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:38
msgid ":code:`my_chat_member`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:39
msgid ":code:`chat_member`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:40
msgid ":code:`chat_join_request`"
msgstr ""
#: ../../dispatcher/filters/magic_data.rst:41
msgid ":code:`error`"
msgstr ""

View file

@ -0,0 +1,175 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/filters/magic_filters.rst:5
msgid "Magic filters"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:9
msgid "This page still in progress. Has many incorrectly worded sentences."
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:11
msgid "Is external package maintained by *aiogram* core team."
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:13
msgid ""
"By default installs with *aiogram* and also is available on `PyPi - "
"magic-filter <https://pypi.org/project/magic-filter/>`_. That's mean you "
"can install it and use with any other libraries and in own projects "
"without depending *aiogram* installed."
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:17
msgid "Usage"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:19
msgid ""
"The **magic_filter** package implements class shortly named "
":class:`magic_filter.F` that's mean :code:`F` can be imported from "
":code:`aiogram` or :code:`magic_filter`. :class:`F` is alias for "
":class:`MagicFilter`."
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:23
msgid ""
"Note that *aiogram* has an small extension over magic-filter and if you "
"want to use this extension you should import magic from *aiogram* instead"
" of *magic_filter* package"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:25
msgid ""
"The :class:`MagicFilter` object is callable, supports :ref:`some actions "
"<magic-filter-possible-actions>` and memorize the attributes chain and "
"the action which should be checked on demand."
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:28
msgid ""
"So that's mean you can chain attribute getters, describe simple data "
"validations and then call the resulted object passing single object as "
"argument, for example make attributes chain :code:`F.foo.bar.baz` then "
"add action ':code:`F.foo.bar.baz == 'spam'` and then call the resulted "
"object - :code:`(F.foo.bar.baz == 'spam').resolve(obj)`"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:36
msgid "Possible actions"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:38
msgid ""
"Magic filter object supports some of basic logical operations over object"
" attributes"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:41
msgid "Exists or not None"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:43
msgid "Default actions."
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:50
msgid "Equals"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:58
msgid "Is one of"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:60
msgid ""
"Can be used as method named :code:`in_` or as matmul operator :code:`@` "
"with any iterable"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:68
msgid "Contains"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:75
msgid "String startswith/endswith"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:77
msgid "Can be applied only for text attributes"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:85
msgid "Regexp"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:92
msgid "Custom function"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:94
msgid "Accepts any callable. Callback will be called when filter checks result"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:101
msgid "Inverting result"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:103
msgid ""
"Any of available operation can be inverted by bitwise inversion - "
":code:`~`"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:111
msgid "Combining"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:113
msgid ""
"All operations can be combined via bitwise and/or operators - "
":code:`&`/:code:`|`"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:123
msgid "Attribute modifiers - string manipulations"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:125
msgid "Make text upper- or lower-case"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:127
msgid "Can be used only with string attributes."
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:137
msgid "Get filter result as handler argument"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:139
msgid ""
"This part is not available in *magic-filter* directly but can be used "
"with *aiogram*"
msgstr ""
#: ../../dispatcher/filters/magic_filters.rst:152
msgid "Usage in *aiogram*"
msgstr ""

View file

@ -0,0 +1,136 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/filters/text.rst:3
msgid "Text"
msgstr ""
#: aiogram.filters.text.Text:1 of
msgid ""
"Is useful for filtering text :class:`aiogram.types.message.Message`, any "
":class:`aiogram.types.callback_query.CallbackQuery` with `data`, "
":class:`aiogram.types.inline_query.InlineQuery` or "
":class:`aiogram.types.poll.Poll` question."
msgstr ""
#: aiogram.filters.text.Text:7 of
msgid ""
"Only one of `text`, `contains`, `startswith` or `endswith` argument can "
"be used at once. Any of that arguments can be string, list, set or tuple "
"of strings."
msgstr ""
#: aiogram.filters.text.Text:12 of
msgid ""
"use :ref:`magic-filter <magic-filters>`. For example do :pycode:`F.text "
"== \"text\"` instead"
msgstr ""
#: ../../dispatcher/filters/text.rst:10
msgid "Can be imported:"
msgstr ""
#: ../../dispatcher/filters/text.rst:12
msgid ":code:`from aiogram.filters.text import Text`"
msgstr ""
#: ../../dispatcher/filters/text.rst:13
msgid ":code:`from aiogram.filters import Text`"
msgstr ""
#: ../../dispatcher/filters/text.rst:15
msgid ""
"Or used from filters factory by passing corresponding arguments to "
"handler registration line"
msgstr ""
#: ../../dispatcher/filters/text.rst:18
msgid "Usage"
msgstr ""
#: ../../dispatcher/filters/text.rst:20
msgid ""
"Text equals with the specified value: :code:`Text(text=\"text\") # value"
" == 'text'`"
msgstr ""
#: ../../dispatcher/filters/text.rst:21
msgid ""
"Text starts with the specified value: :code:`Text(startswith=\"text\") #"
" value.startswith('text')`"
msgstr ""
#: ../../dispatcher/filters/text.rst:22
msgid ""
"Text ends with the specified value: :code:`Text(endswith=\"text\") # "
"value.endswith('text')`"
msgstr ""
#: ../../dispatcher/filters/text.rst:23
msgid ""
"Text contains the specified value: :code:`Text(contains=\"text\") # "
"value in 'text'`"
msgstr ""
#: ../../dispatcher/filters/text.rst:24
msgid ""
"Any of previous listed filters can be list, set or tuple of strings "
"that's mean any of listed value should be "
"equals/startswith/endswith/contains: :code:`Text(text=[\"text\", "
"\"spam\"])`"
msgstr ""
#: ../../dispatcher/filters/text.rst:25
msgid ""
"Ignore case can be combined with any previous listed filter: "
":code:`Text(text=\"Text\", ignore_case=True) # value.lower() == "
"'text'.lower()`"
msgstr ""
#: ../../dispatcher/filters/text.rst:28
msgid "Allowed handlers"
msgstr ""
#: ../../dispatcher/filters/text.rst:30
msgid "Allowed update types for this filter:"
msgstr ""
#: ../../dispatcher/filters/text.rst:32
msgid ":code:`message`"
msgstr ""
#: ../../dispatcher/filters/text.rst:33
msgid ":code:`edited_message`"
msgstr ""
#: ../../dispatcher/filters/text.rst:34
msgid ":code:`channel_post`"
msgstr ""
#: ../../dispatcher/filters/text.rst:35
msgid ":code:`edited_channel_post`"
msgstr ""
#: ../../dispatcher/filters/text.rst:36
msgid ":code:`inline_query`"
msgstr ""
#: ../../dispatcher/filters/text.rst:37
msgid ":code:`callback_query`"
msgstr ""

View file

@ -0,0 +1,130 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/finite_state_machine/index.rst:3
msgid "Finite State Machine"
msgstr ""
#: ../../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."
msgstr ""
#: ../../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."
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."
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:19
msgid "Source: `WikiPedia <wiki>`_"
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:22
msgid "Usage example"
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."
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:-1
msgid "FSM Example"
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:31
msgid "Let's see how to do that step-by-step"
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:34
msgid "Step by step"
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"
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:44
msgid "And then write handler for each state separately from the start of dialog"
msgstr ""
#: ../../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`"
msgstr ""
#: ../../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."
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"
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:64
msgid "Handle :code:`yes` and soon we need to handle :code:`Form.language` state"
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:72
msgid "Handle :code:`no`"
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:80
msgid "And handle any other answers"
msgstr ""
#: ../../dispatcher/finite_state_machine/index.rst:88
msgid ""
"All possible cases of `like_bots` step was covered, let's implement "
"finally step"
msgstr ""
#: ../../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 ""
#: ../../dispatcher/finite_state_machine/index.rst:112
msgid "Read more"
msgstr ""

View file

@ -0,0 +1,222 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/finite_state_machine/storages.rst:3
msgid "Storages"
msgstr ""
#: ../../dispatcher/finite_state_machine/storages.rst:6
msgid "Storages out of the box"
msgstr ""
#: ../../dispatcher/finite_state_machine/storages.rst:9
msgid "MemoryStorage"
msgstr ""
#: aiogram.fsm.storage.memory.MemoryStorage:1 of
msgid ""
"Default FSM storage, stores all data in :class:`dict` and loss everything"
" on shutdown"
msgstr ""
#: 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 ""
#: ../../dispatcher/finite_state_machine/storages.rst:16
msgid "RedisStorage"
msgstr ""
#: aiogram.fsm.storage.redis.RedisStorage:1 of
msgid ""
"Redis storage required :code:`aioredis` package installed (:code:`pip "
"install aioredis`)"
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
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 ""
#: aiogram.fsm.storage.base.BaseStorage.get_data:3
#: aiogram.fsm.storage.base.BaseStorage.get_state:3
#: aiogram.fsm.storage.base.BaseStorage.set_data:3
#: aiogram.fsm.storage.base.BaseStorage.set_state:3
#: aiogram.fsm.storage.base.BaseStorage.update_data:3 of
msgid "instance of the current bot"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.get_data:4
#: aiogram.fsm.storage.base.BaseStorage.get_state:4
#: aiogram.fsm.storage.base.BaseStorage.set_data:4
#: aiogram.fsm.storage.base.BaseStorage.set_state:4
#: aiogram.fsm.storage.base.BaseStorage.update_data:4 of
msgid "storage key"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.set_state:5 of
msgid "new state"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.get_state:1 of
msgid "Get key state"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.get_state:5 of
msgid "current state"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.set_data:1 of
msgid "Write data (replace)"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.set_data:5
#: aiogram.fsm.storage.base.BaseStorage.update_data:6 of
msgid "new data"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.get_data:1 of
msgid "Get current data for key"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.get_data:5 of
msgid "current data"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.update_data:1 of
msgid "Update date in the storage for key (like dict.update)"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.update_data:5 of
msgid "partial data"
msgstr ""
#: aiogram.fsm.storage.base.BaseStorage.close:1 of
msgid "Close storage (database connection, file or etc.)"
msgstr ""

View file

@ -0,0 +1,78 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/flags.rst:3
msgid "Flags"
msgstr ""
#: ../../dispatcher/flags.rst:5
msgid ""
"Flags is a markers for handlers that can be used in `middlewares <#use-"
"in-middlewares>`_ or special `utilities <#use-in-utilities>`_ to make "
"classification of the handlers."
msgstr ""
#: ../../dispatcher/flags.rst:8
msgid ""
"Flags can be added to the handler via `decorators <#via-decorators>`_, "
"`handlers registration <#via-handler-registration-method>`_ or `filters "
"<via-filters>`_."
msgstr ""
#: ../../dispatcher/flags.rst:13
msgid "Via decorators"
msgstr ""
#: ../../dispatcher/flags.rst:15
msgid "For example mark handler with `chat_action` flag"
msgstr ""
#: ../../dispatcher/flags.rst:24
msgid "Or just for rate-limit or something else"
msgstr ""
#: ../../dispatcher/flags.rst:34
msgid "Via handler registration method"
msgstr ""
#: ../../dispatcher/flags.rst:41
msgid "Via filters"
msgstr ""
#: ../../dispatcher/flags.rst:55
msgid "Use in middlewares"
msgstr ""
#: aiogram.flags.getter:1 of
msgid "FlagDecorator(flag: aiogram.dispatcher.flags.Flag)"
msgstr ""
#: ../../dispatcher/flags.rst:61
msgid "Example in middlewares"
msgstr ""
#: ../../dispatcher/flags.rst:74
msgid "Use in utilities"
msgstr ""
#: ../../dispatcher/flags.rst:76
msgid ""
"For example you can collect all registered commands with handler "
"description and then it can be used for generating commands help"
msgstr ""

View file

@ -0,0 +1,56 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/index.rst:3
msgid "Handling events"
msgstr ""
#: ../../dispatcher/index.rst:5
msgid ""
"*aiogram* includes Dispatcher mechanism. Dispatcher is needed for "
"handling incoming updates from Telegram."
msgstr ""
#: ../../dispatcher/index.rst:8
msgid "With dispatcher you can do:"
msgstr ""
#: ../../dispatcher/index.rst:10
msgid "Handle incoming updates;"
msgstr ""
#: ../../dispatcher/index.rst:11
msgid "Filter incoming events before it will be processed by specific handler;"
msgstr ""
#: ../../dispatcher/index.rst:12
msgid "Modify event and related data in middlewares;"
msgstr ""
#: ../../dispatcher/index.rst:13
msgid ""
"Separate bot functionality between different handlers, modules and "
"packages"
msgstr ""
#: ../../dispatcher/index.rst:15
msgid ""
"Dispatcher is also separated into two entities - Router and Dispatcher. "
"Dispatcher is subclass of router and should be always is root router."
msgstr ""

View file

@ -0,0 +1,181 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/middlewares.rst:3
msgid "Middlewares"
msgstr ""
#: ../../dispatcher/middlewares.rst:5
msgid ""
"**aiogram** provides powerful mechanism for customizing event handlers "
"via middlewares."
msgstr ""
#: ../../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)."
msgstr ""
#: ../../dispatcher/middlewares.rst:15
msgid ""
"Middleware is function that triggered on every event received from "
"Telegram Bot API in many points on processing pipeline."
msgstr ""
#: ../../dispatcher/middlewares.rst:19
msgid "Base theory"
msgstr ""
#: ../../dispatcher/middlewares.rst:21
msgid "As many books and other literature in internet says:"
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."
msgstr ""
#: ../../dispatcher/middlewares.rst:27
msgid ""
"Middleware can modify, extend or reject processing event in many places "
"of pipeline."
msgstr ""
#: ../../dispatcher/middlewares.rst:30
msgid "Basics"
msgstr ""
#: ../../dispatcher/middlewares.rst:32
msgid ""
"Middleware instance can be applied for every type of Telegram Event "
"(Update, Message, etc.) in two places"
msgstr ""
#: ../../dispatcher/middlewares.rst:34
msgid ""
"Outer scope - before processing filters "
"(:code:`<router>.<event>.outer_middleware(...)`)"
msgstr ""
#: ../../dispatcher/middlewares.rst:35
msgid ""
"Inner scope - after processing filters but before handler "
"(:code:`<router>.<event>.middleware(...)`)"
msgstr ""
#: ../../dispatcher/middlewares.rst:-1
msgid "Middleware basics"
msgstr ""
#: ../../dispatcher/middlewares.rst:42
msgid ""
"Middleware should be subclass of :code:`BaseMiddleware` (:code:`from "
"aiogram import BaseMiddleware`) or any async callable"
msgstr ""
#: ../../dispatcher/middlewares.rst:45
msgid "Arguments specification"
msgstr ""
#: aiogram.dispatcher.middlewares.base.BaseMiddleware:1 of
msgid "Bases: :py:class:`~abc.ABC`"
msgstr ""
#: aiogram.dispatcher.middlewares.base.BaseMiddleware:1 of
msgid "Generic middleware class"
msgstr ""
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:1 of
msgid "Execute middleware"
msgstr ""
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__ of
msgid "Parameters"
msgstr ""
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:3 of
msgid "Wrapped handler in middlewares chain"
msgstr ""
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:4 of
msgid "Incoming event (Subclass of :class:`aiogram.types.base.TelegramObject`)"
msgstr ""
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:5 of
msgid "Contextual data. Will be mapped to handler arguments"
msgstr ""
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__ of
msgid "Returns"
msgstr ""
#: aiogram.dispatcher.middlewares.base.BaseMiddleware.__call__:6 of
msgid ":class:`Any`"
msgstr ""
#: ../../dispatcher/middlewares.rst:56
msgid "Examples"
msgstr ""
#: ../../dispatcher/middlewares.rst:60
msgid ""
"Middleware should always call :code:`await handler(event, data)` to "
"propagate event for next middleware/handler"
msgstr ""
#: ../../dispatcher/middlewares.rst:64
msgid "Class-based"
msgstr ""
#: ../../dispatcher/middlewares.rst:85
msgid "and then"
msgstr ""
#: ../../dispatcher/middlewares.rst:94
msgid "Function-based"
msgstr ""
#: ../../dispatcher/middlewares.rst:109
msgid "Facts"
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"
msgstr ""

View file

@ -0,0 +1,100 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/observer.rst:3
msgid "Observer"
msgstr ""
#: ../../dispatcher/observer.rst:5
msgid ""
"Observer is used for filtering and handling different events. That is "
"part of internal API with some public methods and is recommended to don't"
" use methods is not listed here."
msgstr ""
#: ../../dispatcher/observer.rst:7
msgid "In `aiogram` framework is available two variants of observer:"
msgstr ""
#: ../../dispatcher/observer.rst:9
msgid "`EventObserver <#eventobserver>`__"
msgstr ""
#: ../../dispatcher/observer.rst:10
msgid "`TelegramEventObserver <#telegrameventobserver>`__"
msgstr ""
#: ../../dispatcher/observer.rst:14
msgid "EventObserver"
msgstr ""
#: aiogram.dispatcher.event.event.EventObserver:1 of
msgid "Simple events observer"
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 ""
#: aiogram.dispatcher.event.event.EventObserver:5 of
msgid "Handlers can be registered via decorator or method"
msgstr ""
#: aiogram.dispatcher.event.event.EventObserver.register:1 of
msgid "Register callback with filters"
msgstr ""
#: aiogram.dispatcher.event.event.EventObserver.trigger:1 of
msgid ""
"Propagate event to handlers. Handler will be called when all its filters "
"is pass."
msgstr ""
#: aiogram.dispatcher.event.event.EventObserver.__call__:1
#: aiogram.dispatcher.event.telegram.TelegramEventObserver.__call__:1 of
msgid "Decorator for registering event handlers"
msgstr ""
#: ../../dispatcher/observer.rst:22
msgid "TelegramEventObserver"
msgstr ""
#: aiogram.dispatcher.event.telegram.TelegramEventObserver:1 of
msgid "Event observer for Telegram events"
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."
msgstr ""
#: aiogram.dispatcher.event.telegram.TelegramEventObserver.register:1 of
msgid "Register event handler"
msgstr ""
#: 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 ""

View file

@ -0,0 +1,222 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022, aiogram Team
# 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"
"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"
"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"
#: ../../dispatcher/router.rst:3
msgid "Router"
msgstr ""
#: aiogram.dispatcher.router.Router:1 of
msgid "Bases: :py:class:`object`"
msgstr ""
#: aiogram.dispatcher.router.Router:1 of
msgid ""
"Router can route update, and it nested update types like messages, "
"callback query, polls and all other event types."
msgstr ""
#: aiogram.dispatcher.router.Router:4 of
msgid "Event handlers can be registered in observer by two ways:"
msgstr ""
#: aiogram.dispatcher.router.Router:6 of
msgid ""
"By observer method - :obj:`router.<event_type>.register(handler, "
"<filters, ...>)`"
msgstr ""
#: aiogram.dispatcher.router.Router:7 of
msgid "By decorator - :obj:`@router.<event_type>(<filters, ...>)`"
msgstr ""
#: aiogram.dispatcher.router.Router.__init__
#: aiogram.dispatcher.router.Router.include_router of
msgid "Parameters"
msgstr ""
#: aiogram.dispatcher.router.Router.__init__:1 of
msgid "Optional router name, can be useful for debugging"
msgstr ""
#: aiogram.dispatcher.router.Router.include_router:1 of
msgid "Attach another router."
msgstr ""
#: aiogram.dispatcher.router.Router.include_router:3 of
msgid ""
"Can be attached directly or by import string in format "
"\"<module>:<attribute>\""
msgstr ""
#: aiogram.dispatcher.router.Router.include_router of
msgid "Returns"
msgstr ""
#: ../../dispatcher/router.rst:11
msgid "Event observers"
msgstr ""
#: ../../dispatcher/router.rst:15
msgid ""
"All handlers always should be asynchronous. The name of the handler "
"function is not important. The event argument name is also not important "
"but it is recommended to not overlap the name with contextual data in due"
" to function can not accept two arguments with the same name."
msgstr ""
#: ../../dispatcher/router.rst:18
msgid ""
"Here is the list of available observers and examples of how to register "
"handlers"
msgstr ""
#: ../../dispatcher/router.rst:20
msgid ""
"In these examples only decorator-style registering handlers are used, but"
" if you don't like @decorators just use :obj:`<event type>.register(...)`"
" method instead."
msgstr ""
#: ../../dispatcher/router.rst:23
msgid "Update"
msgstr ""
#: ../../dispatcher/router.rst:32
msgid ""
"By default Router already has an update handler which route all event "
"types to another observers."
msgstr ""
#: ../../dispatcher/router.rst:36
msgid "Message"
msgstr ""
#: ../../dispatcher/router.rst:41
msgid "Be attentive with filtering this event"
msgstr ""
#: ../../dispatcher/router.rst:43
msgid ""
"You should expect that this event can be with different sets of "
"attributes in different cases"
msgstr ""
#: ../../dispatcher/router.rst:45
msgid ""
"(For example text, sticker and document are always of different content "
"types of message)"
msgstr ""
#: ../../dispatcher/router.rst:47
msgid ""
"Recommended way to check field availability before usage, for example via"
" :ref:`magic filter <magic-filters>`: :code:`F.text` to handle text, "
":code:`F.sticker` to handle stickers only and etc."
msgstr ""
#: ../../dispatcher/router.rst:58
msgid "Edited message"
msgstr ""
#: ../../dispatcher/router.rst:66
msgid "Channel post"
msgstr ""
#: ../../dispatcher/router.rst:74
msgid "Edited channel post"
msgstr ""
#: ../../dispatcher/router.rst:83
msgid "Inline query"
msgstr ""
#: ../../dispatcher/router.rst:91
msgid "Chosen inline query"
msgstr ""
#: ../../dispatcher/router.rst:99
msgid "Callback query"
msgstr ""
#: ../../dispatcher/router.rst:107
msgid "Shipping query"
msgstr ""
#: ../../dispatcher/router.rst:115
msgid "Pre checkout query"
msgstr ""
#: ../../dispatcher/router.rst:123
msgid "Poll"
msgstr ""
#: ../../dispatcher/router.rst:131
msgid "Poll answer"
msgstr ""
#: ../../dispatcher/router.rst:139
msgid "Errors"
msgstr ""
#: ../../dispatcher/router.rst:146
msgid "Is useful for handling errors from other handlers"
msgstr ""
#: ../../dispatcher/router.rst:150
msgid "Nested routers"
msgstr ""
#: ../../dispatcher/router.rst:155
msgid ""
"Routers by the way can be nested to an another routers with some "
"limitations:"
msgstr ""
#: ../../dispatcher/router.rst:155
msgid ""
"1. Router **CAN NOT** include itself 1. Routers **CAN NOT** be used for "
"circular including (router 1 include router 2, router 2 include router 3,"
" router 3 include router 1)"
msgstr ""
#: ../../dispatcher/router.rst:159
msgid "Example:"
msgstr ""
#: ../../dispatcher/router.rst:161 ../../dispatcher/router.rst:171
msgid "module_2.py"
msgstr ""
#: ../../dispatcher/router.rst:183
msgid "How it works?"
msgstr ""
#: ../../dispatcher/router.rst:185
msgid ""
"For example, dispatcher has 2 routers, the last router also has one "
"nested router:"
msgstr ""
#: ../../dispatcher/router.rst:-1
msgid "Nested routers example"
msgstr ""
#: ../../dispatcher/router.rst:190
msgid "In this case update propagation flow will have form:"
msgstr ""