This commit introduces a comprehensive message translation system for the Discord bot, featuring:
- Interactive language selection buttons for each translatable message.
- Ephemeral translation responses visible only to the requesting user.
- Robust filtering to prevent translation buttons for messages consisting solely of emojis, stickers, GIFs, or other non-translatable content.
- Preservation of non-textual elements (images, video thumbnails, stickers) alongside translated text in embeds.
- Full compatibility with DiscordPHP v7, addressing various API usage and error handling specifics (e.g., then , correct handling of null message properties, intent).
Additionally, this commit resolves an incompatibility introduced in the shared class, ensuring that the Telegram bot's translation functionality remains fully operational by correctly parsing return values across both platforms.
The following files were modified:
- : Main Discord bot logic for message handling, button generation, and interaction processing.
- : Adjusted to return full API response including confidence score.
- : Updated environment variable loading and added new constants for service URLs and tokens.
- : Updated constructor to include for absolute URL generation.
- : Adjusted all calls to to correctly extract language codes from the new array return format, resolving Telegram bot's translation issues.
- Agregar atributo data-bs-theme al HTML
- Implementar botón toggle con íconos sol/luna en navegación
- Agregar estilos CSS para modo oscuro (variables, componentes, tablas)
- Implementar JavaScript para funcionalidad toggle con persistencia localStorage
- Agregar detección automática del tema del sistema
- Fix específico para columna "Contenido (Previo)" en sent_messages.php
- Mejorar Content Security Policy para archivos .map de Bootstrap
- Configuración de entorno automática para .env.pruebas
Características:
- Toggle claro/oscuro con persistencia
- Detección automática de preferencias del sistema
- Estilos personalizados para componentes en modo oscuro
- Compatibilidad con todas las páginas del sistema