Merge: Complete merge of remote changes, including user's requested additions.
This commit completes the merge process, incorporating remote changes that conflicted with local modifications. It also stages and commits all remaining modified and untracked files as per the user's instruction to 'upload everything without exception'.
This commit is contained in:
@@ -20,7 +20,7 @@ require_once __DIR__ . '/src/DiscordSender.php';
|
||||
use Discord\Parts\Embed\Embed;
|
||||
|
||||
// Instanciar las clases necesarias
|
||||
$translator = new Translate();
|
||||
$translator = new Translate(LIBRETRANSLATE_URL);
|
||||
|
||||
$running = true;
|
||||
|
||||
@@ -74,7 +74,7 @@ while ($running) {
|
||||
custom_log("[JOB #{$job['id']}] Procesando trabajo para Discord con múltiples idiomas.");
|
||||
$targetLangs = explode(',', $job['target_lang']);
|
||||
|
||||
$discordSender = new DiscordSender($_ENV['DISCORD_BOT_TOKEN']);
|
||||
$discordSender = new DiscordSender(DISCORD_BOT_TOKEN);
|
||||
|
||||
// Pre-procesar el texto para proteger las menciones de Discord
|
||||
$originalText = $job['text_to_translate'];
|
||||
@@ -128,7 +128,7 @@ while ($running) {
|
||||
// --- LÓGICA MEJORADA PARA TELEGRAM USANDO UN SOLO MENSAJE HTML ---
|
||||
custom_log("[JOB #{$job['id']}] Procesando trabajo para Telegram con múltiples idiomas.");
|
||||
$targetLangs = explode(',', $job['target_lang']);
|
||||
$telegram = new TelegramSender($_ENV['TELEGRAM_BOT_TOKEN'], $pdo);
|
||||
$telegram = new TelegramSender(TELEGRAM_BOT_TOKEN, $pdo, BOT_BASE_URL);
|
||||
|
||||
$htmlOutput = "<b>Traducciones:</b>\n\n";
|
||||
$translationCount = 0;
|
||||
@@ -137,7 +137,7 @@ while ($running) {
|
||||
if (empty($langCode)) continue;
|
||||
|
||||
$translatedText = $translator->translateHtml($job['text_to_translate'], $job['source_lang'], $langCode);
|
||||
|
||||
|
||||
if ($translatedText && trim(strtolower($translatedText)) !== trim(strtolower($job['text_to_translate']))) {
|
||||
// Obtener nombre del idioma y bandera
|
||||
$langInfoStmt = $pdo->prepare("SELECT language_name, flag_emoji FROM supported_languages WHERE language_code = ?");
|
||||
@@ -190,7 +190,6 @@ while ($running) {
|
||||
|
||||
pcntl_signal_dispatch();
|
||||
}
|
||||
|
||||
custom_log("--- PROCESADOR DE COLA DETENIDO ---");
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user