Add default theme translation

This commit is contained in:
Nicola Benaglia 2025-05-25 01:50:00 +02:00
parent 83219cec26
commit 50d78815fa
3 changed files with 4 additions and 6 deletions

View File

@ -12,13 +12,11 @@ import {
} from '@mui/material/styles'; } from '@mui/material/styles';
import { lightThemeOptions } from '../../styles/theme-light'; import { lightThemeOptions } from '../../styles/theme-light';
import { darkThemeOptions } from '../../styles/theme-dark'; import { darkThemeOptions } from '../../styles/theme-dark';
import { useTranslation } from 'react-i18next'; import i18n from '../../i18n/i18n';
const { t } = useTranslation(['auth', 'core', 'group', 'question', 'tutorial']);
const defaultTheme = { const defaultTheme = {
id: 'default', id: 'default',
name: t('core:theme.default', { name: i18n.t('core:theme.default', {
postProcess: 'capitalizeFirstChar', postProcess: 'capitalizeFirstChar',
}), }),
light: lightThemeOptions.palette, light: lightThemeOptions.palette,

View File

@ -264,7 +264,7 @@ export default function ThemeManager() {
{userThemes?.map((theme, index) => ( {userThemes?.map((theme, index) => (
<ListItemButton <ListItemButton
key={theme?.id || index} key={theme?.id || index}
selected={theme?.id === currentThemeId} selected={theme?.id === currentThemeId} // TODO translate (current theme)
> >
<ListItemText <ListItemText
primary={`${theme?.name || `Theme ${index + 1}`} ${theme?.id === currentThemeId ? '(Current)' : ''}`} primary={`${theme?.name || `Theme ${index + 1}`} ${theme?.id === currentThemeId ? '(Current)' : ''}`}

View File

@ -288,7 +288,7 @@
"logout": "sei sicuro di voler fare logout?", "logout": "sei sicuro di voler fare logout?",
"new_user": "sei un nuovo utente?", "new_user": "sei un nuovo utente?",
"delete_chat_image": "vorresti eliminare la tua immagine di chat precedente?", "delete_chat_image": "vorresti eliminare la tua immagine di chat precedente?",
"perform_transaction": "would you like to perform a {{action}} transaction?", "perform_transaction": "vuoi eseguire una transazione {{action}}?",
"provide_thread": "si prega di fornire un titolo al thread", "provide_thread": "si prega di fornire un titolo al thread",
"publish_app": "vorresti pubblicare questa app?", "publish_app": "vorresti pubblicare questa app?",
"publish_avatar": "vorresti pubblicare un avatar?", "publish_avatar": "vorresti pubblicare un avatar?",