From 6b81eabf07533ea574915744236a009b55758952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0mahel?= <48548230+ceskyDJ@users.noreply.github.com> Date: Sat, 7 Jun 2025 17:49:37 +0200 Subject: [PATCH] i18n: Fix theme toggle --- client/src/Components/ThemeSwitch/index.jsx | 4 +++- client/src/locales/cs.json | 5 ++++- client/src/locales/de.json | 5 ++++- client/src/locales/en.json | 5 ++++- client/src/locales/es.json | 5 ++++- client/src/locales/fi.json | 5 ++++- client/src/locales/fr.json | 5 ++++- client/src/locales/pt-BR.json | 5 ++++- client/src/locales/ru.json | 5 ++++- client/src/locales/tr.json | 5 ++++- client/src/locales/zh-TW.json | 5 ++++- 11 files changed, 43 insertions(+), 11 deletions(-) diff --git a/client/src/Components/ThemeSwitch/index.jsx b/client/src/Components/ThemeSwitch/index.jsx index 6c879b289..d1a7661bc 100644 --- a/client/src/Components/ThemeSwitch/index.jsx +++ b/client/src/Components/ThemeSwitch/index.jsx @@ -14,10 +14,12 @@ import SunAndMoonIcon from "./SunAndMoonIcon"; import { useDispatch, useSelector } from "react-redux"; import { setMode } from "../../Features/UI/uiSlice"; import "./index.css"; +import {useTranslation} from "react-i18next"; const ThemeSwitch = ({ width = 48, height = 48, color }) => { const mode = useSelector((state) => state.ui.mode); const dispatch = useDispatch(); + const { t } = useTranslation(); const toggleTheme = () => { dispatch(setMode(mode === "light" ? "dark" : "light")); @@ -26,7 +28,7 @@ const ThemeSwitch = ({ width = 48, height = 48, color }) => { return (