i18n: Refactor and fix network error

This commit is contained in:
Michal Šmahel committed 2025-06-09 21:54:45 +02:00
1 parent 6460fe33d6
commit c5efa71875
21 files changed
+65 -42

No files matched your search

@@ -1,8 +1,11 @@
import { Typography } from "@mui/material";
import { useTheme } from "@emotion/react";
import { useTranslation } from "react-i18next";
const NetworkError = () => {
const theme = useTheme();
const { t } = useTranslation();
return (
<>
<Typography
@@ -10,9 +13,9 @@ const NetworkError = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
Network error
{t("common.toasts.networkError")}
</Typography>
<Typography>Please check your connection</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</>
);
};
@@ -46,9 +46,9 @@ const InfrastructureDetails = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
@@ -66,9 +66,9 @@ const InfrastructureMonitors = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
+2 -2
View File
@@ -58,9 +58,9 @@ const Maintenance = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
+2 -2
View File
@@ -52,9 +52,9 @@ const PageSpeedDetails = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
@@ -35,9 +35,9 @@ const PageSpeed = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
+2 -2
View File
@@ -208,9 +208,9 @@ const CreateStatusPage = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
+2 -2
View File
@@ -69,9 +69,9 @@ const PublicStatus = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
@@ -32,9 +32,9 @@ const StatusPages = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
+2 -2
View File
@@ -95,9 +95,9 @@ const UptimeDetails = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
+2 -2
View File
@@ -158,9 +158,9 @@ const UptimeMonitors = () => {
marginY={theme.spacing(4)}
color={theme.palette.primary.contrastTextTertiary}
>
{t("networkError")}
{t("common.toasts.networkError")}
</Typography>
<Typography>{t("checkConnection")}</Typography>
<Typography>{t("common.toasts.checkConnection")}</Typography>
</GenericFallback>
);
}
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": "Přepnout mezi světlým a tmavým motivem"
},
"toasts": {
"networkError": "Chyba připojení k síti",
"checkConnection": "Zkontrolujte prosím své připojení k síti"
}
},
"errorPages": {
@@ -128,7 +132,6 @@
"now": "",
"delete": "",
"configure": "",
"networkError": "",
"responseTime": "",
"ms": "",
"bar": "",
@@ -136,7 +139,6 @@
"country": "",
"city": "",
"response": "",
"checkConnection": "",
"passwordreset": "",
"authRegisterStepOnePersonalDetails": "",
"authCheckEmailOpenEmailButton": "",
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": ""
},
"toasts": {
"networkError": "",
"checkConnection": ""
}
},
"errorPages": {
@@ -128,7 +132,6 @@
"now": "",
"delete": "",
"configure": "",
"networkError": "",
"responseTime": "",
"ms": "",
"bar": "",
@@ -136,7 +139,6 @@
"country": "",
"city": "",
"response": "",
"checkConnection": "",
"passwordreset": "",
"authRegisterStepOnePersonalDetails": "",
"authCheckEmailOpenEmailButton": "",
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": "Toggles light & dark"
},
"toasts": {
"networkError": "Network error",
"checkConnection": "Please check your connection"
}
},
"errorPages": {
@@ -124,7 +128,6 @@
"now": "Now",
"delete": "Delete",
"configure": "Configure",
"networkError": "Network error",
"responseTime": "Response time",
"ms": "ms",
"bar": "Bar",
@@ -132,7 +135,6 @@
"country": "COUNTRY",
"city": "CITY",
"response": "RESPONSE",
"checkConnection": "Please check your connection",
"passwordreset": "Password Reset",
"authRegisterStepOnePersonalDetails": "Enter your personal details",
"authCheckEmailOpenEmailButton": "Open email app",
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": ""
},
"toasts": {
"networkError": "",
"checkConnection": ""
}
},
"errorPages": {
@@ -128,7 +132,6 @@
"now": "",
"delete": "",
"configure": "",
"networkError": "",
"responseTime": "",
"ms": "",
"bar": "",
@@ -136,7 +139,6 @@
"country": "",
"city": "",
"response": "",
"checkConnection": "",
"passwordreset": "",
"authRegisterStepOnePersonalDetails": "",
"authCheckEmailOpenEmailButton": "",
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": ""
},
"toasts": {
"networkError": "Verkkovirhe",
"checkConnection": "Tarkista yhteytesi"
}
},
"errorPages": {
@@ -128,7 +132,6 @@
"now": "Nyt",
"delete": "Poista",
"configure": "Määritä",
"networkError": "Verkkovirhe",
"responseTime": "Vasteaika",
"ms": "ms",
"bar": "Palkki",
@@ -136,7 +139,6 @@
"country": "MAA",
"city": "KAUPUNKI",
"response": "Vastaus",
"checkConnection": "Tarkista yhteytesi",
"passwordreset": "Salasanan nollaus",
"authRegisterStepOnePersonalDetails": "Syötä henkilökohtaiset tietosi",
"authCheckEmailOpenEmailButton": "Avaa sähköpostisovellus",
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": ""
},
"toasts": {
"networkError": "",
"checkConnection": "Vérifiez votre connexion"
}
},
"errorPages": {
@@ -128,7 +132,6 @@
"now": "",
"delete": "Supprimer",
"configure": "",
"networkError": "",
"responseTime": "",
"ms": "",
"bar": "",
@@ -136,7 +139,6 @@
"country": "PAYS",
"city": "VILLE",
"response": "",
"checkConnection": "Vérifiez votre connexion",
"passwordreset": "",
"authRegisterStepOnePersonalDetails": "Saisissez vos infos",
"authCheckEmailOpenEmailButton": "Ouvrir l'appli mail",
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": ""
},
"toasts": {
"networkError": "Erro de rede",
"checkConnection": "Verifique sua conexão"
}
},
"errorPages": {
@@ -127,7 +131,6 @@
"now": "Agora",
"delete": "Deletar",
"configure": "Configurar",
"networkError": "Erro de rede",
"responseTime": "Tempo de resposta",
"ms": "ms",
"bar": "Bar",
@@ -135,7 +138,6 @@
"country": "PAÍS",
"city": "CIDADE",
"response": "RESPOSTA",
"checkConnection": "Verifique sua conexão",
"passwordreset": "Redefinição de senha",
"authRegisterStepOnePersonalDetails": "Insira seus dados pessoais",
"authCheckEmailOpenEmailButton": "Abra o aplicativo de e-mail",
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": ""
},
"toasts": {
"networkError": "Ошибка сети",
"checkConnection": "Пожалуйста, проверьте ваше соединение"
}
},
"errorPages": {
@@ -124,7 +128,6 @@
"now": "Сейчас",
"delete": "Удалить",
"configure": "Настроить",
"networkError": "Ошибка сети",
"responseTime": "Время ответа:",
"ms": "мс",
"bar": "Bar",
@@ -132,7 +135,6 @@
"country": "СТРАНА",
"city": "ГОРОД",
"response": "ОТВЕТ",
"checkConnection": "Пожалуйста, проверьте ваше соединение",
"passwordreset": "Сброс пароля",
"authRegisterStepOnePersonalDetails": "Введите свои личные данные",
"authCheckEmailOpenEmailButton": "Откройте приложение почты",
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": ""
},
"toasts": {
"networkError": "Ağ hatası",
"checkConnection": "Lütfen bağlantınızı kontrol edin"
}
},
"errorPages": {
@@ -128,7 +132,6 @@
"now": "Şimdi",
"delete": "Sil",
"configure": "Yapılandır",
"networkError": "Ağ hatası",
"responseTime": "Yanıt süresi:",
"ms": "ms",
"bar": "Çubuk",
@@ -136,7 +139,6 @@
"country": "ÜLKE",
"city": "ŞEHİR",
"response": "YANIT",
"checkConnection": "Lütfen bağlantınızı kontrol edin",
"passwordreset": "Parola Sıfırlama",
"authRegisterStepOnePersonalDetails": "Kişisel bilgilerinizi girin",
"authCheckEmailOpenEmailButton": "Eposta uygulamasını aç",
+4 -2
View File
@@ -4,6 +4,10 @@
"monitoringAgentName": "Capture",
"buttons": {
"toggleTheme": ""
},
"toasts": {
"networkError": "",
"checkConnection": ""
}
},
"errorPages": {
@@ -128,7 +132,6 @@
"now": "",
"delete": "",
"configure": "",
"networkError": "",
"responseTime": "",
"ms": "",
"bar": "",
@@ -136,7 +139,6 @@
"country": "",
"city": "",
"response": "",
"checkConnection": "",
"passwordreset": "",
"authRegisterStepOnePersonalDetails": "",
"authCheckEmailOpenEmailButton": "",