Feature: Sistema multi-idioma con LibreTranslate
- Nuevo includes/i18n.php con funciones t() para traducción - Selector de idioma en navbar y login - Traducciones aplicadas a: dashboard, login, mensajes programados, crear mensaje, sistema - Usa idiomas activados desde admin/languages.php - Caché de traducciones incluido
This commit is contained in:
@@ -5,7 +5,7 @@ checkSession();
|
||||
require_once __DIR__ . '/includes/message_handler.php';
|
||||
require_once __DIR__ . '/includes/schedule_actions.php';
|
||||
|
||||
$pageTitle = 'Mensajes Programados';
|
||||
$pageTitle = t('Mensajes Programados');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action'])) {
|
||||
$scheduleId = (int) $_POST['schedule_id'];
|
||||
@@ -24,32 +24,32 @@ require_once __DIR__ . '/templates/header.php';
|
||||
?>
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h2><i class="bi bi-clock"></i> Mensajes Programados</h2>
|
||||
<h2><i class="bi bi-stopwatch"></i> <?= t('Mensajes Programados') ?></h2>
|
||||
<a href="create_message.php" class="btn btn-primary">
|
||||
<i class="bi bi-plus-circle"></i> Nuevo Mensaje
|
||||
<i class="bi bi-plus-circle"></i> <?= t('Nuevo Mensaje') ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<?php if (isset($_GET['success'])): ?>
|
||||
<div class="alert alert-success">Mensaje creado exitosamente</div>
|
||||
<div class="alert alert-success"><?= t('Mensaje creado exitosamente') ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="card border-0 shadow-sm">
|
||||
<div class="card-body">
|
||||
<?php if (empty($messages)): ?>
|
||||
<p class="text-muted text-center py-4">No hay mensajes programados</p>
|
||||
<p class="text-muted text-center py-4"><?= t('No hay mensajes programados') ?></p>
|
||||
<?php else: ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Destinatario</th>
|
||||
<th>Plataforma</th>
|
||||
<th>Fecha de Envío</th>
|
||||
<th>Tipo</th>
|
||||
<th>Estado</th>
|
||||
<th>Acciones</th>
|
||||
<th><?= t('ID') ?></th>
|
||||
<th><?= t('Destinatario') ?></th>
|
||||
<th><?= t('Plataforma') ?></th>
|
||||
<th><?= t('Fecha de Envío') ?></th>
|
||||
<th><?= t('Tipo') ?></th>
|
||||
<th><?= t('Estado') ?></th>
|
||||
<th><?= t('Acciones') ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -67,9 +67,9 @@ require_once __DIR__ . '/templates/header.php';
|
||||
<td><?= date('d/m/Y H:i', strtotime($msg['send_time'])) ?></td>
|
||||
<td>
|
||||
<?php if ($msg['is_recurring']): ?>
|
||||
<span class="badge bg-info">Recurrente</span>
|
||||
<span class="badge bg-info"><?= t('Recurrente') ?></span>
|
||||
<?php else: ?>
|
||||
<span class="badge bg-secondary">Único</span>
|
||||
<span class="badge bg-secondary"><?= t('Único') ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
@@ -82,7 +82,7 @@ require_once __DIR__ . '/templates/header.php';
|
||||
'cancelled' => 'dark',
|
||||
default => 'light'
|
||||
} ?>">
|
||||
<?= $msg['status'] ?>
|
||||
<?= t($msg['status']) ?>
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
@@ -91,7 +91,7 @@ require_once __DIR__ . '/templates/header.php';
|
||||
<form method="POST" class="d-inline">
|
||||
<input type="hidden" name="schedule_id" value="<?= $msg['id'] ?>">
|
||||
<input type="hidden" name="action" value="disable">
|
||||
<button type="submit" class="btn btn-outline-warning" title="Deshabilitar">
|
||||
<button type="submit" class="btn btn-outline-warning" title="<?= t('Deshabilitar') ?>">
|
||||
<i class="bi bi-pause"></i>
|
||||
</button>
|
||||
</form>
|
||||
@@ -99,7 +99,7 @@ require_once __DIR__ . '/templates/header.php';
|
||||
<form method="POST" class="d-inline">
|
||||
<input type="hidden" name="schedule_id" value="<?= $msg['id'] ?>">
|
||||
<input type="hidden" name="action" value="enable">
|
||||
<button type="submit" class="btn btn-outline-success" title="Habilitar">
|
||||
<button type="submit" class="btn btn-outline-success" title="<?= t('Habilitar') ?>">
|
||||
<i class="bi bi-play"></i>
|
||||
</button>
|
||||
</form>
|
||||
@@ -107,26 +107,26 @@ require_once __DIR__ . '/templates/header.php';
|
||||
<form method="POST" class="d-inline">
|
||||
<input type="hidden" name="schedule_id" value="<?= $msg['id'] ?>">
|
||||
<input type="hidden" name="action" value="retry">
|
||||
<button type="submit" class="btn btn-outline-info" title="Reintentar">
|
||||
<button type="submit" class="btn btn-outline-info" title="<?= t('Reintentar') ?>">
|
||||
<i class="bi bi-arrow-clockwise"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($msg['status'] !== 'sent'): ?>
|
||||
<form method="POST" class="d-inline" onsubmit="return confirm('¿Cancelar este mensaje?');">
|
||||
<form method="POST" class="d-inline" onsubmit="return confirm('<?= t('¿Cancelar este mensaje?') ?>');">
|
||||
<input type="hidden" name="schedule_id" value="<?= $msg['id'] ?>">
|
||||
<input type="hidden" name="action" value="cancel">
|
||||
<button type="submit" class="btn btn-outline-secondary" title="Cancelar">
|
||||
<button type="submit" class="btn btn-outline-secondary" title="<?= t('Cancelar') ?>">
|
||||
<i class="bi bi-x-circle"></i>
|
||||
</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
|
||||
<form method="POST" class="d-inline" onsubmit="return confirm('¿Eliminar este mensaje?');">
|
||||
<form method="POST" class="d-inline" onsubmit="return confirm('<?= t('¿Eliminar este mensaje?') ?>');">
|
||||
<input type="hidden" name="schedule_id" value="<?= $msg['id'] ?>">
|
||||
<input type="hidden" name="action" value="delete">
|
||||
<button type="submit" class="btn btn-outline-danger" title="Eliminar">
|
||||
<button type="submit" class="btn btn-outline-danger" title="<?= t('Eliminar') ?>">
|
||||
<i class="bi bi-trash"></i>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user