mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-03 06:59:32 -05:00
i18n: Fix theme toggle
This commit is contained in:
@@ -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 (
|
||||
<IconButton
|
||||
id="theme-toggle"
|
||||
title="Toggles light & dark"
|
||||
title={t("common.buttons.toggleTheme")}
|
||||
className={`theme-${mode}`}
|
||||
aria-label="auto"
|
||||
aria-live="polite"
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": "Přepnout mezi světlým a tmavým motivem"
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "",
|
||||
"email": "",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": ""
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "Noch kein Konto",
|
||||
"email": "E-Mail",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": "Toggles light & dark"
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "Don't have account",
|
||||
"email": "E-mail",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": ""
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "No tengo una cuenta",
|
||||
"email": "Correo electronico",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": ""
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "Ei tiliä",
|
||||
"email": "Sähköposti",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": ""
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "Vous n'avez pas de compte",
|
||||
"email": "E-mail",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": ""
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "Não tenho conta",
|
||||
"email": "E-mail",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": ""
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "Нет аккаунта",
|
||||
"email": "Почта",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": ""
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "Hesabınız yok mu",
|
||||
"email": "E-posta",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"appName": "Checkmate",
|
||||
"monitoringAgentName": "Capture"
|
||||
"monitoringAgentName": "Capture",
|
||||
"buttons": {
|
||||
"toggleTheme": ""
|
||||
}
|
||||
},
|
||||
"dontHaveAccount": "沒有帳號",
|
||||
"email": "E-mail",
|
||||
|
||||
Reference in New Issue
Block a user