added translations in AdminPanel

This commit is contained in:
Laura Dolibois
2025-06-16 18:20:53 +02:00
parent 7176ca7c93
commit ed2c5824aa
3 changed files with 11 additions and 13 deletions

View File

@@ -120,6 +120,7 @@
"register": "Registrieren", "register": "Registrieren",
"backToLogin": "Zurück zum Login", "backToLogin": "Zurück zum Login",
"noAccountRegister": "Noch kein Konto? Registrieren.", "noAccountRegister": "Noch kein Konto? Registrieren.",
"delete": "Löschen", "delete": "Löschen",
"pleaseEnterPassword": "Bitte Passwort eingeben" "pleaseEnterPassword": "Bitte Passwort eingeben",
"mainAdminMenu": "Admin-Hauptmenü"
} }

View File

@@ -121,5 +121,6 @@
"backToLogin": "Back to login", "backToLogin": "Back to login",
"noAccountRegister": "Dont have an account? Register.", "noAccountRegister": "Dont have an account? Register.",
"delete": "Delete", "delete": "Delete",
"pleaseEnterPassword": "Please enter password" "pleaseEnterPassword": "Please enter password",
"mainAdminMenu": "Main Administration Menu"
} }

View File

@@ -11,7 +11,7 @@ import {
ListItemButton, ListItemButton,
ListItemIcon, ListItemIcon,
ListItemText, ListItemText,
useTheme useTheme,
} from "@mui/material"; } from "@mui/material";
import { useState } from "react"; import { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -61,14 +61,11 @@ export default function AdminPanel() {
className="home-page-background" className="home-page-background"
style={{ style={{
color: theme.palette.text.primary, color: theme.palette.text.primary,
backgroundColor: theme.palette.background.paper backgroundColor: theme.palette.background.paper,
}} }}>
>
{/* Sidebar */} {/* Sidebar */}
<Box <Box className="sidebar">
className="sidebar" <nav aria-label={t("mainAdminMenu")}>
>
<nav aria-label="main admin menu">
<List> <List>
{menuItems.map((item) => ( {menuItems.map((item) => (
<ListItem key={item.key} disablePadding> <ListItem key={item.key} disablePadding>
@@ -83,8 +80,7 @@ export default function AdminPanel() {
"&:hover": { "&:hover": {
bgcolor: theme.palette.action.hover, bgcolor: theme.palette.action.hover,
}, },
}} }}>
>
<ListItemIcon sx={{ color: "inherit" }}>{item.icon}</ListItemIcon> <ListItemIcon sx={{ color: "inherit" }}>{item.icon}</ListItemIcon>
<ListItemText primary={item.label} /> <ListItemText primary={item.label} />
</ListItemButton> </ListItemButton>