finish up the translations
This commit is contained in:
parent
b5c9de3097
commit
f89de0699a
5 changed files with 12 additions and 6 deletions
|
@ -1,4 +1,7 @@
|
||||||
{
|
{
|
||||||
|
"active_users:": "Active users:",
|
||||||
|
"spacy_initialized": "spaCy and spacytextblob are ready.",
|
||||||
|
"spacy_model_not_found": "The spaCy model was not found! Downloading it....`",
|
||||||
"env_file_not_found": "The .env file was not found! Please create one with the required variables.",
|
"env_file_not_found": "The .env file was not found! Please create one with the required variables.",
|
||||||
"error_fetching_active_users": "Error fetching active users: {error}",
|
"error_fetching_active_users": "Error fetching active users: {error}",
|
||||||
"error_sending_alive_ping": "Error sending alive ping: {error}",
|
"error_sending_alive_ping": "Error sending alive ping: {error}",
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{
|
{
|
||||||
|
"active_users:": "Utenti attivi:",
|
||||||
|
"spacy_initialized": "spaCy e spacytextblob sono pronti.",
|
||||||
|
"spacy_model_not_found": "Il modello spaCy non è stato trovato! Lo sto scaricando...",
|
||||||
"env_file_not_found": "Il file .env non è stato trovato! Crea un file con le variabili richieste.",
|
"env_file_not_found": "Il file .env non è stato trovato! Crea un file con le variabili richieste.",
|
||||||
"error fetching_active_users": "Errore nel recupero degli utenti attivi:",
|
"error fetching_active_users": "Errore nel recupero degli utenti attivi:",
|
||||||
"error_sending_alive_ping": "Errore nell'invio di aliveping:",
|
"error_sending_alive_ping": "Errore nell'invio di aliveping:",
|
||||||
|
|
6
bot.py
6
bot.py
|
@ -109,11 +109,11 @@ async def on_ready():
|
||||||
print(f"{GREEN}{get_translation(LOCALE, 'synced_commands')} {len(synced)} {get_translation(LOCALE, 'synced_commands2')} {RESET}")
|
print(f"{GREEN}{get_translation(LOCALE, 'synced_commands')} {len(synced)} {get_translation(LOCALE, 'synced_commands2')} {RESET}")
|
||||||
slash_commands_enabled = True
|
slash_commands_enabled = True
|
||||||
ping_server() # ping_server from modules/central.py
|
ping_server() # ping_server from modules/central.py
|
||||||
# --- Mostra utenti attivi ---
|
# I FORGOT TO REMOVE THE ITALIAN VERSION FUCKKKKKKKKK
|
||||||
active_users = await fetch_active_users()
|
active_users = await fetch_active_users()
|
||||||
print(f"{GREEN}Utenti attivi: {active_users}{RESET}")
|
print(f"{GREEN}{get_translation(LOCALE, 'active_users:')} {active_users}{RESET}")
|
||||||
print(f"{GREEN}{get_translation(LOCALE, 'started').format(name=NAME)}{RESET}")
|
print(f"{GREEN}{get_translation(LOCALE, 'started').format(name=NAME)}{RESET}")
|
||||||
# --- Avvia il task periodico ---
|
|
||||||
bot.loop.create_task(send_alive_ping_periodically())
|
bot.loop.create_task(send_alive_ping_periodically())
|
||||||
except discord.errors.Forbidden as perm_error:
|
except discord.errors.Forbidden as perm_error:
|
||||||
print(f"{RED}Permission error while syncing commands: {perm_error}{RESET}")
|
print(f"{RED}Permission error while syncing commands: {perm_error}{RESET}")
|
||||||
|
|
|
@ -3,7 +3,7 @@ import re
|
||||||
from PIL import Image, ImageDraw, ImageFont
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
from modules.markovmemory import load_markov_model
|
from modules.markovmemory import load_markov_model
|
||||||
from modules.sentenceprocessing import improve_sentence_coherence, rephrase_for_coherence
|
from modules.sentenceprocessing import improve_sentence_coherence, rephrase_for_coherence
|
||||||
|
# add comments l8r
|
||||||
generated_sentences = set()
|
generated_sentences = set()
|
||||||
|
|
||||||
async def gen_image(input_image_path, sentence_size=5, max_attempts=10):
|
async def gen_image(input_image_path, sentence_size=5, max_attempts=10):
|
||||||
|
|
|
@ -13,12 +13,12 @@ def check_resources():
|
||||||
try:
|
try:
|
||||||
nlp = spacy.load("en_core_web_sm")
|
nlp = spacy.load("en_core_web_sm")
|
||||||
except OSError:
|
except OSError:
|
||||||
print("spaCy model not found. Downloading en_core_web_sm...")
|
print(get_translation(LOCALE, 'spacy_model_not_found'))
|
||||||
spacy.cli.download("en_core_web_sm")
|
spacy.cli.download("en_core_web_sm")
|
||||||
nlp = spacy.load("en_core_web_sm")
|
nlp = spacy.load("en_core_web_sm")
|
||||||
if "spacytextblob" not in nlp.pipe_names:
|
if "spacytextblob" not in nlp.pipe_names:
|
||||||
nlp.add_pipe("spacytextblob")
|
nlp.add_pipe("spacytextblob")
|
||||||
print("spaCy model and spacytextblob are ready.")
|
print(get_translation(LOCALE, 'spacy_initialized'))
|
||||||
|
|
||||||
check_resources()
|
check_resources()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue