Weitere Übersetzung deutsch Spanisch

This commit is contained in:
Cay 2026-01-28 18:02:43 -01:00
parent 114f429429
commit 3f70e1f7f9
13 changed files with 252 additions and 170 deletions

View File

@ -8,6 +8,7 @@ async function showDashboard(req, res) {
const waitingPatients = await getWaitingPatients(db); const waitingPatients = await getWaitingPatients(db);
res.render("dashboard", { res.render("dashboard", {
user: req.session.user, user: req.session.user,
waitingPatients waitingPatients
}); });

View File

@ -44,8 +44,9 @@ function listMedications(req, res, next) {
res.render("medications", { res.render("medications", {
title: "Medikamentenübersicht", title: "Medikamentenübersicht",
sidebarPartial: "partials/sidebar-empty", // ✅ schwarzer Balken links
active: "medications", // ✅ IMMER patient-sidebar verwenden
sidebarPartial: "partials/patient-sidebar",
rows, rows,
query: { q, onlyActive }, query: { q, onlyActive },

View File

@ -26,7 +26,34 @@
"nodata":"keine Daten", "nodata":"keine Daten",
"month":"Monat", "month":"Monat",
"patientcash":"Umsatz pro Patient", "patientcash":"Umsatz pro Patient",
"patient":"Patient" "patient":"Patient",
"systeminfo":"Systeminformationen",
"table":"Tabelle",
"lines":"Zeilen",
"size":"Grösse",
"errordatabase":"Fehler beim Auslesen der Datenbankinfos:",
"welcome":"Willkommen",
"waitingroomtext":"Wartezimmer-Monitor",
"waitingroomtextnopatient":"Keine Patienten im Wartezimmer.",
"gender":"Geschlecht",
"birthday":"Geburtstag",
"email":"E-Mail",
"phone":"Telefon",
"address":"Adresse",
"country":"Land",
"notice":"Notizen",
"create":"Erstellt",
"change":"Geändert",
"reset2":"Zurücksetzen",
"edit":"Bearbeiten",
"selection":"Auswahl",
"waiting":"Wartet bereits",
"towaitingroom":"Ins Wartezimmer",
"overview":"Übersicht",
"upload":"Hochladen",
"lock":"Sperren",
"unlock":"Enrsperren",
"name":"Name"
}, },
"sidebar": { "sidebar": {
"patients": "Patienten", "patients": "Patienten",
@ -75,6 +102,15 @@
"port":"Port", "port":"Port",
"database":"Datenbank", "database":"Datenbank",
"password":"Password", "password":"Password",
"connectiontest":"Verbindung testen" "connectiontest":"Verbindung testen",
"tablecount":"Anzahl Tabellen",
"databasesize":"Datenbankgrösse",
"tableoverview":"Tabellenübersicht"
},
"patienteoverview": {
"patienttitle": "Patientenübersicht",
"newpatient":"Neuer Patient",
"nopatientfound":"Keine Patienten gefunden"
} }
} }

View File

@ -26,8 +26,36 @@
"nodata":"sin datos", "nodata":"sin datos",
"month":"mes", "month":"mes",
"patientcash":"Ingresos por paciente", "patientcash":"Ingresos por paciente",
"patient":"paciente" "patient":"paciente",
"systeminfo":"Información del sistema",
"table":"tablas",
"lines":"líneas",
"size":"Tamaño",
"errordatabase":"Error al leer la información de la base de datos:",
"welcome":"Bienvenido",
"waitingroomtext":"Monitor de sala de espera",
"waitingroomtextnopatient":"No hay pacientes en la sala de espera.",
"gender":"Sexo",
"birthday":"Fecha de nacimiento",
"email":"Correo electrónico",
"phone":"Teléfono",
"address":"AdreDirecciónsse",
"country":"País",
"notice":"Notas",
"create":"Creado",
"change":"Modificado",
"reset2":"Restablecer",
"edit":"editar",
"selection":"Selección",
"waiting":"Ya está esperando",
"towaitingroom":"A la sala de espera",
"overview":"Resumen",
"upload":"Cargar",
"lock":"bloquear",
"unlock":"desbloquear",
"name":"Nombre"
}, },
"sidebar": { "sidebar": {
"patients": "Pacientes", "patients": "Pacientes",
"medications": "Medicamentos", "medications": "Medicamentos",
@ -75,6 +103,15 @@
"database":"Base de datos", "database":"Base de datos",
"password":"Contraseña", "password":"Contraseña",
"connectiontest":"Probar conexión", "connectiontest":"Probar conexión",
"text":"Aquí puedes probar y guardar la conexión a la base de datos. " "text":"Aquí puedes probar y guardar la conexión a la base de datos. ",
"tablecount":"Número de tablas",
"databasesize":"Tamaño de la base de datos",
"tableoverview":"Resumen de tablas"
},
"patienteoverview": {
"patienttitle": "Resumen de pacientes",
"newpatient":"Paciente nuevo",
"nopatientfound":"No se han encontrado pacientes."
} }
} }

