mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 10:11:52 +00:00
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:
parent
94030903ec
commit
f4251382e8
610 changed files with 61738 additions and 1687 deletions
146
docs/locale/en/LC_MESSAGES/utils/chat_action.po
Normal file
146
docs/locale/en/LC_MESSAGES/utils/chat_action.po
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
# 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"
|
||||
|
||||
#: ../../utils/chat_action.rst:3
|
||||
msgid "Chat action sender"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/chat_action.rst:6
|
||||
msgid "Sender"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender:1 of
|
||||
msgid ""
|
||||
"This utility helps to automatically send chat action until long actions "
|
||||
"is done to take acknowledge bot users the bot is doing something and not "
|
||||
"crashed."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender:4 of
|
||||
msgid "Provides simply to use context manager."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender:6 of
|
||||
msgid ""
|
||||
"Technically sender start background task with infinity loop which works "
|
||||
"until action will be finished and sends the `chat action "
|
||||
"<https://core.telegram.org/bots/api#sendchataction>`_ every 5 seconds."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.__init__ of
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.__init__:1 of
|
||||
msgid "target chat id"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.__init__:2 of
|
||||
msgid "chat action type"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.__init__:3 of
|
||||
msgid "interval between iterations"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.__init__:4 of
|
||||
msgid "sleep before first iteration"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.__init__:5 of
|
||||
msgid "instance of the bot, can be omitted from the context"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.choose_sticker:1 of
|
||||
msgid "Create instance of the sender with `choose_sticker` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.find_location:1 of
|
||||
msgid "Create instance of the sender with `find_location` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.record_video:1 of
|
||||
msgid "Create instance of the sender with `record_video` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.record_video_note:1 of
|
||||
msgid "Create instance of the sender with `record_video_note` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.record_voice:1 of
|
||||
msgid "Create instance of the sender with `record_voice` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.typing:1 of
|
||||
msgid "Create instance of the sender with `typing` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.upload_document:1 of
|
||||
msgid "Create instance of the sender with `upload_document` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.upload_photo:1 of
|
||||
msgid "Create instance of the sender with `upload_photo` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.upload_video:1 of
|
||||
msgid "Create instance of the sender with `upload_video` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.upload_video_note:1 of
|
||||
msgid "Create instance of the sender with `upload_video_note` action"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionSender.upload_voice:1 of
|
||||
msgid "Create instance of the sender with `upload_voice` action"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/chat_action.rst:12 ../../utils/chat_action.rst:29
|
||||
msgid "Usage"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/chat_action.rst:23
|
||||
msgid "Middleware"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.chat_action.ChatActionMiddleware:1 of
|
||||
msgid "Helps to automatically use chat action sender for all message handlers"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/chat_action.rst:31
|
||||
msgid "Before usa should be registered for the `message` event"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/chat_action.rst:37
|
||||
msgid ""
|
||||
"After this action all handlers which works longer than `initial_sleep` "
|
||||
"will produce the '`typing`' chat action."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/chat_action.rst:39
|
||||
msgid "Also sender can be customized via flags feature for particular handler."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/chat_action.rst:41
|
||||
msgid "Change only action type:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/chat_action.rst:50
|
||||
msgid "Change sender configuration:"
|
||||
msgstr ""
|
||||
319
docs/locale/en/LC_MESSAGES/utils/i18n.po
Normal file
319
docs/locale/en/LC_MESSAGES/utils/i18n.po
Normal file
|
|
@ -0,0 +1,319 @@
|
|||
# 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"
|
||||
|
||||
#: ../../utils/i18n.rst:3
|
||||
msgid "Translation"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:5
|
||||
msgid ""
|
||||
"In order to make you bot translatable you have to add a minimal number of"
|
||||
" hooks to your Python code."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:7
|
||||
msgid "These hooks are called translation strings."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:9
|
||||
msgid ""
|
||||
"The aiogram translation utils is build on top of `GNU gettext Python "
|
||||
"module <https://docs.python.org/3/library/gettext.html>`_ and `Babel "
|
||||
"library <http://babel.pocoo.org/en/latest/>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:13
|
||||
msgid "Installation"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:15
|
||||
msgid ""
|
||||
"Babel is required to make simple way to extract translation strings from "
|
||||
"your code"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:17
|
||||
msgid "Can be installed from pip directly:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:24
|
||||
msgid "or as `aiogram` extra dependency:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:32
|
||||
msgid "Make messages translatable"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:34
|
||||
msgid ""
|
||||
"In order to gettext need to know what the strings should be translated "
|
||||
"you will need to write translation strings."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:36
|
||||
msgid "For example:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:54
|
||||
msgid ""
|
||||
"f-strings can't be used as translations string because any dynamic "
|
||||
"variables should be added to message after getting translated message"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:57
|
||||
msgid ""
|
||||
"Also if you want to use translated string in keyword- or magic- filters "
|
||||
"you will need to use lazy gettext calls:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:72
|
||||
msgid ""
|
||||
"Lazy gettext calls should always be used when the current language is not"
|
||||
" know at the moment"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:77
|
||||
msgid ""
|
||||
"Lazy gettext can't be used as value for API methods or any Telegram "
|
||||
"Object (like "
|
||||
":class:`aiogram.types.inline_keyboard_button.InlineKeyboardButton` or "
|
||||
"etc.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:80
|
||||
msgid "Configuring engine"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:82
|
||||
msgid ""
|
||||
"After you messages is already done to use gettext your bot should know "
|
||||
"how to detect user language"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:84
|
||||
msgid ""
|
||||
"On top of your application the instance of "
|
||||
":class:`aiogram.utils.i18n.I18n` should be created"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:92
|
||||
msgid ""
|
||||
"After that you will need to choose one of builtin I18n middleware or "
|
||||
"write your own."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:94
|
||||
msgid "Builtin middlewares:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:98
|
||||
msgid "SimpleI18nMiddleware"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware:1 of
|
||||
msgid "Simple I18n middleware."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware:3 of
|
||||
msgid "Chooses language code from the User object received in event"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__:1
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__:1
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__:1
|
||||
#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__:1 of
|
||||
msgid "Create an instance of middleware"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.set_locale
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.get_locale
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.setup
|
||||
#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__ of
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__:3
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__:3
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__:3
|
||||
#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__:3 of
|
||||
msgid "instance of I18n"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__:4
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__:4
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__:4
|
||||
#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__:4 of
|
||||
msgid "context key for I18n instance"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.ConstI18nMiddleware.__init__:5
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.__init__:5
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.__init__:5
|
||||
#: aiogram.utils.i18n.middleware.SimpleI18nMiddleware.__init__:5 of
|
||||
msgid "context key for this middleware"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:104
|
||||
msgid "ConstI18nMiddleware"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.ConstI18nMiddleware:1 of
|
||||
msgid "Const middleware chooses statically defined locale"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:110
|
||||
msgid "FSMI18nMiddleware"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware:1 of
|
||||
msgid "This middleware stores locale in the FSM storage"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.set_locale:1 of
|
||||
msgid "Write new locale to the storage"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.set_locale:3 of
|
||||
msgid "instance of FSMContext"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.FSMI18nMiddleware.set_locale:4 of
|
||||
msgid "new locale"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:117
|
||||
msgid "I18nMiddleware"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:119
|
||||
msgid "or define you own based on abstract I18nMiddleware middleware:"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware:1 of
|
||||
msgid "Abstract I18n middleware."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.get_locale:1 of
|
||||
msgid "Detect current user locale based on event and context."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.get_locale:3 of
|
||||
msgid "**This method must be defined in child classes**"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.get_locale
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.setup of
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.i18n.middleware.I18nMiddleware.setup:1 of
|
||||
msgid "Register middleware for all events in the Router"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:126
|
||||
msgid "Deal with Babel"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:136
|
||||
msgid ""
|
||||
"Here is :code:`--input-dirs=.` - path to code and the "
|
||||
":code:`locales/messages.pot` is template where messages will be extracted"
|
||||
" and `messages` is translation domain."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:141
|
||||
msgid "Some useful options:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:143
|
||||
msgid "Extract texts with pluralization support :code:`-k __:1,2`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:144
|
||||
msgid ""
|
||||
"Add comments for translators, you can use another tag if you want (TR) "
|
||||
":code:`--add-comments=NOTE`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:145
|
||||
msgid "Disable comments with string location in code :code:`--no-location`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:146
|
||||
msgid "Set project name :code:`--project=MySuperBot`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:147
|
||||
msgid "Set version :code:`--version=2.2`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:157
|
||||
msgid ":code:`-i locales/messages.pot` - pre-generated template"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:158
|
||||
msgid ":code:`-d locales` - translations directory"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:159
|
||||
msgid ":code:`-D messages` - translations domain"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:160
|
||||
msgid ""
|
||||
":code:`-l en` - language. Can be changed to any other valid language code"
|
||||
" (For example :code:`-l uk` for ukrainian language)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:166
|
||||
msgid ""
|
||||
"To open .po file you can use basic text editor or any PO editor, e.g. "
|
||||
"`Poedit <https://poedit.net/>`_"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:168
|
||||
msgid ""
|
||||
"Just open the file named "
|
||||
":code:`locales/{language}/LC_MESSAGES/messages.po` and write translations"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:181
|
||||
msgid "When you change the code of your bot you need to update po & mo files"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:183
|
||||
msgid "Step 5.1: regenerate pot file: command from step 1"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:187
|
||||
msgid "Step 5.2: update po files"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:189
|
||||
msgid ""
|
||||
"Step 5.3: update your translations: location and tools you know from step"
|
||||
" 3"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/i18n.rst:190
|
||||
msgid "Step 5.4: compile mo files: command from step 4"
|
||||
msgstr ""
|
||||
22
docs/locale/en/LC_MESSAGES/utils/index.po
Normal file
22
docs/locale/en/LC_MESSAGES/utils/index.po
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# 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"
|
||||
|
||||
#: ../../utils/index.rst:3
|
||||
msgid "Utils"
|
||||
msgstr ""
|
||||
109
docs/locale/en/LC_MESSAGES/utils/keyboard.po
Normal file
109
docs/locale/en/LC_MESSAGES/utils/keyboard.po
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
# 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"
|
||||
|
||||
#: ../../utils/keyboard.rst:3
|
||||
msgid "Keyboard builder"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/keyboard.rst:6
|
||||
msgid "Base builder"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.ReplyKeyboardBuilder:1 of
|
||||
msgid "Reply keyboard builder inherits all methods from generic builder"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.add:1 of
|
||||
msgid "Add one or many buttons to markup."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.add
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.adjust
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.row of
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.add
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.adjust
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.export
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.row
|
||||
#: aiogram.utils.keyboard.ReplyKeyboardBuilder.buttons
|
||||
#: aiogram.utils.keyboard.ReplyKeyboardBuilder.copy of
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.adjust:1 of
|
||||
msgid "Adjust previously added buttons to specific row sizes."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.adjust:3 of
|
||||
msgid ""
|
||||
"By default when the sum of passed sizes is lower than buttons count the "
|
||||
"last one size will be used for tail of the markup. If repeat=True is "
|
||||
"passed - all sizes will be cycled when available more buttons count than "
|
||||
"all sizes"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.ReplyKeyboardBuilder.buttons:1 of
|
||||
msgid "Get flatten set of all buttons"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.ReplyKeyboardBuilder.copy:1 of
|
||||
msgid "Make full copy of current builder with markup"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.export:1 of
|
||||
msgid "Export configured markup as list of lists of buttons"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.row:1 of
|
||||
msgid "Add row to markup"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.KeyboardBuilder.row:3 of
|
||||
msgid "When too much buttons is passed it will be separated to many rows"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/keyboard.rst:12
|
||||
msgid "Inline Keyboard"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.keyboard.InlineKeyboardBuilder:1 of
|
||||
msgid "Inline keyboard builder inherits all methods from generic builder"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/keyboard.rst:20
|
||||
msgid "Add new inline button to markup"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/keyboard.rst:25
|
||||
msgid "Construct an InlineKeyboardMarkup"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/keyboard.rst:28
|
||||
msgid "Reply Keyboard"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/keyboard.rst:36
|
||||
msgid "Add new button to markup"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/keyboard.rst:41
|
||||
msgid "Construct an ReplyKeyboardMarkup"
|
||||
msgstr ""
|
||||
209
docs/locale/en/LC_MESSAGES/utils/web_app.po
Normal file
209
docs/locale/en/LC_MESSAGES/utils/web_app.po
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
# 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"
|
||||
|
||||
#: ../../utils/web_app.rst:3
|
||||
msgid "WebApp"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/web_app.rst:5
|
||||
msgid ""
|
||||
"Telegram Bot API 6.0 announces a revolution in the development of "
|
||||
"chatbots using WebApp feature."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/web_app.rst:7
|
||||
msgid ""
|
||||
"You can read more details on it in the official `blog "
|
||||
"<https://telegram.org/blog/notifications-bots#bot-revolution>`_ and "
|
||||
"`documentation <https://core.telegram.org/bots/webapps>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/web_app.rst:10
|
||||
msgid ""
|
||||
"`aiogram` implements simple utils to remove headache with the data "
|
||||
"validation from Telegram WebApp on the backend side."
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/web_app.rst:13
|
||||
msgid "Usage"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/web_app.rst:15
|
||||
msgid ""
|
||||
"For example from frontend you will pass :code:`application/x-www-form-"
|
||||
"urlencoded` POST request with :code:`_auth` field in body and wants to "
|
||||
"return User info inside response as :code:`application/json`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/web_app.rst:35
|
||||
msgid "Functions"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.check_webapp_signature:1 of
|
||||
msgid "Check incoming WebApp init data signature"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.check_webapp_signature:3 of
|
||||
msgid ""
|
||||
"Source: https://core.telegram.org/bots/webapps#validating-data-received-"
|
||||
"via-the-web-app"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.check_webapp_signature
|
||||
#: aiogram.utils.web_app.parse_webapp_init_data
|
||||
#: aiogram.utils.web_app.safe_parse_webapp_init_data of
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.check_webapp_signature:5 of
|
||||
msgid "bot Token"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.check_webapp_signature:6 of
|
||||
msgid "data from frontend to be validated"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.check_webapp_signature
|
||||
#: aiogram.utils.web_app.parse_webapp_init_data
|
||||
#: aiogram.utils.web_app.safe_parse_webapp_init_data of
|
||||
msgid "Returns"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.parse_webapp_init_data:1 of
|
||||
msgid "Parse WebApp init data and return it as WebAppInitData object"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.parse_webapp_init_data:3 of
|
||||
msgid ""
|
||||
"This method doesn't make any security check, so you shall not trust to "
|
||||
"this data, use :code:`safe_parse_webapp_init_data` instead."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.parse_webapp_init_data:6 of
|
||||
msgid "data from frontend to be parsed"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.safe_parse_webapp_init_data:1 of
|
||||
msgid "Validate raw WebApp init data and return it as WebAppInitData object"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.safe_parse_webapp_init_data:3 of
|
||||
msgid "Raise :obj:`ValueError` when data is invalid"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.safe_parse_webapp_init_data:5 of
|
||||
msgid "bot token"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.safe_parse_webapp_init_data:6 of
|
||||
msgid "data from frontend to be parsed and validated"
|
||||
msgstr ""
|
||||
|
||||
#: ../../utils/web_app.rst:45
|
||||
msgid "Types"
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.WebAppInitData:1 of
|
||||
msgid ""
|
||||
"This object contains data that is transferred to the Web App when it is "
|
||||
"opened. It is empty if the Web App was launched from a keyboard button."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.WebAppInitData:3 of
|
||||
msgid "Source: https://core.telegram.org/bots/webapps#webappinitdata"
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppInitData.query_id:1 of
|
||||
msgid ""
|
||||
"A unique identifier for the Web App session, required for sending "
|
||||
"messages via the answerWebAppQuery method."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppInitData.user:1 of
|
||||
msgid "An object containing data about the current user."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppInitData.receiver:1 of
|
||||
msgid ""
|
||||
"An object containing data about the chat partner of the current user in "
|
||||
"the chat where the bot was launched via the attachment menu. Returned "
|
||||
"only for Web Apps launched via the attachment menu."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppInitData.start_param:1 of
|
||||
msgid ""
|
||||
"The value of the startattach parameter, passed via link. Only returned "
|
||||
"for Web Apps when launched from the attachment menu via link. The value "
|
||||
"of the start_param parameter will also be passed in the GET-parameter "
|
||||
"tgWebAppStartParam, so the Web App can load the correct interface right "
|
||||
"away."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppInitData.auth_date:1 of
|
||||
msgid "Unix time when the form was opened."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppInitData.hash:1 of
|
||||
msgid ""
|
||||
"A hash of all passed parameters, which the bot server can use to check "
|
||||
"their validity."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.WebAppUser:1 of
|
||||
msgid "This object contains the data of the Web App user."
|
||||
msgstr ""
|
||||
|
||||
#: aiogram.utils.web_app.WebAppUser:3 of
|
||||
msgid "Source: https://core.telegram.org/bots/webapps#webappuser"
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppUser.id:1 of
|
||||
msgid ""
|
||||
"A unique identifier for the user or bot. This number may have more than "
|
||||
"32 significant bits and some programming languages may have "
|
||||
"difficulty/silent defects in interpreting it. It has at most 52 "
|
||||
"significant bits, so a 64-bit integer or a double-precision float type is"
|
||||
" safe for storing this identifier."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppUser.is_bot:1 of
|
||||
msgid "True, if this user is a bot. Returns in the receiver field only."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppUser.first_name:1 of
|
||||
msgid "First name of the user or bot."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppUser.last_name:1 of
|
||||
msgid "Last name of the user or bot."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppUser.username:1 of
|
||||
msgid "Username of the user or bot."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppUser.language_code:1 of
|
||||
msgid "IETF language tag of the user's language. Returns in user field only."
|
||||
msgstr ""
|
||||
|
||||
#: ../../docstring aiogram.utils.web_app.WebAppUser.photo_url:1 of
|
||||
msgid ""
|
||||
"URL of the user’s profile photo. The photo can be in .jpeg or .svg "
|
||||
"formats. Only returned for Web Apps launched from the attachment menu."
|
||||
msgstr ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue