chore(ui) : Add missing localization part 2 (#10222)

* chore(ui) : Add missing localization

* fix : unit test

* chore : add missing locale keys

* chore : add missing locale keys

* fix: cy failures

* fix : cy test

* address comments

* chore(ui) : Add missing localization part 2

* fix: unit test

---------

Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
This commit is contained in:
Sachin Chaurasiya 2023-02-21 12:44:46 +05:30 committed by GitHub
parent 219adbe9d9
commit 46bdc8ab64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 154 additions and 94 deletions

View File

@ -268,7 +268,7 @@ const AddService = ({
{activeServiceStep === 3 && (
<ConnectionConfigForm
cancelText="Back"
cancelText={t('label.back')}
serviceCategory={serviceCategory}
serviceType={selectServiceType}
status={saveServiceState}
@ -327,7 +327,9 @@ const AddService = ({
activeIngestionStep={activeIngestionStep}
handleCancelClick={() => handleAddIngestion(false)}
handleViewServiceClick={handleViewServiceClick}
heading={`Add ${capitalize(PipelineType.Metadata)} Ingestion`}
heading={`${t('label.add-workflow-ingestion', {
workflow: capitalize(PipelineType.Metadata),
})}`}
ingestionAction={ingestionAction}
ingestionProgress={ingestionProgress}
isIngestionCreated={isIngestionCreated}

View File

@ -32,22 +32,26 @@ const ConfigureService = ({
const validationErrorMsg = (): string => {
if (showError.name) {
return 'Service name is required';
return t('message.field-text-is-required', {
fieldText: t('label.service-name'),
});
}
if (showError.duplicateName) {
return 'Service name already exists';
return t('message.entity-already-exists', {
entity: t('label.service-name'),
});
}
if (showError.delimit) {
return 'Service name with delimiters are not allowed';
return t('message.service-with-delimiters-not-allowed');
}
if (showError.nameWithSpace) {
return 'Service name with spaces are not allowed';
return t('message.service-with-space-not-allowed');
}
if (showError.nameLength) {
return 'Service name length must be between 1 and 128 characters';
return t('message.service-name-length');
}
if (showError.specialChar) {
return 'Service name contains special characters that are not allowed';
return t('message.special-character-not-allowed');
}
return '';
@ -57,7 +61,7 @@ const ConfigureService = ({
<div data-testid="configure-service-container">
<Field>
<label className="tw-block tw-form-label" htmlFor="serviceName">
{requiredField('Service Name:')}
{requiredField(`${t('label.service-name')}:`)}
</label>
<input
@ -65,7 +69,7 @@ const ConfigureService = ({
data-testid="service-name"
id="serviceName"
name="serviceName"
placeholder="service name"
placeholder={t('label.service-name')}
type="text"
value={serviceName}
onChange={handleValidation}

View File

@ -100,7 +100,9 @@ const SelectServiceType = ({
<Field>
<Searchbar
removeMargin
placeholder="Search for connector..."
placeholder={`${t('label.search-for-type', {
type: t('label.connector'),
})}...`}
searchValue={connectorSearchTerm}
typingInterval={500}
onSearch={handleConnectorSearchTerm}
@ -138,7 +140,12 @@ const SelectServiceType = ({
))}
</div>
</div>
{showError && errorMsg('Service is required')}
{showError &&
errorMsg(
t('message.field-text-is-required', {
fieldText: t('label.service'),
})
)}
</Field>
<Field className="tw-flex tw-justify-end tw-mt-10">
<Button

View File

@ -88,7 +88,9 @@ const AddCustomProperty = () => {
const handleError = (flag: boolean, property: string) => {
const message =
property === 'name' ? 'Invalid Property Name' : 'Type is required';
property === 'name'
? t('message.invalid-property-name')
: t('message.field-text-is-required', { fieldText: t('label.type') });
setFormErrorData((preVdata) => ({
...preVdata,
@ -182,7 +184,7 @@ const AddCustomProperty = () => {
<Field>
<label className="tw-block tw-form-label" htmlFor="name">
{requiredField('Name:')}
{requiredField(`${t('label.name')}:`)}
</label>
<input
autoComplete="off"
@ -190,7 +192,7 @@ const AddCustomProperty = () => {
data-testid="name"
id="name"
name="name"
placeholder="Name"
placeholder={t('label.name')}
type="text"
value={formData.name}
onChange={onChangeHandler}
@ -200,14 +202,14 @@ const AddCustomProperty = () => {
<Field>
<label className="tw-block tw-form-label" htmlFor="type">
{requiredField('Type:')}
{requiredField(`${t('label.type')}:`)}
</label>
<select
className="tw-form-inputs tw-form-inputs-padding"
data-testid="type"
id="type"
name="type"
placeholder="type"
placeholder={t('label.type')}
value={formData.type || ''}
onChange={onChangeHandler}>
<option value="">

View File

@ -76,10 +76,10 @@ describe('Test CustomField Table Component', () => {
expect(table).toBeInTheDocument();
const tableCellName = await findByText('Name');
const tableCellType = await findByText('Type');
const tableCellDescription = await findByText('Description');
const tableCellActions = await findByText('Actions');
const tableCellName = await findByText('label.name');
const tableCellType = await findByText('label.type');
const tableCellDescription = await findByText('label.description');
const tableCellActions = await findByText('label.action-plural');
expect(tableCellName).toBeInTheDocument();
expect(tableCellType).toBeInTheDocument();
@ -99,10 +99,10 @@ describe('Test CustomField Table Component', () => {
expect(table).toBeInTheDocument();
const tableCellName = await screen.findByText('Name');
const tableCellType = await screen.findByText('Type');
const tableCellDescription = await screen.findByText('Description');
const tableCellActions = await screen.findByText('Actions');
const tableCellName = await screen.findByText('label.name');
const tableCellType = await screen.findByText('label.type');
const tableCellDescription = await screen.findByText('label.description');
const tableCellActions = await screen.findByText('label.action-plural');
expect(tableCellName).toBeInTheDocument();
expect(tableCellType).toBeInTheDocument();
@ -135,7 +135,7 @@ describe('Test CustomField Table Component', () => {
});
it('Should render no data row if there is no custom properties', async () => {
const { findByTestId, findByText, findAllByRole } = render(
const { findByTestId, findAllByRole } = render(
<CustomPropertyTable {...mockProp} customProperties={[]} />
);
@ -143,10 +143,10 @@ describe('Test CustomField Table Component', () => {
expect(table).toBeInTheDocument();
const tableCellName = await findByText('Name');
const tableCellType = await findByText('Type');
const tableCellDescription = await findByText('Description');
const tableCellActions = await findByText('Actions');
const tableCellName = await screen.findByText('label.name');
const tableCellType = await screen.findByText('label.type');
const tableCellDescription = await screen.findByText('label.description');
const tableCellActions = await screen.findByText('label.action-plural');
expect(tableCellName).toBeInTheDocument();
expect(tableCellType).toBeInTheDocument();

View File

@ -12,9 +12,9 @@
*/
import { Table, Tooltip } from 'antd';
import { ColumnsType } from 'antd/lib/table';
import { t } from 'i18next';
import { isEmpty } from 'lodash';
import React, { FC, Fragment, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { NO_PERMISSION_FOR_ACTION } from '../../constants/HelperTextUtil';
import { CustomProperty } from '../../generated/entity/type';
import { getEntityName } from '../../utils/CommonUtils';
@ -32,6 +32,7 @@ export const CustomPropertyTable: FC<CustomPropertyTableProp> = ({
updateEntityType,
hasAccess,
}) => {
const { t } = useTranslation();
const [selectedProperty, setSelectedProperty] = useState<CustomProperty>(
{} as CustomProperty
);
@ -69,18 +70,18 @@ export const CustomPropertyTable: FC<CustomPropertyTableProp> = ({
const tableColumn: ColumnsType<CustomProperty> = useMemo(
() => [
{
title: 'Name',
title: t('label.name'),
dataIndex: 'name',
key: 'name',
},
{
title: 'Type',
title: t('label.type'),
dataIndex: 'propertyType',
key: 'propertyType',
render: (text) => getEntityName(text),
},
{
title: 'Description',
title: t('label.description'),
dataIndex: 'description',
key: 'description',
render: (text) =>
@ -95,12 +96,13 @@ export const CustomPropertyTable: FC<CustomPropertyTableProp> = ({
),
},
{
title: 'Actions',
title: t('label.action-plural'),
dataIndex: 'actions',
key: 'actions',
render: (_, record) => (
<div className="tw-flex">
<Tooltip title={hasAccess ? 'Edit' : NO_PERMISSION_FOR_ACTION}>
<Tooltip
title={hasAccess ? t('label.edit') : NO_PERMISSION_FOR_ACTION}>
<button
className="tw-cursor-pointer"
data-testid="edit-button"
@ -112,12 +114,13 @@ export const CustomPropertyTable: FC<CustomPropertyTableProp> = ({
<SVGIcons
alt="edit"
icon={Icons.EDIT}
title="Edit"
title={t('label.edit')}
width="16px"
/>
</button>
</Tooltip>
<Tooltip title={hasAccess ? 'Delete' : NO_PERMISSION_FOR_ACTION}>
<Tooltip
title={hasAccess ? t('label.delete') : NO_PERMISSION_FOR_ACTION}>
<button
className="tw-cursor-pointer tw-ml-4"
data-testid="delete-button"
@ -129,7 +132,7 @@ export const CustomPropertyTable: FC<CustomPropertyTableProp> = ({
<SVGIcons
alt="delete"
icon={Icons.DELETE}
title="Delete"
title={t('label.delete')}
width="16px"
/>
</button>

View File

@ -139,8 +139,10 @@ describe('Test ProfilerDashboardPage component', () => {
const EntityPageInfo = await screen.findByText('EntityPageInfo component');
const ProfilerTab = screen.queryByText('ProfilerTab component');
const DataQualityTab = await screen.findByText('DataQualityTab component');
const deletedTestSwitch = await screen.findByText('Deleted Tests');
const statusDropdown = await screen.findByText('Status');
const deletedTestSwitch = await screen.findByText(
'label.deleted-test-plural'
);
const statusDropdown = await screen.findByText('label.status');
expect(pageContainer).toBeInTheDocument();
expect(profilerSwitch).toBeInTheDocument();

View File

@ -26,9 +26,9 @@ import { RadioChangeEvent } from 'antd/lib/radio';
import { SwitchChangeEventHandler } from 'antd/lib/switch';
import { AxiosError } from 'axios';
import PageLayoutV1 from 'components/containers/PageLayoutV1';
import { t } from 'i18next';
import { EntityTags, ExtraInfo } from 'Models';
import React, { useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useHistory, useParams } from 'react-router-dom';
import { addFollower, removeFollower } from 'rest/tableAPI';
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
@ -96,6 +96,7 @@ const ProfilerDashboard: React.FC<ProfilerDashboardProps> = ({
profilerData,
onTableChange,
}) => {
const { t } = useTranslation();
const { getEntityPermission } = usePermissionProvider();
const history = useHistory();
const { entityTypeFQN, dashboardType, tab } = useParams<{
@ -161,7 +162,7 @@ const ProfilerDashboard: React.FC<ProfilerDashboardProps> = ({
value: value,
}));
testCaseStatus.unshift({
label: 'All',
label: t('label.all'),
value: '',
});
@ -221,7 +222,7 @@ const ProfilerDashboard: React.FC<ProfilerDashboardProps> = ({
const extraInfo: Array<ExtraInfo> = useMemo(() => {
return [
{
key: 'Owner',
key: t('label.owner'),
value:
table.owner?.type === OwnerType.TEAM
? getTeamAndUserDetailsPath(table.owner?.name || '')
@ -236,10 +237,10 @@ const ProfilerDashboard: React.FC<ProfilerDashboardProps> = ({
table.owner?.type === OwnerType.USER ? table.owner?.name : undefined,
},
{
key: 'Tier',
key: t('label.tier'),
value: tier?.tagFQN ? tier.tagFQN.split(FQN_SEPARATOR_CHAR)[1] : '',
},
{ key: 'Type', value: `${table.tableType}`, showLabel: true },
{ key: t('label.type'), value: `${table.tableType}`, showLabel: true },
{
value:
getUsagePercentile(
@ -250,7 +251,7 @@ const ProfilerDashboard: React.FC<ProfilerDashboardProps> = ({
{
value: `${
table.usageSummary?.weeklyStats?.count.toLocaleString() || '--'
} Queries`,
} ${t('label.query-plural')}`,
},
];
}, [table]);
@ -512,13 +513,17 @@ const ProfilerDashboard: React.FC<ProfilerDashboardProps> = ({
<Space size={16}>
{activeTab === ProfilerDashboardTab.DATA_QUALITY && (
<>
<Form.Item className="m-0 " label="Deleted Tests">
<Form.Item
className="m-0 "
label={t('label.deleted-test-plural')}>
<Switch
checked={showDeletedTest}
onClick={handleDeletedTestCaseClick}
/>
</Form.Item>
<Form.Item className="tw-mb-0 tw-w-40" label="Status">
<Form.Item
className="tw-mb-0 tw-w-40"
label={t('label.status')}>
<Select
options={testCaseStatusOption}
value={selectedTestCaseStatus}
@ -538,7 +543,7 @@ const ProfilerDashboard: React.FC<ProfilerDashboardProps> = ({
<Tooltip
title={
tablePermissions.EditAll || tablePermissions.EditTests
? 'Add Test'
? t('label.add-entity', { entity: t('label.test') })
: NO_PERMISSION_FOR_ACTION
}>
<Button

View File

@ -167,7 +167,9 @@ const DataQualityTab: React.FC<DataQualityTabProps> = ({
{!deletedTable && (
<Tooltip
placement="bottomRight"
title={hasAccess ? 'Edit' : NO_PERMISSION_FOR_ACTION}>
title={
hasAccess ? t('label.edit') : NO_PERMISSION_FOR_ACTION
}>
<Button
className="flex-center"
data-testid={`edit-${record.name}`}

View File

@ -15,6 +15,7 @@ import { Button, Space, Table, Tooltip, Typography } from 'antd';
import { ColumnsType } from 'antd/lib/table';
import { isUndefined } from 'lodash';
import React, { FC, useEffect, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import {
NO_DATA_PLACEHOLDER,
@ -52,6 +53,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
hasEditAccess,
columns = [],
}) => {
const { t } = useTranslation();
const [searchText, setSearchText] = useState<string>('');
const [data, setData] = useState<ModifiedColumn[]>(columns);
const [columnTestSummary, setColumnTestSummary] =
@ -60,7 +62,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
const tableColumn: ColumnsType<ModifiedColumn> = useMemo(() => {
return [
{
title: 'Name',
title: t('label.name'),
dataIndex: 'name',
key: 'name',
width: 250,
@ -80,7 +82,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
sorter: (col1, col2) => col1.name.localeCompare(col2.name),
},
{
title: 'Data Type',
title: t('label.data-type'),
dataIndex: 'dataTypeDisplay',
key: 'dataType',
width: 250,
@ -94,7 +96,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
sorter: (col1, col2) => col1.dataType.localeCompare(col2.dataType),
},
{
title: 'Null %',
title: `${t('label.null')} %`,
dataIndex: 'profile',
key: 'nullProportion',
width: 200,
@ -111,7 +113,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
(col2.profile?.nullProportion || 0),
},
{
title: 'Unique %',
title: `${t('label.unique')} %`,
dataIndex: 'profile',
key: 'uniqueProportion',
width: 200,
@ -126,7 +128,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
(col2.profile?.uniqueProportion || 0),
},
{
title: 'Distinct %',
title: `${t('label.distinct')} %`,
dataIndex: 'profile',
key: 'distinctProportion',
width: 200,
@ -141,7 +143,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
(col2.profile?.distinctProportion || 0),
},
{
title: 'Value Count',
title: t('label.value-count'),
dataIndex: 'profile',
key: 'valuesCount',
width: 120,
@ -151,7 +153,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
(col1.profile?.valuesCount || 0) - (col2.profile?.valuesCount || 0),
},
{
title: 'Tests',
title: t('label.test-plural'),
dataIndex: 'testCount',
key: 'Tests',
fixed: 'right',
@ -169,7 +171,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
sorter: (col1, col2) => (col1.testCount || 0) - (col2.testCount || 0),
},
{
title: 'Status',
title: t('label.status'),
dataIndex: 'dataQualityTest',
key: 'dataQualityTest',
width: 120,
@ -200,14 +202,18 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
},
},
{
title: 'Actions',
title: t('label.action-plural'),
dataIndex: 'actions',
key: 'actions',
fixed: 'right',
render: (_, record) => (
<Tooltip
placement="bottom"
title={hasEditAccess ? 'Add Test' : NO_PERMISSION_FOR_ACTION}>
title={
hasEditAccess
? t('label.add-entity', { entity: t('label.test') })
: NO_PERMISSION_FOR_ACTION
}>
<Link
to={getAddDataQualityTableTestPath(
ProfilerDashboardType.COLUMN,
@ -275,7 +281,7 @@ const ColumnProfileTable: FC<ColumnProfileTableProps> = ({
<div data-testid="column-profile-table-container">
<div className="tw-w-2/6">
<Searchbar
placeholder="Find in table..."
placeholder={`${t('label.find-in-table')}...`}
searchValue={searchText}
typingInterval={500}
onSearch={handleSearchAction}

View File

@ -13,6 +13,7 @@
import { AxiosError } from 'axios';
import React, { useEffect, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Link } from 'react-router-dom';
import { getSuggestions } from 'rest/miscAPI';
import { FQN_SEPARATOR_CHAR } from '../../constants/char.constants';
@ -64,6 +65,7 @@ type MlModelSource = {
} & CommonSource;
const Suggestions = ({ searchText, isOpen, setIsOpen }: SuggestionProp) => {
const { t } = useTranslation();
const [options, setOptions] = useState<Array<Option>>([]);
const [tableSuggestions, setTableSuggestions] = useState<TableSource[]>([]);
const [topicSuggestions, setTopicSuggestions] = useState<TopicSource[]>([]);
@ -112,28 +114,28 @@ const Suggestions = ({ searchText, isOpen, setIsOpen }: SuggestionProp) => {
let icon = '';
switch (index) {
case SearchIndex.TOPIC:
label = 'Topics';
label = t('label.topic-plural');
icon = Icons.TOPIC_GREY;
break;
case SearchIndex.DASHBOARD:
label = 'Dashboards';
label = t('label.dashboard-plural');
icon = Icons.DASHBOARD_GREY;
break;
case SearchIndex.PIPELINE:
label = 'Pipelines';
label = t('label.pipeline-plural');
icon = Icons.PIPELINE_GREY;
break;
case SearchIndex.MLMODEL:
label = 'ML Models';
label = t('label.ml-model-plural');
icon = Icons.MLMODAL;
break;
case SearchIndex.TABLE:
default:
label = 'Tables';
label = t('label.table-plural');
icon = Icons.TABLE_GREY;
break;

View File

@ -85,7 +85,7 @@ export const DBTCloudConfig: FunctionComponent<Props> = ({
<label
className="tw-block tw-form-label tw-mb-1"
htmlFor="cloud-account-id">
{requiredField('dbt Cloud Account Id')}
{requiredField(t('label.dbt-cloud-account-id'))}
</label>
<p className="tw-text-grey-muted tw-mt-1 tw-mb-2 tw-text-xs">
{t('label.dbt-cloud-account-id')}
@ -105,7 +105,7 @@ export const DBTCloudConfig: FunctionComponent<Props> = ({
<label
className="tw-block tw-form-label tw-mb-1"
htmlFor="cloud-auth-token">
{requiredField('dbt Cloud Authentication Token')}
{requiredField(t('label.dbt-cloud-account-auth-token'))}
</label>
<p className="tw-text-grey-muted tw-mt-1 tw-mb-2 tw-text-xs">
{t('label.dbt-cloud-account-auth-token')}
@ -143,7 +143,7 @@ export const DBTCloudConfig: FunctionComponent<Props> = ({
<Field>
<label className="tw-block tw-form-label tw-mb-1" htmlFor="dbtCloudUrl">
{requiredField('dbt Cloud URL')}
{requiredField(t('label.dbt-cloud-url'))}
</label>
<p className="tw-text-grey-muted tw-mt-1 tw-mb-2 tw-text-xs">
{t('message.unable-to-connect-to-your-dbt-cloud-instance')}

View File

@ -11,6 +11,7 @@
* limitations under the License.
*/
import i18n from 'utils/i18next/LocalUtil';
import { FormValidationRulesType } from '../../../enums/form.enum';
import { FormValidationRules } from '../../../interface/genericForm.interface';
import { DropDownListItem } from '../../dropdown/types';
@ -24,34 +25,34 @@ import { DBT_SOURCES, GCS_CONFIG } from './DBTFormEnum';
export const DBTSources: Array<DropDownListItem> = [
{
label: 'Local Config Source',
label: i18n.t('label.local-config-source'),
value: DBT_SOURCES.local,
},
{
label: 'HTTP Config Source',
label: i18n.t('label.http-config-source'),
value: DBT_SOURCES.http,
},
{
label: 'Cloud Config Source',
label: i18n.t('label.cloud-config-source'),
value: DBT_SOURCES.cloud,
},
{
label: 'S3 Config Source',
label: i18n.t('label.s3-config-source'),
value: DBT_SOURCES.s3,
},
{
label: 'GCS Config Source',
label: i18n.t('label.gcs-config-source'),
value: DBT_SOURCES.gcs,
},
];
export const GCSCreds: Array<DropDownListItem> = [
{
label: 'GCS Credentials Values',
label: i18n.t('label.gcs-credential-value'),
value: GCS_CONFIG.GCSValues,
},
{
label: 'GCS Credentials Path',
label: i18n.t('label.gcs-credential-path'),
value: GCS_CONFIG.GCSCredentialsPath,
},
];

View File

@ -384,7 +384,7 @@ export const DBTGCSConfig: FunctionComponent<Props> = ({
data-testid="gcs-config"
id="gcs-config"
options={GCSCreds}
placeholder="Select GCS Config Type"
placeholder={t('message.select-gcs-config-type')}
value={gcsType}
onChange={(value) => {
handleGcsTypeChange && handleGcsTypeChange(value as GCS_CONFIG);

View File

@ -100,7 +100,7 @@ export const DBTHttpConfig: FunctionComponent<Props> = ({
<label
className="tw-block tw-form-label tw-mb-1"
htmlFor="manifest-url">
{requiredField('dbt Manifest HTTP Path')}
{requiredField(t('message.dbt-manifest-file-path'))}
</label>
<p className="tw-text-grey-muted tw-mt-1 tw-mb-2 tw-text-xs">
{t('message.dbt-manifest-file-path')}

View File

@ -101,7 +101,7 @@ export const DBTLocalConfig: FunctionComponent<Props> = ({
<label
className="tw-block tw-form-label tw-mb-1"
htmlFor="manifest-file">
{requiredField('dbt Manifest File Path')}
{requiredField(t('message.dbt-manifest-file-path'))}
</label>
<p className="tw-text-grey-muted tw-mt-1 tw-mb-2 tw-text-xs">
{t('message.dbt-manifest-file-path')}

View File

@ -140,7 +140,7 @@ export const DBTS3Config: FunctionComponent<Props> = ({
</Field>
<Field>
<label className="tw-block tw-form-label tw-mb-1" htmlFor="aws-region">
{requiredField('AWS Region')}
{requiredField(t('label.aws-region'))}
</label>
<p className="tw-text-grey-muted tw-mt-1 tw-mb-2 tw-text-xs">
{`${t('label.aws-region')}.`}

View File

@ -53,7 +53,9 @@ const DeleteWidgetModal = ({
const [isLoading, setIsLoading] = useState(false);
const prepareDeleteMessage = (softDelete = false) => {
const softDeleteText = `Soft deleting will deactivate the ${entityName}. This will disable any discovery, read or write operations on ${entityName}.`;
const softDeleteText = t('message.soft-delete-message-for-entity', {
entity: entityName,
});
const hardDeleteText = getEntityDeleteMessage(getTitleCase(entityType), '');
return softDelete ? softDeleteText : hardDeleteText;
@ -61,13 +63,13 @@ const DeleteWidgetModal = ({
const DELETE_OPTION = [
{
title: `Delete ${entityType}${entityName}`,
title: `${t('label.delete')} ${entityType}${entityName}`,
description: `${prepareDeleteMessage(true)} ${softDeleteMessagePostFix}`,
type: DeleteType.SOFT_DELETE,
isAllowd: allowSoftDelete,
},
{
title: `Permanently Delete ${entityType}${entityName}`,
title: `${t('label.permanently-delete')} ${entityType}${entityName}`,
description: `${
deleteMessage || prepareDeleteMessage()
} ${hardDeleteMessagePostFix}`,
@ -231,9 +233,9 @@ const DeleteWidgetModal = ({
confirmLoading={isLoading}
data-testid="delete-modal"
footer={Footer()}
okText="Delete"
okText={t('label.delete')}
open={visible}
title={`Delete ${entityName}`}
title={`${t('label.delete')} ${entityName}`}
onCancel={handleOnEntityDeleteCancel}>
<Radio.Group value={value} onChange={onChange}>
{DELETE_OPTION.map(
@ -267,7 +269,7 @@ const DeleteWidgetModal = ({
data-testid="confirmation-text-input"
disabled={entityDeleteState.loading === 'waiting'}
name="entityName"
placeholder="DELETE"
placeholder={t('label.delete-uppercase')}
type="text"
value={name}
onChange={handleOnChange}

View File

@ -305,7 +305,9 @@ const EntityPageInfo = ({
const getRequestTagsElements = useCallback(() => {
const hasTags = !isEmpty(tags);
const text = hasTags ? 'Update request tags' : 'Request tags';
const text = hasTags
? t('label.update-request-tag-plural')
: t('label.request-tag-plural');
return onThreadLinkSelect &&
TASK_ENTITIES.includes(entityType as EntityType) ? (
@ -552,7 +554,7 @@ const EntityPageInfo = ({
alt="edit"
className="tw--mt-3 "
icon="icon-edit"
title="Edit"
title={t('label.edit')}
width="16px"
/>
</button>
@ -561,7 +563,9 @@ const EntityPageInfo = ({
<Tags
className="tw-text-primary"
startWith="+ "
tag="Add tag"
tag={t('label.add-entity', {
entity: t('label.tag-lowercase'),
})}
type="label"
/>
</span>

View File

@ -22,7 +22,7 @@ const ErrorPlaceHolderIngestion = () => {
<div className="tw-card tw-flex tw-flex-col tw-justify-between tw-p-5 tw-w-4/5 tw-mx-auto">
<div>
<h6 className="tw-text-base tw-text-grey-body tw-font-medium">
{t('message.manage-airflow-api')}
{t('message.manage-airflow-api-failed')}
</h6>
<p className="tw-text-grey-body tw-text-sm tw-mb-5">

View File

@ -117,8 +117,8 @@ const SuccessScreen = ({
</div>
<h6 className="tw-text-base tw-font-medium tw-mb-0.5">
{isAirflowAvailable
? 'OpenMetadata - Managed Airflow APIs'
: 'Failed to find OpenMetadata - Managed Airflow APIs'}
? t('message.manage-airflow-api')
: t('message.manage-airflow-api-failed')}
</h6>
</div>
{!isUndefined(fetchAirflowStatus) && (

View File

@ -105,6 +105,7 @@
"closed-lowercase": "closed",
"closed-task-plural": "Closed Tasks",
"closed-this-task-lowercase": "closed this task",
"cloud-config-source": "Cloud Config Source",
"collapse-all": "Collapse All",
"column": "Column",
"column-details": "Column Details",
@ -130,6 +131,7 @@
"connection-details": "Connection Details",
"connection-entity": "Connection {{entity}}",
"connection-timeout-plural": "Connection Timeout",
"connector": "Connector",
"conversation": "Conversation",
"conversation-lowercase": "conversation",
"conversation-plural": "Conversations",
@ -173,6 +175,7 @@
"data-insight-tier-summary": "Total Data Assets by Tier",
"data-insight-top-viewed-entity-summary": "Most Viewed Data Assets",
"data-insight-total-entity-summary": "Total Data Assets",
"data-type": "Data Type",
"database": "Database",
"database-lowercase": "database",
"database-name": "Database Name",
@ -192,6 +195,7 @@
"dbt-cloud-account-auth-token": "dbt cloud account authentication token.",
"dbt-cloud-account-id": "dbt cloud account Id.",
"dbt-cloud-project-id": "dbt Cloud Project Id",
"dbt-cloud-url": "dbt Cloud URL",
"dbt-configuration-source": "dbt Configuration Source",
"dbt-ingestion": "DBT Ingestion",
"dbt-lowercase": "dbt",
@ -316,7 +320,9 @@
"full-name": "Full name",
"function": "Function",
"g-chat": "G Chat",
"gcs-config-source": "GCS Config Source",
"gcs-credential-path": "GCS Credentials Path",
"gcs-credential-value": "GCS Credentials Values",
"generate": "Generate",
"generate-new-token": "Generate New Token",
"glossary": "Glossary",
@ -342,6 +348,7 @@
"here-lowercase": "here",
"hide": "Hide",
"home": "Home",
"http-config-source": "HTTP Config Source",
"hyper-parameter-plural": "Hyper Parameters",
"idle": "Idle",
"import": "Import",
@ -395,6 +402,7 @@
"lineage-lowercase": "lineage",
"list": "List",
"loading": "Loading",
"local-config-source": "Local Config Source",
"log-plural": "Logs",
"login": "Login",
"logout": "Logout",
@ -498,6 +506,7 @@
"pending-task": "Pending task",
"pending-task-plural": "Pending tasks",
"percentage": "Percentage",
"permanently-delete": "Permanently Delete",
"permanently-lowercase": "permanently",
"pipe-symbol": "|",
"pipeline": "Pipeline",
@ -599,6 +608,7 @@
"rule-name": "Rule Name",
"rules": "Rules",
"run": "Run",
"s3-config-source": "S3 Config Source",
"sample": "Sample",
"sample-data": "Sample Data",
"save": "Save",
@ -773,6 +783,7 @@
"valid-condition": "Valid condition",
"validating-condition": "Validating the condition...",
"value": "Value",
"value-count": "Value Count",
"value-plural": "Values",
"verify-cert-plural": "Verify Certs",
"version": "Version",
@ -923,6 +934,7 @@
"ingestion-pipeline-name-message": "Name that identifies this pipeline instance uniquely.",
"ingestion-pipeline-name-successfully-deployed-entity": "You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The {{entity}} will run at a regular interval as per the schedule.",
"instance-identifier": "A Name that uniquely identifies this configuration instance.",
"invalid-property-name": "Invalid Property Name",
"jwt-token": "Token you have generated that can be used to access the OpenMetadata API.",
"kill-ingestion-warning": "Once you kill this Ingestion, all running and queued workflows will be stopped and marked as Failed.",
"kill-successfully": "Successfully killed running workflows for",
@ -937,7 +949,8 @@
"list-of-strings-regex-patterns-csv": "Enter a list of strings/regex patterns as a comma separated value",
"made-announcement-for-entity": "made an announcement for {{entity}}",
"make-an-announcement": "Make an announcement!",
"manage-airflow-api": "Failed to find OpenMetadata - Managed Airflow APIs",
"manage-airflow-api": "OpenMetadata - Managed Airflow APIs",
"manage-airflow-api-failed": "Failed to find OpenMetadata - Managed Airflow APIs",
"mark-all-deleted-table-message": "Optional configuration to mark deleted tables only to the filtered schema.",
"mark-deleted-table-message": "Any deleted tables in the data source will be soft deleted in OpenMetadata.",
"markdown-editor-placeholder": "Use @mention to tag a user or a team.\nUse #mention to tag a data asset.",
@ -1031,13 +1044,18 @@
"search-for-entity-types": "Search for Tables, Topics, Dashboards, Pipelines and ML Models.",
"search-for-ingestion": "Search for ingestion",
"select-column-name": "Select column name",
"select-gcs-config-type": "Select GCS Config Type",
"select-interval-type": "Select interval type",
"select-interval-unit": "Select interval unit",
"select-team": "Please select a team type",
"select-token-expiration": "Select Token Expiration",
"service-created-entity-description": "The <Service Name> has been created successfully. Visit the newly created service to take a look at the details. {{entity}}",
"service-name-length": "Service name length must be between 1 and 128 characters",
"service-with-delimiters-not-allowed": "Service name with delimiters are not allowed",
"service-with-space-not-allowed": "Service name with spaces are not allowed",
"session-expired": "Your session has timed out! Please sign in again to access OpenMetadata.",
"setup-custom-property": "OpenMetadata supports custom properties in the Table entity. Create a custom property by adding a unique property name. The name must start with a lowercase letter, as preferred in the camelCase format. Uppercase letters and numbers can be included in the field name; but spaces, underscores, and dots are not supported. Select the preferred property Type from among the options provided. Describe your custom property to provide more information to your team.",
"soft-delete-message-for-entity": "Soft deleting will deactivate the {{entity}}. This will disable any discovery, read or write operations on {{entity}}.",
"something-went-wrong": "Something went wrong",
"special-character-not-allowed": "Special characters are not allowed.",
"sql-query-tooltip": "Queries returning one or more rows will result in the test failing.",