Generated by Spark: Add translations to user profile dropdown menu

This commit is contained in:
2026-02-05 18:33:26 +00:00
committed by GitHub
parent 3207d7f4e8
commit 07627f7e27
4 changed files with 16 additions and 7 deletions

View File

@@ -171,13 +171,13 @@ export function Sidebar({ currentView, setCurrentView, currentEntity, setCurrent
<button
onClick={() => setCurrentView('profile')}
className="w-full flex items-center gap-3 p-2 rounded-lg hover:bg-secondary/50 transition-colors focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring"
aria-label={`View profile for ${user?.name || 'User'}`}
aria-label={t('sidebar.viewProfileFor', { name: user?.name || t('common.user') || 'User' })}
>
<div className="w-8 h-8 rounded-full bg-primary flex items-center justify-center text-primary-foreground text-sm font-medium" aria-hidden="true">
{getUserInitials()}
</div>
<div className="flex-1 min-w-0 text-left">
<p className="text-sm font-medium truncate">{user?.name || 'User'}</p>
<p className="text-sm font-medium truncate">{user?.name || t('common.user') || 'User'}</p>
<p className="text-xs text-muted-foreground truncate">{user?.email || ''}</p>
</div>
</button>

View File

@@ -47,7 +47,9 @@
"selectEntity": "Select entity",
"componentLibrary": "Component Library",
"businessLogicHooks": "Business Logic Hooks",
"logOut": "Log Out"
"logOut": "Log Out",
"viewProfile": "View profile",
"viewProfileFor": "View profile for {{name}}"
},
"entities": {
"mainAgency": "Main Agency",
@@ -100,7 +102,8 @@
"and": "and",
"of": "of",
"to": "to",
"from": "from"
"from": "from",
"user": "User"
},
"dashboard": {
"title": "Dashboard",

View File

@@ -47,7 +47,9 @@
"selectEntity": "Seleccionar entidad",
"componentLibrary": "Biblioteca de Componentes",
"businessLogicHooks": "Hooks de Lógica de Negocio",
"logOut": "Cerrar Sesión"
"logOut": "Cerrar Sesión",
"viewProfile": "Ver perfil",
"viewProfileFor": "Ver perfil de {{name}}"
},
"entities": {
"mainAgency": "Agencia Principal",
@@ -101,6 +103,7 @@
"of": "de",
"to": "a",
"from": "desde"
"user": "Usuario",
},
"dashboard": {
"title": "Panel de Control",

View File

@@ -47,7 +47,9 @@
"selectEntity": "Sélectionner l'entité",
"componentLibrary": "Bibliothèque de Composants",
"businessLogicHooks": "Hooks de Logique Métier",
"logOut": "Se Déconnecter"
"logOut": "Se Déconnecter",
"viewProfile": "Voir le profil",
"viewProfileFor": "Voir le profil de {{name}}"
},
"entities": {
"mainAgency": "Agence Principale",
@@ -100,7 +102,8 @@
"and": "et",
"of": "de",
"to": "à",
"from": "de"
"from": "de",
"user": "Utilisateur"
},
"dashboard": {
"title": "Tableau de Bord",