feat(i18n): add Spanish localization support with Flask-Babel

- Add Flask-Babel for internationalization
- Configure app for Spanish (default) and English
- Add language switcher in navigation
- Wrap all UI text in templates with gettext()
- Create translation directory structure
- Add complete Spanish translations (58 strings)
- Add English translations (template)
- Compile .po to .mo files
- Add extract_translations.py script for future updates
- Add compile_translations.py script

Spanish is now the default language, with English available via ?lang=en

Translated strings include:
- Navigation (Home, Add Tablet, Add User, etc.)
- User Loans interface (Search, Filter, Status, etc.)
- Table headers (User, Tablet, Serial Number, etc.)
- Buttons (Loan, Return, Search, etc.)
- Messages (No users found, No active loans, etc.)
- All UI text across all templates
This commit is contained in:
ijuanes 2026-06-20 09:58:13 +01:00
parent db7e9591e1
commit 34dd3ca937
13 changed files with 1020 additions and 110 deletions

Binary file not shown.

View file

@ -0,0 +1,192 @@
msgid ""
msgstr ""
"Project-Id-Version: Tablet Management System\n"
"POT-Creation-Date: 2026-06-20\n"
"PO-Revision-Date: 2026-06-20\n"
"Last-Translator: Auto-generated\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Actions"
msgstr "Acciones"
msgid "Active Loans"
msgstr "Préstamos Activos"
msgid "Add Tablet"
msgstr "Añadir Tablet"
msgid "Add User"
msgstr "Añadir Usuario"
msgid "All Users"
msgstr "Todos los Usuarios"
msgid "All users have at least one active loan"
msgstr "Todos los usuarios tienen al menos un préstamo activo"
msgid "Available Tablets"
msgstr "Tablets Disponibles"
msgid "Back to All Users"
msgstr "Volver a Todos los Usuarios"
msgid "Borrower"
msgstr "Prestatario"
msgid "Brand"
msgstr "Marca"
msgid "Call"
msgstr "Llamar"
msgid "Clear Filters"
msgstr "Limpiar Filtros"
msgid "Email"
msgstr "Correo Electrónico"
msgid "English"
msgstr "Inglés"
msgid "Español"
msgstr "Español"
msgid "History"
msgstr "Historial"
msgid "Home"
msgstr "Inicio"
msgid "ID"
msgstr "ID"
msgid "Identification"
msgstr "Identificación"
msgid "Language"
msgstr "Idioma"
msgid "Last Loan Date"
msgstr "Fecha del Último Préstamo"
msgid "Loan"
msgstr "Prestar"
msgid "Loan Date"
msgstr "Fecha de Préstamo"
msgid "Loan History"
msgstr "Historial de Préstamos"
msgid "Loan Status"
msgstr "Estado de Préstamo"
msgid "Loan Tablet"
msgstr "Prestar Tablet"
msgid "Model"
msgstr "Modelo"
msgid "Next"
msgstr "Siguiente"
msgid "No Active Loans"
msgstr "Sin Préstamos Activos"
msgid "No active loans"
msgstr "No hay préstamos activos"
msgid "No available tablets"
msgstr "No hay tablets disponibles"
msgid "No loan history for this user"
msgstr "Este usuario no tiene historial de préstamos"
msgid "No users found"
msgstr "No se encontraron usuarios"
msgid "No users have active loans"
msgstr "No hay usuarios con préstamos activos"
msgid "No users match your search for"
msgstr "Ningún usuario coincide con tu búsqueda de"
msgid "Non-Loanable Devices"
msgstr "Dispositivos No Prestables"
msgid "Notes"
msgstr "Notas"
msgid "N/A"
msgstr "N/D"
msgid "of"
msgstr "de"
msgid "Previous"
msgstr "Anterior"
msgid "Project Management"
msgstr "Gestión de Proyectos"
msgid "Return"
msgstr "Devolver"
msgid "Return Date"
msgstr "Fecha de Devolución"
msgid "Search"
msgstr "Buscar"
msgid "Search by name or identification..."
msgstr "Buscar por nombre o identificación..."
msgid "Search Users"
msgstr "Buscar Usuarios"
msgid "Serial Number"
msgstr "Número de Serie"
msgid "Showing"
msgstr "Mostrando"
msgid "Status"
msgstr "Estado"
msgid "Tablet"
msgstr "Tablet"
msgid "Tablet Management System"
msgstr "Sistema de Gestión de Tablets"
msgid "Tablet Management System - Internal Tool"
msgstr "Sistema de Gestión de Tablets - Herramienta Interna"
msgid "There are no users in the system yet"
msgstr "Aún no hay usuarios en el sistema"
msgid "to"
msgstr "a"
msgid "User"
msgstr "Usuario"
msgid "User Loans"
msgstr "Préstamos por Usuario"
msgid "users"
msgstr "usuarios"
msgid "View"
msgstr "Ver"
msgid "View Details"
msgstr "Ver Detalles"
msgid "With Active Loans"
msgstr "Con Préstamos Activos"