Skip to content

Commit c85cf46

Browse files
committed
Improving translation in modules
1 parent e3ffa26 commit c85cf46

10 files changed

Lines changed: 38 additions & 38 deletions

File tree

tg_bot/modules/bans.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ def ban(bot: Bot, update: Update, args: List[str]) -> str:
4747
raise
4848

4949
if is_user_ban_protected(chat, user_id, member):
50-
message.reply_text("A volte mi piacerebbe tanto poter bannare gli admin...")
50+
message.reply_text("Impossibile rimuovere gli altri admin.")
5151
return ""
5252

5353
if user_id == bot.id:
54-
message.reply_text("Di sicuro non mi bannero' da solo.. sei pazzo?")
54+
message.reply_text("Di sicuro non mi bannero' da solo.")
5555
return ""
5656

5757
log = (
@@ -70,14 +70,14 @@ def ban(bot: Bot, update: Update, args: List[str]) -> str:
7070

7171
try:
7272
chat.kick_member(user_id)
73-
bot.send_sticker(chat.id, BAN_STICKER) # banhammer marie sticker
74-
message.reply_text("BANNATO!")
73+
# bot.send_sticker(chat.id, BAN_STICKER) # banhammer sticker
74+
message.reply_text("Utente rimosso.")
7575
return log
7676

7777
except BadRequest as excp:
7878
if excp.message == "Reply message not found":
7979
# Do not reply
80-
message.reply_text("BANNATO!", quote=False)
80+
message.reply_text("Utente rimosso.", quote=False)
8181
return log
8282
else:
8383
LOGGER.warning(update)
@@ -88,7 +88,7 @@ def ban(bot: Bot, update: Update, args: List[str]) -> str:
8888
chat.id,
8989
excp.message,
9090
)
91-
message.reply_text("Diamine, non riesco a bannare questo utente.")
91+
message.reply_text("Impossibile rimuovere questo membro.")
9292

9393
return ""
9494

@@ -119,11 +119,11 @@ def temp_ban(bot: Bot, update: Update, args: List[str]) -> str:
119119
raise
120120

121121
if is_user_ban_protected(chat, user_id, member):
122-
message.reply_text("A volte mi piacerebbe tanto poter bannare gli admin...")
122+
message.reply_text("Impossibile rimuovere gli altri admin.")
123123
return ""
124124

125125
if user_id == bot.id:
126-
message.reply_text("Di sicuro non mi bannero' da solo.. sei pazzo?")
126+
message.reply_text("Di sicuro non mi bannero' da solo.")
127127
return ""
128128

129129
if not reason:
@@ -164,14 +164,14 @@ def temp_ban(bot: Bot, update: Update, args: List[str]) -> str:
164164
try:
165165
chat.kick_member(user_id, until_date=bantime)
166166
bot.send_sticker(chat.id, BAN_STICKER) # banhammer marie sticker
167-
message.reply_text("BANNATO! L'utente verra' bannato per {}.".format(time_val))
167+
message.reply_text("L'utente verra' bannato per {}.".format(time_val))
168168
return log
169169

170170
except BadRequest as excp:
171171
if excp.message == "Reply message not found":
172172
# Do not reply
173173
message.reply_text(
174-
"BANNATO! L'utente verra' bannato per {}.".format(time_val), quote=False
174+
"L'utente verra' bannato per {}.".format(time_val), quote=False
175175
)
176176
return log
177177
else:
@@ -183,7 +183,7 @@ def temp_ban(bot: Bot, update: Update, args: List[str]) -> str:
183183
chat.id,
184184
excp.message,
185185
)
186-
message.reply_text("Diamine, non riesco a bannare questo utente.")
186+
message.reply_text("Impossibile bannare questo utente.")
187187

188188
return ""
189189

@@ -214,7 +214,7 @@ def kick(bot: Bot, update: Update, args: List[str]) -> str:
214214

215215
if is_user_ban_protected(chat, user_id):
216216
message.reply_text(
217-
"Non hai idea di quanto mi piacerebbe poter kickare gli admins..."
217+
"Impossibile rimuovere gli admin."
218218
)
219219
return ""
220220

@@ -299,7 +299,7 @@ def unban(bot: Bot, update: Update, args: List[str]) -> str:
299299
return ""
300300

301301
chat.unban_member(user_id)
302-
message.reply_text("Yep, questo utente può tornare tra noi!")
302+
message.reply_text("Questo utente può tornare tra noi!")
303303