Binary file not shown.

View File

@ -40,7 +40,10 @@ async function loginUser(db, username, password, lockTimeMinutes) {
resolve({ resolve({
id: user.id, id: user.id,
username: user.username, username: user.username,
role: user.role role: user.role,
title: user.title,
firstname: user.first_name,
lastname: user.last_name
}); });
} }
); );

View File

@ -132,13 +132,13 @@
<div class="card-body"> <div class="card-body">
<h4 class="mb-3"> <h4 class="mb-3">
<i class="bi bi-info-circle"></i> Systeminformationen <i class="bi bi-info-circle"></i> <%=t.global.systeminfo%>
</h4> </h4>
<% if (typeof systemInfo !== "undefined" && systemInfo && systemInfo.error) { %> <% if (typeof systemInfo !== "undefined" && systemInfo && systemInfo.error) { %>
<div class="alert alert-danger mb-0"> <div class="alert alert-danger mb-0">
Fehler beim Auslesen der Datenbankinfos: <%=t.global.errordatabase%>
<div class="mt-2"><code><%= systemInfo.error %></code></div> <div class="mt-2"><code><%= systemInfo.error %></code></div>
</div> </div>
@ -154,14 +154,14 @@
<div class="col-md-4"> <div class="col-md-4">
<div class="border rounded p-3 h-100"> <div class="border rounded p-3 h-100">
<div class="text-muted small">Anzahl Tabellen</div> <div class="text-muted small"><%=t.databaseoverview.tablecount%></div>
<div class="fw-bold"><%= systemInfo.tableCount %></div> <div class="fw-bold"><%= systemInfo.tableCount %></div>
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<div class="border rounded p-3 h-100"> <div class="border rounded p-3 h-100">
<div class="text-muted small">Datenbankgröße</div> <div class="text-muted small"><%=t.databaseoverview.databasesize%></div>
<div class="fw-bold"><%= systemInfo.dbSizeMB %> MB</div> <div class="fw-bold"><%= systemInfo.dbSizeMB %> MB</div>
</div> </div>
</div> </div>
@ -170,15 +170,15 @@
<% if (systemInfo.tables && systemInfo.tables.length > 0) { %> <% if (systemInfo.tables && systemInfo.tables.length > 0) { %>
<hr> <hr>
<h6 class="mb-2">Tabellenübersicht</h6> <h6 class="mb-2"><%=t.databaseoverview.tableoverview%></h6>
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-sm table-bordered table-hover align-middle"> <table class="table table-sm table-bordered table-hover align-middle">
<thead class="table-dark"> <thead class="table-dark">
<tr> <tr>
<th>Tabelle</th> <th><%=t.global.table%></th>
<th class="text-end">Zeilen</th> <th class="text-end"><%=t.global.lines%></th>
<th class="text-end">Größe (MB)</th> <th class="text-end"><%=t.global.size%> (MB)</th>
</tr> </tr>
</thead> </thead>

View File

@ -24,7 +24,7 @@
WARTEZIMMER MONITOR WARTEZIMMER MONITOR
========================= --> ========================= -->
<div class="waiting-monitor"> <div class="waiting-monitor">
<h5 class="mb-3">🪑 Wartezimmer-Monitor</h5> <h5 class="mb-3">🪑 <%=t.global.waitingroomtext%></h5>
<div class="waiting-grid"> <div class="waiting-grid">
<% if (waitingPatients && waitingPatients.length > 0) { %> <% if (waitingPatients && waitingPatients.length > 0) { %>
@ -56,7 +56,7 @@
<% }) %> <% }) %>
<% } else { %> <% } else { %>
<div class="text-muted">Keine Patienten im Wartezimmer.</div> <div class="text-muted"><%=t.global.waitingroomtextnopatient%></div>
<% } %> <% } %>
</div> </div>
</div> </div>

