Locale for console is gone for good

This commit is contained in:
2023-07-03 11:42:28 +02:00
parent 987f642578
commit dc774262f8
6 changed files with 25 additions and 138 deletions

View File

@@ -55,14 +55,9 @@ async def callback_query_yes(app: PyroClient, clb: CallbackQuery):
quote=True,
)
logger.info(
app._(
"submission_duplicate",
"console",
locale=app.config["locale_log"],
).format(
fullclb[2],
str(exp.duplicates),
),
"Submission with ID '%s' could not be accepted because of the duplicates: %s",
fullclb[2],
str(exp.duplicates),
)
return
@@ -121,11 +116,9 @@ async def callback_query_yes(app: PyroClient, clb: CallbackQuery):
)
logger.info(
app._(
"submission_accepted",
"console",
locale=app.config["locale_log"],
).format(fullclb[2], submission[1]),
"Submission with ID '%s' accepted and uploaded with ID '%s'",
fullclb[2],
submission[1],
)
@@ -197,11 +190,8 @@ async def callback_query_no(app: PyroClient, clb: CallbackQuery):
reply_markup=InlineKeyboardMarkup(edited_markup)
)
logger.info(
app._(
"submission_rejected",
"console",
locale=app.config["locale_log"],
).format(fullclb[2]),
"Submission with ID '%s' rejected",
fullclb[2],
)
@@ -237,13 +227,7 @@ async def callback_query_block(app: PyroClient, clb: CallbackQuery):
await clb.message.edit_reply_markup(
reply_markup=InlineKeyboardMarkup(edited_markup)
)
logger.info(
app._(
"user_blocked",
"console",
locale=app.config["locale_log"],
).format(fullclb[2]),
)
logger.info("User %s has been blocked", fullclb[2])
@Client.on_callback_query(filters.regex("sub_unblock_[\s\S]*"))
@@ -279,10 +263,4 @@ async def callback_query_unblock(app: PyroClient, clb: CallbackQuery):
await clb.message.edit_reply_markup(
reply_markup=InlineKeyboardMarkup(edited_markup)
)
logger.info(
app._(
"user_unblocked",
"console",
locale=app.config["locale_log"],
).format(fullclb[2]),
)
logger.info("User %s has been unblocked", fullclb[2])