304304
log = (
305305
"<b>{}:</b>"

tg_bot/modules/blacklist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def blacklist(bot: Bot, update: Update, args: List[str]):
3737
split_text = split_message(filter_list)
3838
for text in split_text:
3939
if text == BASE_BLACKLIST_STRING:
40-
msg.reply_text("Non sono presenti triggger nella blacklist!")
40+
msg.reply_text("Non sono presenti trigger nella blacklist!")
4141
return
4242
msg.reply_text(text, parse_mode=ParseMode.HTML)
4343

@@ -114,7 +114,7 @@ def unblacklist(bot: Bot, update: Update):
114114

115115
elif not successful:
116116
msg.reply_text(
117-
"NNessuno di questi trigger esiste, quindi non sono stati rimossi.".format(
117+
"Nessuno di questi trigger esiste, quindi non sono stati rimossi.".format(
118118
successful, len(to_unblacklist) - successful
119119
),
120120
parse_mode=ParseMode.HTML,

tg_bot/modules/cust_filters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def reply_filter(bot: Bot, update: Update):
215215
message.reply_text(
216216
"Sembra che tu stia provando a usare un protocollo url non supportato. "
217217
"Telegram non supporta i bottoni con alcuni procolli come per esempio: tg://."
218-
"Per favore riprova oppure chiedi aiuto qui: @MarieSupport."
218+
"Per favore riprova oppure chiedi aiuto qui: https://t.me/python_ita."
219219
)
220220
elif excp.message == "Reply message not found":
221221
bot.send_message(
@@ -228,7 +228,7 @@ def reply_filter(bot: Bot, update: Update):
228228
else:
229229
message.reply_text(
230230
"Questa nota non può essere inviata, è formattata in modo scorretto. "
231-
"Chiedi su @MarieSupport se non riesci a capire perché."
231+
"Chiedi su https://t.me/python_ita se non riesci a capire perché."
232232
)
233233
LOGGER.warning(
234234
"Message %s could not be parsed", str(filt.reply)

tg_bot/modules/locks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def build_lock_message(chat_id):
330330
if not (locks or restr):
331331
res = "Attualmente non ci sono elementi bloccati in questo gruppo."
332332
else:
333-
res = "In questo gruppo questi sono gli elementi bloccati:"
333+
res = "Gli elementi bloccati in questo gruppo sono i seguenti:"
334334
if locks:
335335
res += (
336336
"\n - sticker = `{}`"

tg_bot/modules/msg_deleting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def purge(bot: Bot, update: Update, args: List[str]) -> str:
5151
if err.message == "Message can't be deleted":
5252
bot.send_message(
5353
chat.id,
54-
"Non posso cancellare tutti i messaggi. I messaggi potrebbero essere troppo vecchi, oppure "
55-
"non sono amministratore, o questo non è un supergruppo.",
54+
"Non posso cancellare tutti i messaggi. I messaggi potrebbero essere troppo vecchi, potrei "
55+
"non essere amministratore, o questo potrebbe non essere un supergruppo.",
5656
)
5757

5858
elif err.message != "Message to delete not found":

tg_bot/modules/muting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def mute(bot: Bot, update: Update, args: List[str]) -> str:
3131
user_id = extract_user(message, args)
3232
if not user_id:
3333
message.reply_text(
34-
"Dovrai o darmi un nome utente per mutarlo o rispondere a qualcuno che deve essere mutato."
34+
"Dovrai darmi un nome utente per mutarlo o rispondere a qualcuno che deve essere mutato."
3535
)
3636
return ""
3737

@@ -49,7 +49,7 @@ def mute(bot: Bot, update: Update, args: List[str]) -> str:
4949

5050
elif member.can_send_messages is None or member.can_send_messages:
5151
bot.restrict_chat_member(chat.id, user_id, can_send_messages=False)
52-
message.reply_text("Muted!")
52+
message.reply_text("Membro silenziato.")
5353
return (
5454
"<b>{}:</b>"
5555
"\n#MUTE"
@@ -123,7 +123,7 @@ def unmute(bot: Bot, update: Update, args: List[str]) -> str:
123123
)
124124
else:
125125
message.reply_text(
126-
"Questo utente non è nella chat, unmutarlo non gli permetterà di parlare!!"
126+
"Questo utente non è nella chat, unmutarlo non gli permetterà di parlare."
127127
)
128128

129129
return ""
@@ -163,7 +163,7 @@ def temp_mute(bot: Bot, update: Update, args: List[str]) -> str:
163163
return ""
164164

165165
if not reason:
166-
message.reply_text("NOn hai specificato per quanto tempo mutare questo utente!")
166+
message.reply_text("Non hai specificato per quanto tempo mutare questo utente!")
167167
return ""
168168

169169
split_reason = reason.split(None, 1)

tg_bot/modules/reporting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def report_setting(bot: Bot, update: Update, args: List[str]):
5353
msg.reply_text("Reporting spento. Nessun admin verrà notificato.")
5454
else:
5555
msg.reply_text(
56-
"This chat's current setting is: `{}`".format(
56+
"La chat è attualmente impostata: `{}`".format(
5757
sql.chat_should_report(chat.id)
5858
),
5959
parse_mode=ParseMode.MARKDOWN,

tg_bot/modules/rules.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def send_rules(update, chat_id, from_pm=False):
6262
bot.send_message(
6363
user.id,
6464
"Gli admin non hanno ancora impostato le regole del gruppo. "
65-
"Questo non significa che siamo nel far-west!",
65+
"Per favore attieniti alle regole di rispetto reciproco che vigono in ogni chat online.",
6666
)
6767
elif rules:
6868
update.effective_message.reply_text(
@@ -81,7 +81,7 @@ def send_rules(update, chat_id, from_pm=False):
8181
else:
8282
update.effective_message.reply_text(
8383
"Il gruppo non ha ancora nessuna regola impostata. "
84-
"Questo però non significa che si può fare tutto..!"
84+
"Per favore attieniti alle regole di rispetto reciproco che vigono in ogni chat online."
8585
)
8686

8787

tg_bot/modules/userinfo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def about_me(bot: Bot, update: Update, args: List[str]):
3535
username + " non ha ancora impostato un messaggio bio!"
3636
)
3737
else:
38-
update.effective_message.reply_text("Non hai ancora impostato una bio!")
38+
update.effective_message.reply_text("Non hai ancora impostato una bio.")
3939

4040

4141
@run_async
@@ -93,12 +93,12 @@ def set_about_bio(bot: Bot, update: Update):
9393
user_id = repl_message.from_user.id
9494
if user_id == message.from_user.id:
9595
message.reply_text(
96-
"Ah, non puoi impostare la tua biografia! Sei in balia degli altri qui..."
96+
"Mi dispiace, non puoi impostare la biiografia qui!"
9797
)
9898
return
9999
elif user_id == bot.id and sender.id not in SUDO_USERS:
100100
message.reply_text(
101-
"Ehm ... sì, mi fido solo dei sudo-user per impostare la mia biografia."
101+
"Ehm ... sì, mi fido solo degli amministratori per impostare la mia biografia."
102102
)
103103
return
104104

tg_bot/modules/warns.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def warn(
5151
user: User, chat: Chat, reason: str, message: Message, warner: User = None
5252
) -> str:
5353
if is_user_admin(chat, user.id):
54-
message.reply_text("Maledetti admin, non possono nemmeno essere ammoniti!")
54+
message.reply_text("Gli amministratori non possono essere ammuniti.")
5555
return ""
5656

5757
if warner:
@@ -65,13 +65,13 @@ def warn(
6565
sql.reset_warns(user.id, chat.id)
6666
if soft_warn: # kick
6767
chat.unban_member(user.id)
68-
reply = "{} ammonimenti, {} è stato cacciato!".format(
68+
reply = "{} ammonimenti, {} è stato cacciato.".format(
6969
limit, mention_html(user.id, user.first_name)
7070
)
7171

7272
else: # ban
7373
chat.kick_member(user.id)
74-
reply = "{} ammonimenti, {} è stato bandito!".format(
74+
reply = "{} ammonimenti, {} è stato bandito.".format(
7575
limit, mention_html(user.id, user.first_name)
7676
)
7777

@@ -109,7 +109,7 @@ def warn(
109109
]
110110
)
111111

112-
reply = "{} ha {}/{} ammonimenti... attenzione!".format(
112+
reply = "{} ha {}/{} ammonimenti... Per favore attieniti al Codice di Condotta e ricordati di rispettare sempre gli altri utenti.".format(
113113
mention_html(user.id, user.first_name), num_warns, limit
114114
)
115115
if reason:
@@ -279,7 +279,7 @@ def warns(bot: Bot, update: Update, args: List[str]):
279279
)
280280
else:
281281
update.effective_message.reply_text(
282-
"Questo utente non ha ricevuto alcun ammonimento!"
282+
"Questo utente non ha ricevuto alcun ammonimento."
283283
)
284284

285285

@@ -347,7 +347,7 @@ def remove_warn_filter(bot: Bot, update: Update):
347347
for filt in chat_filters:
348348
if filt == to_remove:
349349
sql.remove_warn_filter(chat.id, to_remove)
350-
msg.reply_text("Si, smetterò di ammonire la gente per questo.")
350+
msg.reply_text("Filtro disattivato per questo termine.")
351351
raise DispatcherHandlerStop
352352

353353
msg.reply_text(
@@ -462,7 +462,7 @@ def set_warn_strength(bot: Bot, update: Update, args: List[str]):
462462
return (
463463
"<b>{}:</b>\n"
464464
"<b>Admin:</b> {}\n"
465-
"Ha disabilitato gli ammonimenti rigidi. Gli utenti saranno solo cacciati.".format(
465+
"Ha disabilitato gli ammonimenti rigidi. Gli utenti saranno solo momentaneamente rimossi.".format(
466466
html.escape(chat.title), mention_html(user.id, user.first_name)
467467
)
468468
)
@@ -473,7 +473,7 @@ def set_warn_strength(bot: Bot, update: Update, args: List[str]):
473473
limit, soft_warn = sql.get_warn_setting(chat.id)
474474
if soft_warn:
475475
msg.reply_text(
476-
"Gli ammonimenti sono impostati per *cacciare* (kick) gli utenti quando superano il limite.",
476+
"Gli ammonimenti sono impostati per *rimuovere* (kick) gli utenti quando superano il limite.",
477477
parse_mode=ParseMode.MARKDOWN,
478478
)
479479
else:

0 commit comments

Comments
 (0)