View File

@ -1,11 +1,11 @@
<%- include("partials/page-header", { <%- include("partials/page-header", {
user, user,
title: "Medikamentenübersicht", title: t.patienteoverview.patienttitle,
subtitle: "", subtitle: "",
showUserName: true showUserName: true
}) %> }) %>
<div class="content p-4"> <div class="content p-4">
<%- include("partials/flash") %> <%- include("partials/flash") %>
@ -135,7 +135,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- ✅ Externes JS (Helmet/CSP safe) -->
<!-- ✅ Externes JS (Helmet/CSP safe) --> <script src="/js/services-lock.js"></script>
<script src="/js/services-lock.js"></script>

View File

@ -75,5 +75,10 @@
<% } %> <% } %>
</a> </a>
<!-- ✅ Logout -->
<a href="/logout" class="nav-item">
<i class="bi bi-box-arrow-right"></i> <%= t.sidebar.logout %>
</a>
</div> </div>
</div> </div>

View File

@ -18,7 +18,7 @@
<div class="page-header-center"> <div class="page-header-center">
<% if (showUser && user?.username) { %> <% if (showUser && user?.username) { %>
<div class="page-header-username"> <div class="page-header-username">
Willkommen, <%= user.username %> <%=t.global.welcome%>, <%= user.title + " " + user.firstname + " " + user.lastname %>
</div> </div>
<% } %> <% } %>

View File

