From 19b350761cc0b3814770f04ea9a79a85cf7c9df9 Mon Sep 17 00:00:00 2001 From: Andrey Babushkin <55714097+reyand43@users.noreply.github.com> Date: Thu, 13 Mar 2025 12:08:08 +0300 Subject: [PATCH] add few locales (#3151) --- 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 (
- +