From 49fe1e280979e14585f80f5d987d6b0b6eedf516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=91=D0=B0=D0=B1?= =?UTF-8?q?=D1=83=D1=88=D0=BA=D0=B8=D0=BD?= Date: Thu, 13 Mar 2025 10:06:36 +0100 Subject: [PATCH] add few locales --- frontend/app/components/Alerts/AlertForm.tsx | 2 +- frontend/app/components/Client/ProfileSettings/OptOut.js | 5 +++-- .../components/ClickMapRagePicker/ClickMapRagePicker.tsx | 2 +- frontend/app/locales/en.json | 4 +++- frontend/app/locales/es.json | 4 +++- frontend/app/locales/fr.json | 4 +++- frontend/app/locales/ru.json | 4 +++- frontend/app/locales/zh.json | 4 +++- 8 files changed, 20 insertions(+), 9 deletions(-) diff --git a/frontend/app/components/Alerts/AlertForm.tsx b/frontend/app/components/Alerts/AlertForm.tsx index 84133bc69..33f89cd7d 100644 --- a/frontend/app/components/Alerts/AlertForm.tsx +++ b/frontend/app/components/Alerts/AlertForm.tsx @@ -348,7 +348,7 @@ function AlertForm(props) { type="checkbox" checked={instance.webhook} onClick={onChangeCheck} - label="Webhook" + label={t('Webhook')} /> diff --git a/frontend/app/components/Client/ProfileSettings/OptOut.js b/frontend/app/components/Client/ProfileSettings/OptOut.js index 25f09a0f0..13b14154a 100644 --- a/frontend/app/components/Client/ProfileSettings/OptOut.js +++ b/frontend/app/components/Client/ProfileSettings/OptOut.js @@ -3,6 +3,7 @@ import { Checkbox } from 'UI'; import { observer } from 'mobx-react-lite'; import { useStore } from 'App/mstore'; import { toast } from 'react-toastify'; +import { t } from 'i18next'; function OptOut() { const { userStore } = useStore(); @@ -13,10 +14,10 @@ function OptOut() { setOptOut(!optOut); void updateClient({ optOut: !optOut }) .then(() => { - toast('Account settings updated successfully', { type: 'success' }); + toast(t('Account settings updated successfully'), { type: 'success' }); }) .catch((e) => { - toast(e.message || 'Failed to update account settings', { + toast(e.message || t('Failed to update account settings'), { type: 'error', }); setOptOut(optOut); diff --git a/frontend/app/components/Dashboard/components/ClickMapRagePicker/ClickMapRagePicker.tsx b/frontend/app/components/Dashboard/components/ClickMapRagePicker/ClickMapRagePicker.tsx index 5171e706d..0efaa75dc 100644 --- a/frontend/app/components/Dashboard/components/ClickMapRagePicker/ClickMapRagePicker.tsx +++ b/frontend/app/components/Dashboard/components/ClickMapRagePicker/ClickMapRagePicker.tsx @@ -40,7 +40,7 @@ function ClickMapRagePicker() { return (
- +