diff --git a/src/components/NavbarThemeMenu.astro b/src/components/NavbarThemeMenu.astro index bb37316..7255206 100644 --- a/src/components/NavbarThemeMenu.astro +++ b/src/components/NavbarThemeMenu.astro @@ -4,8 +4,12 @@ import BaseHueInput from './BaseHueInput.astro'; import Button from './Button.astro'; import NavbarPopoverButton from './NavbarPopoverButton.astro'; import { getTheme } from '../layouts/theme'; +import { getLocaleFromUrl, useTranslations } from '@i18n'; const { colorScheme } = getTheme(Astro); + +const lang = getLocaleFromUrl(Astro.url); +const t = useTranslations(lang); --- - +
- Color scheme + {t('theme-menu.color-scheme')}
- Hue + {t('theme-menu.hue')}
- + - +
diff --git a/src/i18n/langs/en.ts b/src/i18n/langs/en.ts index 7a9baed..372c8aa 100644 --- a/src/i18n/langs/en.ts +++ b/src/i18n/langs/en.ts @@ -36,6 +36,14 @@ export default { '404.back': 'Back to home', 'langs.en': 'English', 'langs.fr': 'French', + 'theme-menu.label': 'Edit website theme', + 'theme-menu.color-scheme': 'Color scheme', + 'theme.auto': 'Auto', + 'theme.light': 'Light', + 'theme.dark': 'Dark', + 'theme-menu.hue': 'Hue', + save: 'Save', + reset: 'Reset', /* AVAILABILITY */ availability_cta: 'Read my résumé', diff --git a/src/i18n/langs/fr.ts b/src/i18n/langs/fr.ts index 337b689..1ad67cb 100644 --- a/src/i18n/langs/fr.ts +++ b/src/i18n/langs/fr.ts @@ -37,6 +37,14 @@ export const fr: typeof en = { '404.back': "Retour à l'accueil", 'langs.en': 'Anglais', 'langs.fr': 'Français', + 'theme-menu.label': 'Modifier le thème du site', + 'theme-menu.color-scheme': 'Palette', + 'theme.auto': 'Auto', + 'theme.light': 'Claire', + 'theme.dark': 'Sombre', + 'theme-menu.hue': 'Teinte', + save: 'Sauvegarder', + reset: 'Réinitialiser', /* AVAILABILITY */ availability_cta: 'Lire mon CV',