Feature: Traducir todas las vistas - parte 1

- admin/recipients.php: tablas, modales, labels
- admin/comandos.php: títulos, tablas, descripciones
- admin/test_discord_connection.php: formularios, alertas
- admin/ia_agent.php: configuración, parámetros
- profile.php: información, formulario contraseña
- set_webhook.php: alertas, formularios
- chat_telegram.php: usuarios, historial
- translate_message.php: formulario de traducción
This commit is contained in:
2026-02-20 16:01:06 -06:00
parent 65de04209f
commit 2dd99c04dd
8 changed files with 172 additions and 172 deletions

View File

@@ -58,47 +58,47 @@ require_once __DIR__ . '/templates/header.php';
?>
<div class="d-flex justify-content-between align-items-center mb-4">
<h2><i class="bi bi-telegram"></i> Configurar Webhook de Telegram</h2>
<h2><i class="bi bi-telegram"></i> <?= t('Configurar Webhook de Telegram') ?></h2>
</div>
<div class="alert alert-warning">
<i class="bi bi-exclamation-triangle"></i> <strong>Importante:</strong> Telegram requiere obligatoriamente HTTPS con un certificado SSL válido.
Asegúrate de que tu dominio tenga SSL activado. La URL propuesta usa: <code><?= htmlspecialchars($currentUrl) ?></code>
<i class="bi bi-exclamation-triangle"></i> <strong><?= t('Importante') ?>:</strong> <?= t('Telegram requiere obligatoriamente HTTPS con un certificado SSL válido.') ?>
<?= t('Asegúrate de que tu dominio tenga SSL activado.') ?> <?= t('La URL propuesta usa') ?>: <code><?= htmlspecialchars($currentUrl) ?></code>
</div>
<?php if (!empty($results)): ?>
<?php if (isset($results['set'])): ?>
<?php if ($results['set']['ok']): ?>
<div class="alert alert-success">
<i class="bi bi-check-circle"></i> <strong>Webhook configurado correctamente!</strong>
<i class="bi bi-check-circle"></i> <strong><?= t('Webhook configurado correctamente') ?>!</strong>
</div>
<?php else: ?>
<div class="alert alert-danger">
<i class="bi bi-x-circle"></i> <strong>Error:</strong> <?= htmlspecialchars($results['set']['description'] ?? 'Unknown error') ?>
<i class="bi bi-x-circle"></i> <strong><?= t('Error') ?>:</strong> <?= htmlspecialchars($results['set']['description'] ?? 'Unknown error') ?>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if (isset($results['delete'])): ?>
<?php if ($results['delete']['ok']): ?>
<div class="alert alert-success">Webhook eliminado correctamente</div>
<div class="alert alert-success"><?= t('Webhook eliminado correctamente') ?></div>
<?php else: ?>
<div class="alert alert-danger">Error: <?= htmlspecialchars($results['delete']['description'] ?? 'Unknown error') ?></div>
<div class="alert alert-danger"><?= t('Error') ?>: <?= htmlspecialchars($results['delete']['description'] ?? 'Unknown error') ?></div>
<?php endif; ?>
<?php endif; ?>
<?php if (isset($results['info'])): ?>
<div class="card border-0 shadow-sm mb-4">
<div class="card-header bg-white border-0">
<h5 class="mb-0">Estado Actual del Webhook</h5>
<div class="card-header border-0">
<h5 class="mb-0"><?= t('Estado Actual del Webhook') ?></h5>
</div>
<div class="card-body">
<?php if ($results['info']['ok'] && !empty($results['info']['result']['url'])): ?>
<p><strong>URL:</strong> <?= htmlspecialchars($results['info']['result']['url']) ?></p>
<p><strong>Activo:</strong> <?= $results['info']['result']['url'] ? '✅ Sí' : '❌ No' ?></p>
<p><strong>Errores:</strong> <?= $results['info']['result']['last_error_message'] ?? 'Ninguno' ?></p>
<p><strong><?= t('Activo') ?>:</strong> <?= $results['info']['result']['url'] ? '✅ ' . t('Sí') : '❌ ' . t('No') ?></p>
<p><strong><?= t('Errores') ?>:</strong> <?= $results['info']['result']['last_error_message'] ?? t('Ninguno') ?></p>
<?php else: ?>
<p class="text-muted">No hay webhook configurado</p>
<p class="text-muted"><?= t('No hay webhook configurado') ?></p>
<?php endif; ?>
</div>
</div>
@@ -106,11 +106,11 @@ require_once __DIR__ . '/templates/header.php';
<?php endif; ?>
<div class="card border-0 shadow-sm mb-4">
<div class="card-header bg-white border-0">
<h5 class="mb-0">URL del Webhook</h5>
<div class="card-header border-0">
<h5 class="mb-0"><?= t('URL del Webhook') ?></h5>
</div>
<div class="card-body">
<p class="text-muted">URL base para el webhook (se añadirá automáticamente el token de autenticación):</p>
<p class="text-muted"><?= t('URL base para el webhook (se añadirá automáticamente el token de autenticación)') ?>:</p>
<div class="input-group">
<input type="text" class="form-control" value="<?= htmlspecialchars($currentUrl) ?>" readonly>
<button class="btn btn-outline-secondary" onclick="navigator.clipboard.writeText('<?= htmlspecialchars($currentUrl) ?>')">
@@ -123,18 +123,18 @@ require_once __DIR__ . '/templates/header.php';
<div class="row">
<div class="col-md-6">
<div class="card border-0 shadow-sm">
<div class="card-header bg-white border-0">
<h5 class="mb-0">Configurar Webhook</h5>
<div class="card-header border-0">
<h5 class="mb-0"><?= t('Configurar Webhook') ?></h5>
</div>
<div class="card-body">
<form method="POST">
<input type="hidden" name="action" value="set">
<div class="mb-3">
<label class="form-label">URL del webhook</label>
<label class="form-label"><?= t('URL del webhook') ?></label>
<input type="text" name="webhook_url" class="form-control" value="<?= htmlspecialchars($currentUrl) ?>" required>
</div>
<button type="submit" class="btn btn-primary">
<i class="bi bi-plug"></i> Establecer Webhook
<i class="bi bi-plug"></i> <?= t('Establecer Webhook') ?>
</button>
</form>
</div>
@@ -143,21 +143,21 @@ require_once __DIR__ . '/templates/header.php';
<div class="col-md-6">
<div class="card border-0 shadow-sm">
<div class="card-header bg-white border-0">
<h5 class="mb-0">Opciones</h5>
<div class="card-header border-0">
<h5 class="mb-0"><?= t('Opciones') ?></h5>
</div>
<div class="card-body">
<form method="POST" class="mb-2">
<input type="hidden" name="action" value="check">
<button type="submit" class="btn btn-secondary w-100 mb-2">
<i class="bi bi-info-circle"></i> Verificar Estado
<i class="bi bi-info-circle"></i> <?= t('Verificar Estado') ?>
</button>
</form>
<form method="POST" onsubmit="return confirm('¿Eliminar el webhook?');">
<form method="POST" onsubmit="return confirm('<?= t('¿Eliminar el webhook?') ?>');">
<input type="hidden" name="action" value="delete">
<button type="submit" class="btn btn-danger w-100">
<i class="bi bi-trash"></i> Eliminar Webhook
<i class="bi bi-trash"></i> <?= t('Eliminar Webhook') ?>
</button>
</form>
</div>