From 17a5089c249bbc8f9a8400de557fc11e1c2c434c Mon Sep 17 00:00:00 2001 From: Andrey Babushkin <55714097+reyand43@users.noreply.github.com> Date: Mon, 10 Mar 2025 23:19:54 +0100 Subject: [PATCH] updated locales (#3129) --- .../components/Client/Projects/ProjectList.tsx | 6 ++++-- .../Roles/components/RoleItem/RoleItem.tsx | 4 +++- .../Examples/SessionsBy/ByIssues.tsx | 10 ++++++---- .../components/ListingVisibility.tsx | 2 +- .../components/SessionTags/SessionTags.tsx | 4 +++- frontend/app/locales/en.json | 6 +++++- frontend/app/locales/es.json | 6 +++++- frontend/app/locales/fr.json | 6 +++++- frontend/app/locales/ru.json | 16 ++++++++++------ frontend/app/locales/zh.json | 6 +++++- 10 files changed, 47 insertions(+), 19 deletions(-) diff --git a/frontend/app/components/Client/Projects/ProjectList.tsx b/frontend/app/components/Client/Projects/ProjectList.tsx index 353b9a18c..78595674b 100644 --- a/frontend/app/components/Client/Projects/ProjectList.tsx +++ b/frontend/app/components/Client/Projects/ProjectList.tsx @@ -16,10 +16,12 @@ import { Globe, Smartphone } from 'lucide-react'; import { SearchOutlined, EditOutlined } from '@ant-design/icons'; import ProjectForm from 'Components/Client/Projects/ProjectForm'; import { useModal } from 'Components/ModalContext'; +import { useTranslation } from 'react-i18next'; type MenuItem = Required['items'][number]; const ProjectList: React.FC = () => { + const { t } = useTranslation(); const { projectsStore } = useStore(); const [search, setSearch] = React.useState(''); const { openModal, closeModal } = useModal(); @@ -41,7 +43,7 @@ const ProjectList: React.FC = () => { projectsStore.initProject(project); openModal(, { - title: 'Edit Project', + title: t('Edit Project'), }); }; @@ -74,7 +76,7 @@ const ProjectList: React.FC = () => {
} onChange={(e) => setSearch(e.target.value)} diff --git a/frontend/app/components/Client/Roles/components/RoleItem/RoleItem.tsx b/frontend/app/components/Client/Roles/components/RoleItem/RoleItem.tsx index 352b0af5c..d423f36be 100644 --- a/frontend/app/components/Client/Roles/components/RoleItem/RoleItem.tsx +++ b/frontend/app/components/Client/Roles/components/RoleItem/RoleItem.tsx @@ -4,6 +4,7 @@ import { Button } from 'antd'; import cn from 'classnames'; import { CLIENT_TABS, client as clientRoute } from 'App/routes'; import stl from './roleItem.module.css'; +import { useTranslation } from 'react-i18next'; function PermisionLabel({ label }: any) { return
{label}
; @@ -33,6 +34,7 @@ function RoleItem({ permissions, projects, }: Props) { + const { t } = useTranslation(); return (
{role.allProjects ? ( ) : ( diff --git a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByIssues.tsx b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByIssues.tsx index d96d4466d..99f103761 100644 --- a/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByIssues.tsx +++ b/frontend/app/components/Dashboard/components/DashboardList/NewDashModal/Examples/SessionsBy/ByIssues.tsx @@ -4,29 +4,31 @@ import { Icon } from 'UI'; import ExCard from '../ExCard'; import ByComponent from './Component'; +import { useTranslation } from 'react-i18next'; function ByIssues(props: any) { + const { t } = useTranslation(); const rows = [ { - label: 'Dead Click', + label: t('Dead Click'), progress: 85, value: '2.5K', icon: , }, { - label: 'Click Rage', + label: t('Click Rage'), progress: 25, value: '405', icon: , }, { - label: 'Bad Request', + label: t('Bad Request'), progress: 5, value: '302', icon: , }, { - label: 'Mouse Thrashing', + label: t('Mouse Thrashing'), progress: 3, value: '194', icon: , diff --git a/frontend/app/components/shared/SessionSettings/components/ListingVisibility.tsx b/frontend/app/components/shared/SessionSettings/components/ListingVisibility.tsx index 3fe32787b..810907187 100644 --- a/frontend/app/components/shared/SessionSettings/components/ListingVisibility.tsx +++ b/frontend/app/components/shared/SessionSettings/components/ListingVisibility.tsx @@ -42,7 +42,7 @@ function ListingVisibility() {