@ -1,6 +1,6 @@
<%- include("partials/page-header", { <%- include("partials/page-header", {
user, user,
title: "Patientenübersicht", title: t.patienteoverview.patienttitle,
subtitle: "", subtitle: "",
showUserName: true showUserName: true
}) %> }) %>
@ -12,7 +12,7 @@
<!-- Aktionen oben --> <!-- Aktionen oben -->
<div class="d-flex gap-2 mb-3"> <div class="d-flex gap-2 mb-3">
<a href="/patients/create" class="btn btn-success"> <a href="/patients/create" class="btn btn-success">
+ Neuer Patient + <%=t.patienteoverview.newpatient%>
</a> </a>
</div> </div>
@ -26,7 +26,7 @@
type="text" type="text"
name="firstname" name="firstname"
class="form-control" class="form-control"
placeholder="Vorname" placeholder=<%=t.global.firstname%>
value="<%= query?.firstname || '' %>" value="<%= query?.firstname || '' %>"
/> />
</div> </div>
@ -36,7 +36,7 @@
type="text" type="text"
name="lastname" name="lastname"
class="form-control" class="form-control"
placeholder="Nachname" placeholder=<%=t.global.lastname%>
value="<%= query?.lastname || '' %>" value="<%= query?.lastname || '' %>"
/> />
</div> </div>
@ -51,9 +51,9 @@
</div> </div>
<div class="col-md-3 d-flex gap-2"> <div class="col-md-3 d-flex gap-2">
<button class="btn btn-primary w-100">Suchen</button> <button class="btn btn-primary w-100"><%=t.global.search%></button>
<a href="/patients" class="btn btn-secondary w-100"> <a href="/patients" class="btn btn-secondary w-100">
Zurücksetzen <%=t.global.reset2%>
</a> </a>
</div> </div>
</form> </form>
@ -65,19 +65,19 @@
<tr> <tr>
<th style="width:40px;"></th> <th style="width:40px;"></th>
<th>ID</th> <th>ID</th>
<th>Name</th> <th><%=t.global.name%></th>
<th>N.I.E. / DNI</th> <th>N.I.E. / DNI</th>
<th>Geschlecht</th> <th><%=t.global.gender%></th>
<th>Geburtstag</th> <th><%=t.global.birthday%></th>
<th>E-Mail</th> <th><%=t.global.email%></th>
<th>Telefon</th> <th><%=t.global.phone%></th>
<th>Adresse</th> <th><%=t.global.address%></th>
<th>Land</th> <th><%=t.global.country%></th>
<th>Status</th> <th><%=t.global.status%></th>
<th>Notizen</th> <th><%=t.global.notice%></th>
<th>Erstellt</th> <th><%=t.global.create%></th>
<th>Geändert</th> <th><%=t.global.change%></th>
<th>Aktionen</th> <th><%=t.global.action%></th>
</tr> </tr>
</thead> </thead>
@ -85,7 +85,7 @@
<% if (patients.length === 0) { %> <% if (patients.length === 0) { %>
<tr> <tr>
<td colspan="15" class="text-center text-muted"> <td colspan="15" class="text-center text-muted">
Keine Patienten gefunden <%=t.patientoverview.nopatientfound%>
</td> </td>
</tr> </tr>
<% } %> <% } %>
@ -161,14 +161,14 @@
<td class="text-nowrap"> <td class="text-nowrap">
<div class="dropdown"> <div class="dropdown">
<button class="btn btn-sm btn-outline-secondary" data-bs-toggle="dropdown"> <button class="btn btn-sm btn-outline-secondary" data-bs-toggle="dropdown">
Auswahl <%=t.global.selection%>
</button> </button>
<ul class="dropdown-menu dropdown-menu-end"> <ul class="dropdown-menu dropdown-menu-end">
<li> <li>
<a class="dropdown-item" href="/patients/edit/<%= p.id %>"> <a class="dropdown-item" href="/patients/edit/<%= p.id %>">
✏️ Bearbeiten ✏️ <%=t.global.edit%>
</a> </a>
</li> </li>
@ -176,12 +176,12 @@
<% if (p.waiting_room) { %> <% if (p.waiting_room) { %>
<li> <li>
<span class="dropdown-item text-muted">🪑 Wartet bereits</span> <span class="dropdown-item text-muted">🪑 <%=t.global.waiting%></span>
</li> </li>
<% } else { %> <% } else { %>
<li> <li>
<form method="POST" action="/patients/waiting-room/<%= p.id %>"> <form method="POST" action="/patients/waiting-room/<%= p.id %>">
<button class="dropdown-item">🪑 Ins Wartezimmer</button> <button class="dropdown-item">🪑 <%=t.global.towaitingroom%></button>
</form> </form>
</li> </li>
<% } %> <% } %>
@ -190,7 +190,7 @@
<li> <li>
<a class="dropdown-item" href="/patients/<%= p.id %>/medications"> <a class="dropdown-item" href="/patients/<%= p.id %>/medications">
💊 Medikamente 💊 <%=t.sidebar.medications%>
</a> </a>
</li> </li>
@ -199,18 +199,18 @@
<li> <li>
<% if (p.active) { %> <% if (p.active) { %>
<form method="POST" action="/patients/deactivate/<%= p.id %>"> <form method="POST" action="/patients/deactivate/<%= p.id %>">
<button class="dropdown-item text-warning">🔒 Sperren</button> <button class="dropdown-item text-warning">🔒 <%=t.global.lock%><</button>
</form> </form>
<% } else { %> <% } else { %>
<form method="POST" action="/patients/activate/<%= p.id %>"> <form method="POST" action="/patients/activate/<%= p.id %>">
<button class="dropdown-item text-success">🔓 Entsperren</button> <button class="dropdown-item text-success">🔓 <%=t.global.unlock%><</button>
</form> </form>
<% } %> <% } %>
</li> </li>
<li> <li>
<a class="dropdown-item" href="/patients/<%= p.id %>"> <a class="dropdown-item" href="/patients/<%= p.id %>">
📋 Übersicht 📋 <%=t.global.overview%>
</a> </a>
</li> </li>
@ -220,7 +220,7 @@
<form method="POST" action="/patients/<%= p.id %>/files" enctype="multipart/form-data"> <form method="POST" action="/patients/<%= p.id %>/files" enctype="multipart/form-data">
<input type="file" name="file" class="form-control form-control-sm mb-2" required /> <input type="file" name="file" class="form-control form-control-sm mb-2" required />
<button class="btn btn-sm btn-secondary w-100"> <button class="btn btn-sm btn-secondary w-100">
📎 Hochladen 📎 <%=t.global.upload%>
</button> </button>
</form> </form>
</li> </li>