From b8a6f549e7e6298bc91a437b51b60964aa61c61f Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Thu, 9 Feb 2023 14:26:28 +0530 Subject: [PATCH] UI : Added locailzation (#10151) * added locailzation * minor changes * fix unit test issue --- .../TeamDetails/RolesAndPoliciesList.tsx | 10 +++-- .../TeamDetails/TeamDetailsV1.utils.tsx | 11 ++--- .../TeamDetails/TeamHierarchy.test.tsx | 12 ++--- .../components/TeamDetails/TeamHierarchy.tsx | 12 ++--- .../src/components/onboarding/Onboarding.tsx | 27 ++---------- .../ui/src/constants/Onboarding.constants.ts | 30 +++++++++++++ .../ui/src/locale/languages/en-us.json | 22 +++++++++- .../AddGlossary/AddGlossaryPage.component.tsx | 6 ++- .../CustomPropertiesPageV1.tsx | 4 +- .../ElasticSearchReIndexPage.component.tsx | 20 ++++++--- .../RequestDescriptionPage.tsx | 44 +++++++++++++++---- .../RequestTagPage/RequestTagPage.tsx | 40 +++++++++++++---- .../TaskDetailPage/TaskDetailPage.tsx | 14 ++++-- .../UpdateDescriptionPage.tsx | 36 +++++++++++---- .../TasksPage/UpdateTagPage/UpdateTagPage.tsx | 38 ++++++++++++---- .../src/pages/TasksPage/shared/Assignees.tsx | 3 +- .../TasksPage/shared/DescriptionTabs.tsx | 2 +- .../TasksPage/shared/DescriptionTask.tsx | 4 +- .../pages/TasksPage/shared/TagSuggestion.tsx | 3 +- .../ui/src/pages/page-not-found/index.tsx | 4 +- .../resources/ui/src/pages/signup/index.tsx | 10 +++-- 21 files changed, 249 insertions(+), 103 deletions(-) create mode 100644 openmetadata-ui/src/main/resources/ui/src/constants/Onboarding.constants.ts diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/RolesAndPoliciesList.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/RolesAndPoliciesList.tsx index fb4659c5f06..79c5208fbe5 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/RolesAndPoliciesList.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/RolesAndPoliciesList.tsx @@ -14,6 +14,7 @@ import { Button, Tooltip } from 'antd'; import Table, { ColumnsType } from 'antd/lib/table'; import React, { useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; import { Link } from 'react-router-dom'; import { NO_PERMISSION_FOR_ACTION } from '../../constants/HelperTextUtil'; import { EntityType } from '../../enums/entity.enum'; @@ -37,10 +38,11 @@ const ListEntities = ({ onDelete: (record: EntityReference) => void; hasAccess: boolean; }) => { + const { t } = useTranslation(); const columns: ColumnsType = useMemo(() => { return [ { - title: 'Name', + title: t('label.name'), dataIndex: 'name', width: '200px', key: 'name', @@ -71,7 +73,7 @@ const ListEntities = ({ }, }, { - title: 'Description', + title: t('label.description'), dataIndex: 'description', key: 'description', render: (_, record) => ( @@ -79,7 +81,7 @@ const ListEntities = ({ ), }, { - title: 'Actions', + title: t('label.action-plural'), dataIndex: 'actions', width: '80px', key: 'actions', @@ -87,7 +89,7 @@ const ListEntities = ({ return ( + title={hasAccess ? t('label.remove') : NO_PERMISSION_FOR_ACTION}>