Add label translations

This commit is contained in:
Nicola Benaglia
2025-05-21 20:44:41 +02:00
parent 95f35d4e30
commit 4240cec2e1
10 changed files with 65 additions and 21 deletions

View File

@@ -316,8 +316,18 @@ export default function ThemeManager() {
onChange={(e, newValue) => setCurrentTab(newValue)}
sx={{ mt: 2, mb: 2 }}
>
<Tab label="Light" value="light" />
<Tab label="Dark" value="dark" />
<Tab
label={t('core:theme.light', {
postProcess: 'capitalizeFirstChar',
})}
value="light"
/>
<Tab
label={t('core:theme.dark', {
postProcess: 'capitalizeFirstChar',
})}
value="dark"
/>
</Tabs>
<Box>
@@ -412,6 +422,7 @@ export default function ThemeManager() {
<Button onClick={() => setOpenEditor(false)}>
{t('core:action.cancel', { postProcess: 'capitalizeFirstChar' })}
</Button>
<Button
disabled={!themeDraft.name}
onClick={handleSaveTheme}

View File

@@ -6,7 +6,6 @@ import { useTranslation } from 'react-i18next';
const ThemeSelector = () => {
const { t } = useTranslation(['auth', 'core', 'group']);
const { themeMode, toggleTheme } = useThemeContext();
return (
@@ -22,10 +21,10 @@ const ThemeSelector = () => {
<Tooltip
title={
themeMode === 'dark'
? t('core:theme.light', {
? t('core:theme.light_mode', {
postProcess: 'capitalizeFirstChar',
})
: t('core:theme.light', {
: t('core:theme.dark_mode', {
postProcess: 'capitalizeFirstChar',
})
}