add localization for forwarding prefix and integrate captcha dependency

This commit is contained in:
2026-07-02 22:01:41 +03:00
parent 73c838d331
commit a097abf5bc
4 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ async def process_captcha(message: Message, state: FSMContext, bot: Bot, locale:
try:
db_msg_id = data.get("db_msg_id", "N/A")
prefix = f"Forwarding, ID [{db_msg_id}]:"
prefix = _("forwarding_prefix", locale=locale, id=db_msg_id)
target_chat_id = settings.group_chat_id
if data.get('has_media'):
@@ -85,7 +85,7 @@ async def handle_any_message(message: Message, state: FSMContext, bot: Bot, loca
if settings.disable_captcha:
try:
wait_message = await message.answer(_("processing_message", locale=locale))
prefix = f"Forwarding, ID [{db_msg_id}]:"
prefix = _("forwarding_prefix", locale=locale, id=db_msg_id)
target_chat_id = settings.group_chat_id
if has_media:
+2 -1
View File
@@ -14,5 +14,6 @@
"msg_details": "Message ID: {id}\nUser: {full_name} (@{username}) [ID: {user_id}]\nType: {content_type}\nTimestamp: {timestamp}\n\nContent:\n{text}",
"id_command": "Current Chat ID: <code>{id}</code>",
"processing_message": "Forwarding your message...",
"message_processed": "Forwarded!"
"message_processed": "Forwarded!",
"forwarding_prefix": "Forwarding, ID [{id}]:"
}
+2 -1
View File
@@ -14,5 +14,6 @@
"msg_details": "ID повідомлення: {id}\nКористувач: {full_name} (@{username}) [ID: {user_id}]\nТип: {content_type}\nЧас: {timestamp}\n\nВміст:\n{text}",
"id_command": "Поточний ID чату: <code>{id}</code>",
"processing_message": "Відправляємо ваше повідомлення...",
"message_processed": "Відправлено!"
"message_processed": "Відправлено!",
"forwarding_prefix": "Пересилання, ID [{id}]:"
}
+1
View File
@@ -6,4 +6,5 @@ dependencies = [
"aiogram>=3.29.1",
"pydantic>=2.13.4",
"pydantic-settings>=2.14.2",
"captcha",
]