From 909588e940e4c6ab1003424abfde1f6599967b76 Mon Sep 17 00:00:00 2001 From: profitroll Date: Thu, 15 Dec 2022 13:50:11 +0100 Subject: [PATCH] Changed some texts --- locale/uk.json | 30 +++++++++++++++--------------- modules/callbacks/reapply.py | 10 +++++----- modules/callbacks/sus.py | 16 ++++++++-------- modules/commands/application.py | 8 ++++---- modules/handlers/confirmation.py | 4 ++-- modules/handlers/contact.py | 8 ++++---- modules/handlers/everything.py | 4 ++-- modules/handlers/group_join.py | 2 +- modules/handlers/welcome.py | 2 +- 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/locale/uk.json b/locale/uk.json index 28d40c2..2cb8ddd 100644 --- a/locale/uk.json +++ b/locale/uk.json @@ -30,15 +30,15 @@ "approved": "Вітаємо! Твою анкету переглянули та підтвердили твоє право на вступ. Скористайся кнопкою під повідомленням щоб вступити до нашої лампової спільноти!", "approved_joined": "Вітаємо! Твою анкету переглянули та підтвердили її правильність. Дякуємо за витрачений на заповнення час та гарного дня!", "read_rules": "Будь ласка, прочитай ці правила перш ніж натискати на кнопку та приєднуватись до чату.", - "refused": "Ой лишенько! Твою анкету переглянули, однак не підтвердили право на вступ до спільноти. Better luck next time!", - "refused_russian": "русский военньій корабль, иди нахуй!", + "rejected": "Ой лишенько! Твою анкету переглянули, однак не підтвердили право на вступ до спільноти. Better luck next time!\n\nТи можеш спробувати повторно заповнити анкету командою /reapply", + "rejected_russian": "русский военньій корабль, иди нахуй!", "approved_by": "✅ **Анкету схвалено**\nАдмін **{0}** переглянув та схвалив анкету `{1}`.", - "refused_by": "❌ **Анкету відхилено**\nАдмін **{0}** переглянув та відхилив анкету `{1}`.", - "refused_by_agr": "❌ **Анкету відхилено**\nАдмін **{0}** переглянув та відхилив анкету `{1}`, заборонивши вступ до спільноти.\nПричина: агресивна/токсична анкета.", - "refused_by_rus": "❌ **Анкету відхилено**\nАдмін **{0}** переглянув та відхилив анкету `{1}`, заборонивши вступ до спільноти.\nПричина: русня.", + "rejected_by": "❌ **Анкету відхилено**\nАдмін **{0}** переглянув та відхилив анкету `{1}`.", + "rejected_by_agr": "❌ **Анкету відхилено**\nАдмін **{0}** переглянув та відхилив анкету `{1}`, заборонивши вступ до спільноти.\nПричина: агресивна/токсична анкета.", + "rejected_by_rus": "❌ **Анкету відхилено**\nАдмін **{0}** переглянув та відхилив анкету `{1}`, заборонивши вступ до спільноти.\nПричина: русня.", "contact": "Анкета `{0}`\n\n**Дані анкети:**\n{1}\n\n{2}", "application_status_accepted": "Прийнята `{0}` від {1}", - "application_status_refused": "Відхилена `{0}` від {1}", + "application_status_rejected": "Відхилена `{0}` від {1}", "application_status_on_hold": "Анкета все ще на розгляді", "application_status_not_send": "Анкета ще не була відправлена", "contact_invalid": "Надісланий контакт не має розпочатої анкети.", @@ -46,7 +46,7 @@ "already_sent": "Анкету вже надіслано, просто почекай. Тобі одразу повідомлять, яке рішення буде прийнято.", "sus_joined": "Користувач **{0}** (`{1}`) зайшов до групи не за своїм персональним запрошенням.", "sus_allowed_by": "✅ **Доступ дозволено**\nАдмін **{0}** дозволив `{1}` вступити до спільноти не за персональним посиланням.", - "sus_refused_by": "❌ **Доступ заборонено**\nАдмін **{0}** заборонив `{1}` доступ до спільноти не за персональним посиланням.", + "sus_rejected_by": "❌ **Доступ заборонено**\nАдмін **{0}** заборонив `{1}` доступ до спільноти не за персональним посиланням.", "reapply_forbidden": "❌ **Дія неможлива**\nТвоя минула анкета ще не була схвалена або відхилена.", "reapply_in_progress": "❌ **Дія неможлива**\nТи прямо зараз вже заповнюєш анкету. Якщо в ній є помилка - просто натисни кнопку нижче щоб почати заповнювати спочатку.", "reapply_restarted": "🔁 **Перезапущено**\nРозпочате заповнення анкети спочатку.", @@ -118,15 +118,15 @@ "button": { "sub_yes": "✅ Прийняти", "sub_no": "❌ Відхилити", - "sub_no_aggressive": "🤡 Відхилити (Токс)", - "sub_no_russian": "🇷🇺 Відхилити (Русак)", + "sub_aggressive": "🤡 Відхилити (Токс)", + "sub_russian": "🇷🇺 Відхилити (Русак)", "accepted": "✅ Прийнято", "declined": "❌ Відхилено", "join": "Приєднатись", "sus_allow": "✅ Підтвердити дозвіл", - "sus_refuse": "❌ Перманентно заблокувати", + "sus_reject": "❌ Перманентно заблокувати", "sus_allowed": "✅ Дозвіл надано", - "sus_refused": "❌ Користувача заблоковано", + "sus_rejected": "❌ Користувача заблоковано", "reapply_yes": "✅ Прийняти", "reapply_no": "❌ Відхилити", "reapply_old_one": "✅ Надіслати стару", @@ -140,11 +140,11 @@ }, "callback": { "sub_accepted": "✅ Анкету {0} схвалено", - "sub_refused": "❌ Анкету {0} відхилено", - "sub_no_aggressive": "🤡 Анкету {0} відхилено", - "sub_no_russian": "🇷🇺 Анкету {0} відхилено", + "sub_rejected": "❌ Анкету {0} відхилено", + "sub_aggressive": "🤡 Анкету {0} відхилено", + "sub_russian": "🇷🇺 Анкету {0} відхилено", "sus_allowed": "✅ Доступ {0} дозволено", - "sus_refused": "❌ Доступ {0} заборонено", + "sus_rejected": "❌ Доступ {0} заборонено", "nothing": "🔔 Дія вже виконана", "rules_page": "ℹ️ Показано правило {0}", "rules_home": "ℹ️ Показано головну правил", diff --git a/modules/callbacks/reapply.py b/modules/callbacks/reapply.py index 10578b1..74c2fe8 100644 --- a/modules/callbacks/reapply.py +++ b/modules/callbacks/reapply.py @@ -56,21 +56,21 @@ async def callback_reapply_query_accept(app, clb): await app.send_message(holo_user.id, locale("approved_joined", "message")) @app.on_callback_query(filters.regex("reapply_no_[\s\S]*")) -async def callback_query_reapply_refuse(app, clb): +async def callback_query_reapply_reject(app, clb): fullclb = clb.data.split("_") holo_user = HoloUser(int(fullclb[2])) - await app.send_message(configGet("admin_group"), locale("refused_by", "message").format(clb.from_user.first_name, fullclb[2]), disable_notification=True) - await app.send_message(holo_user.id, locale("refused", "message")) - logWrite(f"User {fullclb[2]} got their reapplication refused by {clb.from_user.id}") + await app.send_message(configGet("admin_group"), locale("rejected_by", "message").format(clb.from_user.first_name, fullclb[2]), disable_notification=True) + await app.send_message(holo_user.id, locale("rejected", "message")) + logWrite(f"User {fullclb[2]} got their reapplication rejected by {clb.from_user.id}") col_tmp.update_one({"user": {"$eq": holo_user.id}, "type": {"$eq": "application"}}, {"$set": {"state": "rejected", "sent": False}}) edited_markup = [[InlineKeyboardButton(text=str(locale("declined", "button")), callback_data="nothing")]] await clb.message.edit(text=clb.message.text, reply_markup=InlineKeyboardMarkup(edited_markup)) - await clb.answer(text=locale("sub_refused", "callback").format(fullclb[2]), show_alert=True) + await clb.answer(text=locale("sub_rejected", "callback").format(fullclb[2]), show_alert=True) # Use old application when user reapplies after leaving the chat @app.on_callback_query(filters.regex("reapply_old_[\s\S]*")) diff --git a/modules/callbacks/sus.py b/modules/callbacks/sus.py index 62931b3..beba22e 100644 --- a/modules/callbacks/sus.py +++ b/modules/callbacks/sus.py @@ -26,23 +26,23 @@ async def callback_query_sus_allow(app, clb): ) ) -@app.on_callback_query(filters.regex("sus_refuse_[\s\S]*")) -async def callback_query_sus_refuse(app, clb): +@app.on_callback_query(filters.regex("sus_reject_[\s\S]*")) +async def callback_query_sus_reject(app, clb): fullclb = clb.data.split("_") - await app.send_message(configGet("admin_group"), locale("sus_refused_by", "message").format(clb.from_user.first_name, fullclb[2]), disable_notification=True) - logWrite(f"User {fullclb[2]} was refused to join with another link by {clb.from_user.id}") + await app.send_message(configGet("admin_group"), locale("sus_rejected_by", "message").format(clb.from_user.first_name, fullclb[2]), disable_notification=True) + logWrite(f"User {fullclb[2]} was rejected to join with another link by {clb.from_user.id}") - edited_markup = [[InlineKeyboardButton(text=str(locale("sus_refused", "button")), callback_data="nothing")]] + edited_markup = [[InlineKeyboardButton(text=str(locale("sus_rejected", "button")), callback_data="nothing")]] await clb.message.edit(text=clb.message.text, reply_markup=InlineKeyboardMarkup(edited_markup)) - await clb.answer(text=locale("sus_refused", "callback").format(fullclb[2]), show_alert=True) + await clb.answer(text=locale("sus_rejected", "callback").format(fullclb[2]), show_alert=True) await app.ban_chat_member(configGet("destination_group"), int(fullclb[2])) jsonSave(jsonLoad(f"{configGet('data', 'locations')}{sep}user_default.json"), f"{configGet('data', 'locations')}{sep}users{sep}{fullclb[2]}.json") configSet(["stage"], 10, file=fullclb[2]) - configSet(["refused"], True, file=fullclb[2]) - configSet(["refused_by"], clb.from_user.id, file=fullclb[2]) + configSet(["rejected"], True, file=fullclb[2]) + configSet(["rejected_by"], clb.from_user.id, file=fullclb[2]) # ============================================================================================================================== \ No newline at end of file diff --git a/modules/commands/application.py b/modules/commands/application.py index 5bf3186..b326474 100644 --- a/modules/commands/application.py +++ b/modules/commands/application.py @@ -34,15 +34,15 @@ async def cmd_application(app, msg): if user_data["sent"]: if user_data["approved"]: application_status = locale("application_status_accepted", "message").format((await app.get_users(application["approved_by"])).first_name, datetime.fromtimestamp(application["approval_date"]).strftime("%d.%m.%Y, %H:%M")) - elif application["refused"]: - application_status = locale("application_status_refused", "message").format((await app.get_users(application["refused_by"])).first_name, datetime.fromtimestamp(application["refusal_date"]).strftime("%d.%m.%Y, %H:%M")) + elif application["rejected"]: + application_status = locale("application_status_rejected", "message").format((await app.get_users(application["rejected_by"])).first_name, datetime.fromtimestamp(application["refusal_date"]).strftime("%d.%m.%Y, %H:%M")) else: application_status = locale("application_status_on_hold", "message") else: if user_data["approved"]: application_status = locale("application_status_accepted", "message").format((await app.get_users(application["approved_by"])).first_name, datetime.fromtimestamp(application["approval_date"]).strftime("%d.%m.%Y, %H:%M")) - elif application["refused"]: - application_status = locale("application_status_refused", "message").format((await app.get_users(application["refused_by"])).first_name, datetime.fromtimestamp(application["refusal_date"]).strftime("%d.%m.%Y, %H:%M")) + elif application["rejected"]: + application_status = locale("application_status_rejected", "message").format((await app.get_users(application["rejected_by"])).first_name, datetime.fromtimestamp(application["refusal_date"]).strftime("%d.%m.%Y, %H:%M")) else: application_status = locale("application_status_not_send", "message") logWrite(f"User {msg.from_user.id} requested application of {user_id}") diff --git a/modules/handlers/confirmation.py b/modules/handlers/confirmation.py index bcf4738..edd97a9 100644 --- a/modules/handlers/confirmation.py +++ b/modules/handlers/confirmation.py @@ -65,10 +65,10 @@ async def confirm_yes(app, msg): InlineKeyboardButton(text=str(locale("sub_no", "button")), callback_data=f"sub_no_{holo_user.id}") ], [ - InlineKeyboardButton(text=str(locale("sub_no_aggressive", "button")), callback_data=f"sub_no_aggresive_{holo_user.id}") + InlineKeyboardButton(text=str(locale("sub_aggressive", "button")), callback_data=f"sub_aggressive_{holo_user.id}") ], [ - InlineKeyboardButton(text=str(locale("sub_no_russian", "button")), callback_data=f"sub_no_russian_{holo_user.id}") + InlineKeyboardButton(text=str(locale("sub_russian", "button")), callback_data=f"sub_russian_{holo_user.id}") ] ] ) diff --git a/modules/handlers/contact.py b/modules/handlers/contact.py index 6a8f5a7..10c4f6f 100644 --- a/modules/handlers/contact.py +++ b/modules/handlers/contact.py @@ -25,15 +25,15 @@ async def get_contact(app, msg): if user_data["sent"]: if user_data["approved"]: application_status = locale("application_status_accepted", "message").format((await app.get_users(application["approved_by"])).first_name, datetime.fromtimestamp(application["approval_date"]).strftime("%d.%m.%Y, %H:%M")) - elif application["refused"]: - application_status = locale("application_status_refused", "message").format((await app.get_users(application["refused_by"])).first_name, datetime.fromtimestamp(application["refusal_date"]).strftime("%d.%m.%Y, %H:%M")) + elif application["rejected"]: + application_status = locale("application_status_rejected", "message").format((await app.get_users(application["rejected_by"])).first_name, datetime.fromtimestamp(application["refusal_date"]).strftime("%d.%m.%Y, %H:%M")) else: application_status = locale("application_status_on_hold", "message") else: if user_data["approved"]: application_status = locale("application_status_accepted", "message").format((await app.get_users(application["approved_by"])).first_name, datetime.fromtimestamp(application["approval_date"]).strftime("%d.%m.%Y, %H:%M")) - elif application["refused"]: - application_status = locale("application_status_refused", "message").format((await app.get_users(application["refused_by"])).first_name, datetime.fromtimestamp(application["refusal_date"]).strftime("%d.%m.%Y, %H:%M")) + elif application["rejected"]: + application_status = locale("application_status_rejected", "message").format((await app.get_users(application["rejected_by"])).first_name, datetime.fromtimestamp(application["refusal_date"]).strftime("%d.%m.%Y, %H:%M")) else: application_status = locale("application_status_not_send", "message") logWrite(f"User {msg.from_user.id} requested application of {msg.contact.user_id}") diff --git a/modules/handlers/everything.py b/modules/handlers/everything.py index 96e1049..47be800 100644 --- a/modules/handlers/everything.py +++ b/modules/handlers/everything.py @@ -104,10 +104,10 @@ async def any_stage(app, msg): # #configSet("sent", True, file=str(msg.from_user.id)) # #configSet("application_date", int(time()), file=str(msg.from_user.id)) # else: - # if not configGet("approved", file=str(msg.from_user.id)) and not configGet("refused", file=str(msg.from_user.id)): + # if not configGet("approved", file=str(msg.from_user.id)) and not configGet("rejected", file=str(msg.from_user.id)): # await msg.reply_text(locale("already_sent", "message")) # else: - # if not configGet("approved", file=str(msg.from_user.id)) and not configGet("refused", file=str(msg.from_user.id)): + # if not configGet("approved", file=str(msg.from_user.id)) and not configGet("rejected", file=str(msg.from_user.id)): # await msg.reply_text(locale("already_sent", "message")) @app.on_message(~ filters.scheduled & filters.group) diff --git a/modules/handlers/group_join.py b/modules/handlers/group_join.py index d6b98de..f4c53a8 100644 --- a/modules/handlers/group_join.py +++ b/modules/handlers/group_join.py @@ -19,7 +19,7 @@ async def filter_join(app, member): InlineKeyboardButton(text=str(locale("sus_allow", "button")), callback_data=f"sus_allow_{member.from_user.id}") ], [ - InlineKeyboardButton(text=str(locale("sus_refuse", "button")), callback_data=f"sus_refuse_{member.from_user.id}") + InlineKeyboardButton(text=str(locale("sus_reject", "button")), callback_data=f"sus_reject_{member.from_user.id}") ] ] )) diff --git a/modules/handlers/welcome.py b/modules/handlers/welcome.py index 063138b..5adf881 100644 --- a/modules/handlers/welcome.py +++ b/modules/handlers/welcome.py @@ -28,6 +28,6 @@ async def welcome_pass(app, msg, once_again: bool = True) -> None: @app.on_message(~ filters.scheduled & filters.private & (filters.regex(locale("welcome", "keyboard")[1][0]))) async def welcome_reject(app, msg): - logWrite(f"User {msg.from_user.id} refused to start the application") + logWrite(f"User {msg.from_user.id} rejected to start the application") await msg.reply_text(locale("goodbye", "message"), reply_markup=ReplyKeyboardMarkup(locale("return", "keyboard"), resize_keyboard=True)) # ============================================================================================================================== \ No newline at end of file