mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-27 10:26:09 +00:00
chore(ui): update localisation for constants (#9670)
* chore(ui): update localization for constants * fix tests and not working localization
This commit is contained in:
parent
bb41fec08f
commit
e52e4207f7
@ -34,9 +34,11 @@ import WebSocketProvider from 'components/web-scoket/web-scoket.provider';
|
||||
import WebAnalyticsProvider from 'components/WebAnalytics/WebAnalyticsProvider';
|
||||
import { TOAST_OPTIONS } from 'constants/Toasts.constants';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import { ToastContainer } from 'react-toastify';
|
||||
import 'react-toastify/dist/ReactToastify.min.css';
|
||||
import i18n from 'utils/i18next/LocalUtil';
|
||||
|
||||
const App: FunctionComponent = () => {
|
||||
library.add(
|
||||
@ -56,20 +58,22 @@ const App: FunctionComponent = () => {
|
||||
<div className="main-container">
|
||||
<div className="content-wrapper" data-testid="content-wrapper">
|
||||
<Router>
|
||||
<ErrorBoundry>
|
||||
<AuthProvider childComponentType={AppRouter}>
|
||||
<WebAnalyticsProvider>
|
||||
<PermissionProvider>
|
||||
<WebSocketProvider>
|
||||
<GlobalSearchProvider>
|
||||
<Appbar />
|
||||
<AppRouter />
|
||||
</GlobalSearchProvider>
|
||||
</WebSocketProvider>
|
||||
</PermissionProvider>
|
||||
</WebAnalyticsProvider>
|
||||
</AuthProvider>
|
||||
</ErrorBoundry>
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<ErrorBoundry>
|
||||
<AuthProvider childComponentType={AppRouter}>
|
||||
<WebAnalyticsProvider>
|
||||
<PermissionProvider>
|
||||
<WebSocketProvider>
|
||||
<GlobalSearchProvider>
|
||||
<Appbar />
|
||||
<AppRouter />
|
||||
</GlobalSearchProvider>
|
||||
</WebSocketProvider>
|
||||
</PermissionProvider>
|
||||
</WebAnalyticsProvider>
|
||||
</AuthProvider>
|
||||
</ErrorBoundry>
|
||||
</I18nextProvider>
|
||||
</Router>
|
||||
<ToastContainer {...TOAST_OPTIONS} newestOnTop />
|
||||
</div>
|
||||
|
@ -14,6 +14,8 @@
|
||||
import { Popover } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import React, { FC, Fragment } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Transi18next } from '../../../utils/CommonUtils';
|
||||
import SVGIcons, { Icons } from '../../../utils/SvgUtils';
|
||||
import { Button } from '../../buttons/Button/Button';
|
||||
|
||||
@ -32,6 +34,8 @@ export const SendButton: FC<SendButtonProp> = ({
|
||||
buttonClass,
|
||||
onSaveHandler,
|
||||
}) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div
|
||||
className="tw-absolute tw-right-2 tw-bottom-2 tw-flex tw-flex-row tw-items-center tw-justify-end"
|
||||
@ -39,12 +43,18 @@ export const SendButton: FC<SendButtonProp> = ({
|
||||
<Popover
|
||||
content={
|
||||
<Fragment>
|
||||
<strong>Send now</strong>
|
||||
<strong>{t('label.send-now')}</strong>
|
||||
<p>
|
||||
Press{' '}
|
||||
<kbd className="tw-bg-white tw-text-grey-body tw-rounded-sm tw-px-1 tw-py-0.5">
|
||||
Return
|
||||
</kbd>
|
||||
{t('label.press')}
|
||||
<Transi18next
|
||||
i18nKey="message.tour-step-discover-all-assets-at-one-place"
|
||||
renderElement={
|
||||
<kbd className="tw-bg-white tw-text-grey-body tw-rounded-sm tw-px-1 tw-py-0.5" />
|
||||
}
|
||||
values={{
|
||||
text: t('label.return'),
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
</Fragment>
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ const NavBar = ({
|
||||
const [hasMentionNotification, setHasMentionNotification] =
|
||||
useState<boolean>(false);
|
||||
const [activeTab, setActiveTab] = useState<string>('Task');
|
||||
const [isImgUrlValid, SetIsImgUrlValid] = useState<boolean>(true);
|
||||
const [isImgUrlValid, setIsImgUrlValid] = useState<boolean>(true);
|
||||
|
||||
const profilePicture = useMemo(
|
||||
() => currentUser?.profile?.images?.image512,
|
||||
@ -127,27 +127,30 @@ const NavBar = ({
|
||||
setHasMentionNotification(false);
|
||||
};
|
||||
|
||||
const handleBellClick = (visible: boolean) => {
|
||||
if (visible) {
|
||||
switch (activeTab) {
|
||||
case 'Task':
|
||||
hasTaskNotification &&
|
||||
setTimeout(() => {
|
||||
handleTaskNotificationRead();
|
||||
}, NOTIFICATION_READ_TIMER);
|
||||
const handleBellClick = useCallback(
|
||||
(visible: boolean) => {
|
||||
if (visible) {
|
||||
switch (activeTab) {
|
||||
case 'Task':
|
||||
hasTaskNotification &&
|
||||
setTimeout(() => {
|
||||
handleTaskNotificationRead();
|
||||
}, NOTIFICATION_READ_TIMER);
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'Conversation':
|
||||
hasMentionNotification &&
|
||||
setTimeout(() => {
|
||||
handleMentionsNotificationRead();
|
||||
}, NOTIFICATION_READ_TIMER);
|
||||
case 'Conversation':
|
||||
hasMentionNotification &&
|
||||
setTimeout(() => {
|
||||
handleMentionsNotificationRead();
|
||||
}, NOTIFICATION_READ_TIMER);
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
[hasTaskNotification]
|
||||
);
|
||||
|
||||
const handleActiveTab = (key: string) => {
|
||||
setActiveTab(key);
|
||||
@ -266,14 +269,27 @@ const NavBar = ({
|
||||
|
||||
useEffect(() => {
|
||||
if (profilePicture) {
|
||||
SetIsImgUrlValid(true);
|
||||
setIsImgUrlValid(true);
|
||||
}
|
||||
}, [profilePicture]);
|
||||
|
||||
const handleLanguageChange = (langCode: string) => {
|
||||
const handleLanguageChange = useCallback((langCode: string) => {
|
||||
setLanguage(langCode);
|
||||
i18next.changeLanguage(langCode);
|
||||
};
|
||||
}, []);
|
||||
|
||||
const handleModalCancel = useCallback(() => handleFeatureModal(false), []);
|
||||
|
||||
const handleOnImageError = useCallback(() => {
|
||||
setIsImgUrlValid(false);
|
||||
}, []);
|
||||
|
||||
const handleSelectOption = useCallback(
|
||||
(text) => {
|
||||
AppState.inPageSearchText = text;
|
||||
},
|
||||
[AppState]
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
@ -373,9 +389,7 @@ const NavBar = ({
|
||||
isOpen={isSearchBoxOpen}
|
||||
options={inPageSearchOptions(pathname)}
|
||||
searchText={searchValue}
|
||||
selectOption={(text) => {
|
||||
AppState.inPageSearchText = text;
|
||||
}}
|
||||
selectOption={handleSelectOption}
|
||||
setIsOpen={handleSearchBoxOpen}
|
||||
/>
|
||||
) : (
|
||||
@ -464,9 +478,7 @@ const NavBar = ({
|
||||
preview={false}
|
||||
referrerPolicy="no-referrer"
|
||||
src={profilePicture || ''}
|
||||
onError={() => {
|
||||
SetIsImgUrlValid(false);
|
||||
}}
|
||||
onError={handleOnImageError}
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
@ -483,7 +495,7 @@ const NavBar = ({
|
||||
<WhatsNewModal
|
||||
header={`${t('label.whats-new')}!`}
|
||||
visible={isFeatureModalOpen}
|
||||
onCancel={() => handleFeatureModal(false)}
|
||||
onCancel={handleModalCancel}
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
|
@ -11,7 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import i18next from 'i18next';
|
||||
import { t } from 'i18next';
|
||||
import { isUndefined, uniq } from 'lodash';
|
||||
import {
|
||||
BasicConfig,
|
||||
@ -31,45 +31,45 @@ const BaseConfig = AntdConfig as BasicConfig;
|
||||
|
||||
export const COMMON_DROPDOWN_ITEMS = [
|
||||
{
|
||||
label: i18next.t('label.owner'),
|
||||
label: t('label.owner'),
|
||||
key: 'owner.name',
|
||||
},
|
||||
{
|
||||
label: i18next.t('label.tag'),
|
||||
label: t('label.tag'),
|
||||
key: 'tags.tagFQN',
|
||||
},
|
||||
{
|
||||
label: i18next.t('label.service'),
|
||||
label: t('label.service'),
|
||||
key: 'service.name',
|
||||
},
|
||||
];
|
||||
|
||||
export const TABLE_DROPDOWN_ITEMS = [
|
||||
{
|
||||
label: i18next.t('label.column'),
|
||||
label: t('label.column'),
|
||||
key: 'columns.name',
|
||||
},
|
||||
|
||||
{
|
||||
label: i18next.t('label.schema'),
|
||||
label: t('label.schema'),
|
||||
key: 'databaseSchema.name',
|
||||
},
|
||||
{
|
||||
label: i18next.t('label.database'),
|
||||
label: t('label.database'),
|
||||
key: 'database.name',
|
||||
},
|
||||
];
|
||||
|
||||
export const DASHBOARD_DROPDOWN_ITEMS = [
|
||||
{
|
||||
label: i18next.t('label.chart'),
|
||||
label: t('label.chart'),
|
||||
key: 'charts.name',
|
||||
},
|
||||
];
|
||||
|
||||
export const PIPELINE_DROPDOWN_ITEMS = [
|
||||
{
|
||||
label: i18next.t('label.task'),
|
||||
label: t('label.task'),
|
||||
key: 'tasks.name',
|
||||
},
|
||||
];
|
||||
@ -178,7 +178,7 @@ export const autocomplete: (args: {
|
||||
|
||||
const mainWidgetProps = {
|
||||
fullWidth: true,
|
||||
valueLabel: i18next.t('label.criteria') + ':',
|
||||
valueLabel: t('label.criteria') + ':',
|
||||
};
|
||||
|
||||
/**
|
||||
@ -189,13 +189,13 @@ const getCommonQueryBuilderFields = (
|
||||
) => {
|
||||
const commonQueryBuilderFields: Fields = {
|
||||
deleted: {
|
||||
label: 'Deleted',
|
||||
label: t('label.deleted'),
|
||||
type: 'boolean',
|
||||
defaultValue: true,
|
||||
},
|
||||
|
||||
'owner.name': {
|
||||
label: 'Owner',
|
||||
label: t('label.owner'),
|
||||
type: 'select',
|
||||
mainWidgetProps,
|
||||
fieldSettings: {
|
||||
@ -208,7 +208,7 @@ const getCommonQueryBuilderFields = (
|
||||
},
|
||||
|
||||
'tags.tagFQN': {
|
||||
label: 'Tags',
|
||||
label: t('label.tag-plural'),
|
||||
type: 'select',
|
||||
mainWidgetProps,
|
||||
fieldSettings: {
|
||||
@ -221,7 +221,7 @@ const getCommonQueryBuilderFields = (
|
||||
},
|
||||
|
||||
'tier.tagFQN': {
|
||||
label: 'Tier',
|
||||
label: t('label.tier'),
|
||||
type: 'select',
|
||||
mainWidgetProps,
|
||||
fieldSettings: {
|
||||
@ -243,7 +243,7 @@ const getCommonQueryBuilderFields = (
|
||||
const getServiceQueryBuilderFields = (index: SearchIndex) => {
|
||||
const serviceQueryBuilderFields: Fields = {
|
||||
'service.name': {
|
||||
label: 'Service',
|
||||
label: t('label.service'),
|
||||
type: 'select',
|
||||
mainWidgetProps,
|
||||
fieldSettings: {
|
||||
@ -265,7 +265,7 @@ const getServiceQueryBuilderFields = (index: SearchIndex) => {
|
||||
*/
|
||||
const tableQueryBuilderFields: Fields = {
|
||||
'database.name': {
|
||||
label: 'Database',
|
||||
label: t('label.database'),
|
||||
type: 'select',
|
||||
mainWidgetProps,
|
||||
fieldSettings: {
|
||||
@ -279,7 +279,7 @@ const tableQueryBuilderFields: Fields = {
|
||||
},
|
||||
|
||||
'databaseSchema.name': {
|
||||
label: 'Database Schema',
|
||||
label: t('label.database-schema'),
|
||||
type: 'select',
|
||||
mainWidgetProps,
|
||||
fieldSettings: {
|
||||
@ -293,7 +293,7 @@ const tableQueryBuilderFields: Fields = {
|
||||
},
|
||||
|
||||
'columns.name': {
|
||||
label: 'Column',
|
||||
label: t('label.column'),
|
||||
type: 'select',
|
||||
mainWidgetProps,
|
||||
fieldSettings: {
|
||||
@ -378,10 +378,10 @@ const getInitialConfigWithoutFields = () => {
|
||||
showLabels: true,
|
||||
canReorder: false,
|
||||
renderSize: 'medium',
|
||||
fieldLabel: i18next.t('label.field-plural') + ':',
|
||||
operatorLabel: i18next.t('label.condition') + ':',
|
||||
fieldLabel: t('label.field-plural') + ':',
|
||||
operatorLabel: t('label.condition') + ':',
|
||||
showNot: false,
|
||||
valueLabel: i18next.t('label.criteria') + ':',
|
||||
valueLabel: t('label.criteria') + ':',
|
||||
renderButton: renderAdvanceSearchButtons,
|
||||
},
|
||||
};
|
||||
|
@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
import { COOKIE_VERSION } from 'components/Modals/WhatsNewModal/whatsNewData';
|
||||
import { t } from 'i18next';
|
||||
import { getSettingPath } from '../utils/RouterUtils';
|
||||
import { getEncodedFqn } from '../utils/StringsUtils';
|
||||
import { FQN_SEPARATOR_CHAR } from './char.constants';
|
||||
@ -74,8 +75,8 @@ export const imageTypes = {
|
||||
};
|
||||
|
||||
export const TOUR_SEARCH_TERM = 'dim_a';
|
||||
export const ERROR404 = 'No data found';
|
||||
export const ERROR500 = 'Something went wrong';
|
||||
export const ERROR404 = t('label.no-data-found');
|
||||
export const ERROR500 = t('message.something-went-wrong');
|
||||
const PLACEHOLDER_ROUTE_TABLE_FQN = ':datasetFQN';
|
||||
const PLACEHOLDER_ROUTE_TOPIC_FQN = ':topicFQN';
|
||||
const PLACEHOLDER_ROUTE_PIPELINE_FQN = ':pipelineFQN';
|
||||
@ -130,9 +131,9 @@ export const tiers = [
|
||||
];
|
||||
|
||||
export const versionTypes = [
|
||||
{ name: 'All', value: 'all' },
|
||||
{ name: 'Major', value: 'major' },
|
||||
{ name: 'Minor', value: 'minor' },
|
||||
{ name: t('label.all'), value: 'all' },
|
||||
{ name: t('label.major'), value: 'major' },
|
||||
{ name: t('label.minor'), value: 'minor' },
|
||||
];
|
||||
|
||||
export const DESCRIPTIONLENGTH = 100;
|
||||
@ -146,33 +147,6 @@ export const visibleFilters = [
|
||||
'servicename',
|
||||
];
|
||||
|
||||
export const facetFilterPlaceholder = [
|
||||
{
|
||||
name: 'Service',
|
||||
value: 'Service',
|
||||
},
|
||||
{
|
||||
name: 'Tier',
|
||||
value: 'Tier',
|
||||
},
|
||||
{
|
||||
name: 'Tags',
|
||||
value: 'Tags',
|
||||
},
|
||||
{
|
||||
name: 'Database',
|
||||
value: 'Database',
|
||||
},
|
||||
{
|
||||
name: 'DatabaseSchema',
|
||||
value: 'Schema',
|
||||
},
|
||||
{
|
||||
name: 'ServiceName',
|
||||
value: 'Service Name',
|
||||
},
|
||||
];
|
||||
|
||||
export const ROUTES = {
|
||||
HOME: '/',
|
||||
CALLBACK: '/callback',
|
||||
@ -286,7 +260,7 @@ export const SOCKET_EVENTS = {
|
||||
};
|
||||
|
||||
export const IN_PAGE_SEARCH_ROUTES: Record<string, Array<string>> = {
|
||||
'/database/': ['In this Database'],
|
||||
'/database/': [t('message.in-this-database')],
|
||||
};
|
||||
|
||||
export const getTableDetailsPath = (tableFQN: string, columnName?: string) => {
|
||||
@ -502,24 +476,6 @@ export const TIMEOUT = {
|
||||
TOAST_DELAY: 5000, // 5 seconds timeout for toaster autohide delay
|
||||
};
|
||||
|
||||
export const navLinkDevelop = [
|
||||
{ name: 'Reports', to: '/reports', disabled: false },
|
||||
{ name: 'SQL Builder', to: '/sql-builder', disabled: false },
|
||||
{ name: 'Workflows', to: '/workflows', disabled: false },
|
||||
];
|
||||
|
||||
export const TITLE_FOR_NON_OWNER_ACTION =
|
||||
'You need to be owner to perform this action';
|
||||
|
||||
export const TITLE_FOR_NON_ADMIN_ACTION =
|
||||
'Only Admin is allowed for the action';
|
||||
|
||||
export const TITLE_FOR_UPDATE_OWNER =
|
||||
'You do not have permissions to update the owner.';
|
||||
|
||||
export const TITLE_FOR_UPDATE_DESCRIPTION =
|
||||
'You do not have permissions to update the description.';
|
||||
|
||||
export const configOptions = {
|
||||
headers: { 'Content-type': 'application/json-patch+json' },
|
||||
};
|
||||
|
@ -11,141 +11,170 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import i18n from 'utils/i18next/LocalUtil';
|
||||
|
||||
export const addServiceGuide = [
|
||||
{
|
||||
step: 1,
|
||||
title: 'Add a New Service',
|
||||
description: `Choose from the range of services that OpenMetadata integrates with.
|
||||
To add a new service, start by selecting a Service Category (Database, Messaging, Dashboard, or Pipeline).
|
||||
From the list of available services, select the one you’d want to integrate with.`,
|
||||
title: i18n.t('label.add-a-new-service'),
|
||||
description: i18n.t('message.add-new-service-description'),
|
||||
},
|
||||
{
|
||||
step: 2,
|
||||
title: 'Configure a Service',
|
||||
description: `Enter a unique service name. The name must be unique across the category of services.
|
||||
For e.g., among database services, both MySQL and Snowflake cannot have the same service name (E.g. customer_data).
|
||||
However, different service categories (dashboard, pipeline) can have the same service name.
|
||||
Spaces are not supported in the service name. Characters like - _ are supported. Also, add a description.`,
|
||||
title: i18n.t('label.configure-a-service'),
|
||||
description: i18n.t('message.configure-a-service-description'),
|
||||
},
|
||||
{
|
||||
step: 3,
|
||||
title: 'Connection Details',
|
||||
description: `Every service comes with its standard set of requirements and here are the basics of what you’d need to connect.
|
||||
The connection requirements are generated from the JSON schema for that service. The mandatory fields are marked with an asterisk.`,
|
||||
title: i18n.t('label.connection-details'),
|
||||
description: i18n.t('message.connection-details-description'),
|
||||
},
|
||||
{
|
||||
step: 5,
|
||||
title: 'Service Created Successfully',
|
||||
description:
|
||||
'The <Service Name> has been created successfully. Visit the newly created service to take a look at the details. You can also set up the metadata ingestion.',
|
||||
title: i18n.t('label.service-created-successfully'),
|
||||
description: i18n.t('message.service-created-entity-description', {
|
||||
entity: i18n.t('message.you-can-also-set-up-the-metadata-ingestion'),
|
||||
}),
|
||||
},
|
||||
];
|
||||
|
||||
export const addServiceGuideWOAirflow = {
|
||||
title: 'Service Created Successfully',
|
||||
description:
|
||||
'The <Service Name> has been created successfully. Visit the newly created service to take a look at the details. Ensure that you have Airflow set up correctly before heading to ingest metadata.',
|
||||
title: i18n.t('label.service-created-successfully'),
|
||||
description: i18n.t('message.service-created-entity-description', {
|
||||
entity: i18n.t(
|
||||
'message.ensure-airflow-set-up-correctly-before-heading-to-ingest-metadata'
|
||||
),
|
||||
}),
|
||||
};
|
||||
|
||||
const schedulingIngestionGuide = {
|
||||
step: 4,
|
||||
title: 'Schedule for Ingestion',
|
||||
description:
|
||||
'Scheduling can be set up at an hourly, daily, or weekly cadence. The timezone is in UTC.',
|
||||
title: i18n.t('label.schedule-for-ingestion'),
|
||||
description: i18n.t('message.schedule-for-ingestion-description'),
|
||||
};
|
||||
|
||||
export const addMetadataIngestionGuide = [
|
||||
{
|
||||
step: 1,
|
||||
title: 'Add Metadata Ingestion',
|
||||
description: `Based on the service type selected, enter the filter pattern details for the schema or table (database), or topic (messaging), or dashboard.
|
||||
You can include or exclude the filter patterns. Choose to include views, enable or disable the data profiler, and ingest sample data, as required.`,
|
||||
title: i18n.t('label.add-entity', {
|
||||
entity: i18n.t('label.metadata-ingestion'),
|
||||
}),
|
||||
description: i18n.t('message.metadata-ingestion-description'),
|
||||
},
|
||||
{
|
||||
step: 2,
|
||||
title: 'Configure dbt Model',
|
||||
description: `A dbt model provides transformation logic that creates a table from raw data. Lineage traces the path of data across tables, but a dbt model provides specifics.
|
||||
Select the required dbt source provider and fill in the mandatory fields. Integrate with dbt from OpenMetadata to view the models used to generate tables.`,
|
||||
title: i18n.t('label.configure-dbt-model'),
|
||||
description: i18n.t('message.configure-dbt-model-description'),
|
||||
},
|
||||
{
|
||||
...schedulingIngestionGuide,
|
||||
},
|
||||
{
|
||||
step: 5,
|
||||
title: 'Metadata Ingestion Added Successfully',
|
||||
description:
|
||||
'You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The metadata will be ingested at a regular interval as per the schedule.',
|
||||
title: i18n.t('label.entity-ingestion-added-successfully', {
|
||||
entity: i18n.t('label.metadata'),
|
||||
}),
|
||||
description: i18n.t(
|
||||
'message.ingestion-pipeline-name-successfully-deployed-entity',
|
||||
{
|
||||
entity: i18n.t('label.metadata-lowercase'),
|
||||
}
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
export const addUsageIngestionGuide = [
|
||||
{
|
||||
step: 1,
|
||||
title: 'Add Usage Ingestion',
|
||||
description: `Usage ingestion can be configured and deployed after a metadata ingestion has been set up. The usage ingestion workflow obtains the query log
|
||||
and table creation details from the underlying database and feeds it to OpenMetadata. Metadata and usage can have only one pipeline for a database service.
|
||||
Define the Query Log Duration (in days), Stage File Location, and Result Limit to start.`,
|
||||
title: i18n.t('label.add-entity', {
|
||||
entity: i18n.t('label.usage-ingestion'),
|
||||
}),
|
||||
description: i18n.t('message.usage-ingestion-description'),
|
||||
},
|
||||
{
|
||||
...schedulingIngestionGuide,
|
||||
},
|
||||
{
|
||||
step: 5,
|
||||
title: 'Usage Ingestion Added Successfully',
|
||||
description:
|
||||
'You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The usage will be ingested at a regular interval as per the schedule.',
|
||||
title: i18n.t('label.entity-ingestion-added-successfully', {
|
||||
entity: i18n.t('label.usage'),
|
||||
}),
|
||||
description: i18n.t(
|
||||
'message.ingestion-pipeline-name-successfully-deployed-entity',
|
||||
{
|
||||
entity: i18n.t('label.usage-lowercase'),
|
||||
}
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
export const addLineageIngestionGuide = [
|
||||
{
|
||||
step: 1,
|
||||
title: 'Add Lineage Ingestion',
|
||||
description: `Lineage ingestion can be configured and deployed after a metadata ingestion has been set up. The lineage ingestion workflow obtains the query history,
|
||||
parses CREATE, INSERT, MERGE... queries and prepares the lineage between the involved entities. The lineage ingestion can have only one pipeline for a database service.
|
||||
Define the Query Log Duration (in days) and Result Limit to start.`,
|
||||
title: i18n.t('label.add-entity', {
|
||||
entity: i18n.t('label.lineage-ingestion'),
|
||||
}),
|
||||
description: i18n.t('message.lineage-ingestion-description'),
|
||||
},
|
||||
{
|
||||
...schedulingIngestionGuide,
|
||||
},
|
||||
{
|
||||
step: 5,
|
||||
title: 'Lineage Ingestion Added Successfully',
|
||||
description:
|
||||
'You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The lineage will be ingested at a regular interval as per the schedule.',
|
||||
title: i18n.t('label.entity-ingestion-added-successfully', {
|
||||
entity: i18n.t('label.lineage'),
|
||||
}),
|
||||
description: i18n.t(
|
||||
'message.ingestion-pipeline-name-successfully-deployed-entity',
|
||||
{
|
||||
entity: i18n.t('label.lineage-lowercase'),
|
||||
}
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
export const addProfilerIngestionGuide = [
|
||||
{
|
||||
step: 1,
|
||||
title: 'Add Profiler Ingestion',
|
||||
description: `A profiler workflow can be configured and deployed after a metadata ingestion has been set up. Multiple profiler pipelines can be set up for the same database service.
|
||||
The pipeline feeds the Profiler tab of the Table entity, and also runs the tests configured for that entity. Add a Name, FQN, and define the filter pattern to start.`,
|
||||
title: i18n.t('label.add-entity', {
|
||||
entity: i18n.t('label.profiler-ingestion'),
|
||||
}),
|
||||
description: i18n.t('message.profiler-ingestion-description'),
|
||||
},
|
||||
{ ...schedulingIngestionGuide },
|
||||
{
|
||||
step: 5,
|
||||
title: 'Profiler Ingestion Added Successfully',
|
||||
description:
|
||||
'You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The profiler will run at a regular interval as per the schedule.',
|
||||
title: i18n.t('label.entity-ingestion-added-successfully', {
|
||||
entity: i18n.t('label.profiler'),
|
||||
}),
|
||||
description: i18n.t(
|
||||
'message.ingestion-pipeline-name-successfully-deployed-entity',
|
||||
{
|
||||
entity: i18n.t('label.profiler-lowercase'),
|
||||
}
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
export const addDBTIngestionGuide = [
|
||||
{
|
||||
step: 2,
|
||||
title: 'Add dbt Ingestion',
|
||||
description: `A dbt workflow can be configured and deployed after a metadata ingestion has been set up.
|
||||
Multiple dbt pipelines can be set up for the same database service. The pipeline feeds the dbt tab of the
|
||||
Table entity, creates lineage from dbt nodes and adds tests from dbt. Add the source configuration of the
|
||||
dbt files to start.`,
|
||||
title: i18n.t('label.add-entity', {
|
||||
entity: i18n.t('label.dbt-ingestion'),
|
||||
}),
|
||||
description: i18n.t('message.dbt-ingestion-description'),
|
||||
},
|
||||
{ ...schedulingIngestionGuide },
|
||||
{
|
||||
step: 5,
|
||||
title: 'dbt Ingestion Added Successfully',
|
||||
description:
|
||||
'You are all set! The <Ingestion Pipeline Name> has been successfully deployed. The profiler will run at a regular interval as per the schedule.',
|
||||
title: i18n.t('label.entity-ingestion-added-successfully', {
|
||||
entity: i18n.t('label.dbt-uppercase'),
|
||||
}),
|
||||
description: i18n.t(
|
||||
'message.ingestion-pipeline-name-successfully-deployed-entity',
|
||||
{
|
||||
entity: i18n.t('label.profiler-lowercase'),
|
||||
}
|
||||
),
|
||||
},
|
||||
];
|
||||
|
@ -15,10 +15,6 @@ import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
import './styles/index.js';
|
||||
import { initLocale } from './utils/i18next/LocalUtil';
|
||||
|
||||
// Initialize locale
|
||||
initLocale();
|
||||
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
|
@ -12,6 +12,7 @@
|
||||
"activity-lowercase": "activity",
|
||||
"activity-lowercase-plural": "activities",
|
||||
"add": "Add",
|
||||
"add-a-new-service": "Add a New Service",
|
||||
"add-deploy": "Add & Deploy",
|
||||
"add-entity": "Add {{entity}}",
|
||||
"add-glossary": "Add Glossary",
|
||||
@ -88,10 +89,13 @@
|
||||
"completed-entity": "Completed {{entity}}",
|
||||
"condition": "Condition",
|
||||
"config": "Config",
|
||||
"configure-a-service": "Configure a Service",
|
||||
"configure-dbt-model": "Configure dbt Model",
|
||||
"configure-entity": "Configure {{entity}}",
|
||||
"confirm": "Confirm",
|
||||
"confirm-new-password": "Confirm New Password",
|
||||
"connection": "Connection",
|
||||
"connection-details": "Connection Details",
|
||||
"connection-entity": "Connection {{entity}}",
|
||||
"conversation": "Conversation",
|
||||
"conversation-lowercase": "conversation",
|
||||
@ -134,6 +138,7 @@
|
||||
"database": "Database",
|
||||
"database-lowercase": "database",
|
||||
"database-name": "Database Name",
|
||||
"database-schema": "Database Schema",
|
||||
"database-service-name": "Database Service Name",
|
||||
"date": "Date",
|
||||
"date-and-time": "Date & Time",
|
||||
@ -141,6 +146,7 @@
|
||||
"day-left": "{{day}} left",
|
||||
"days-change-lowercase": "{{days}}-days change",
|
||||
"dbt-configuration-source": "dbt Configuration Source",
|
||||
"dbt-ingestion": "DBT Ingestion",
|
||||
"dbt-lowercase": "dbt",
|
||||
"dbt-run-result-http-path": "dbt Run Results HTTP Path",
|
||||
"dbt-source": "DBT Source",
|
||||
@ -151,6 +157,7 @@
|
||||
"delete-property-name": "Delete Property {{propertyName}}",
|
||||
"delete-tag-classification": "Delete Tag {{isCategory}}",
|
||||
"delete-uppercase": "DELETE",
|
||||
"deleted": "Deleted",
|
||||
"deleted-entity": "Deleted {{entity}}",
|
||||
"deleted-lowercase": "deleted",
|
||||
"deleted-team-action": "{{action}} Deleted Team",
|
||||
@ -194,6 +201,7 @@
|
||||
"enter-property-description": "Enter Property Description",
|
||||
"enter-property-value": "Enter Property Value",
|
||||
"enter-type-password": "Enter {{type}} Password",
|
||||
"entity-ingestion-added-successfully": "{{entity}} Ingestion Added Successfully",
|
||||
"entity-plural": "Entities",
|
||||
"entity-service": "{{entity}} Service",
|
||||
"entity-with-value": "{{entity}} - {{value}}",
|
||||
@ -273,6 +281,7 @@
|
||||
"leave-team": "Leave Team",
|
||||
"less-lowercase": "less",
|
||||
"lineage": "Lineage",
|
||||
"lineage-ingestion": "Lineage Ingestion",
|
||||
"lineage-lowercase": "lineage",
|
||||
"list": "List",
|
||||
"loading": "Loading",
|
||||
@ -291,10 +300,12 @@
|
||||
"messaging-lowercase": "messaging",
|
||||
"metadata": "Metadata",
|
||||
"metadata-ingestion": "Metadata Ingestion",
|
||||
"metadata-lowercase": "metadata",
|
||||
"metadata-to-es-config-optional": "Metadata To ES Config (Optional)",
|
||||
"metric-type": "Metric Type",
|
||||
"metric-value": "Metric Value",
|
||||
"metrics-summary": "Metrics Summary",
|
||||
"minor": "Minor",
|
||||
"ml-model": "ML Model",
|
||||
"ml-model-plural": "ML Models",
|
||||
"model-name": "Model Name",
|
||||
@ -312,6 +323,7 @@
|
||||
"new-password": "New Password",
|
||||
"next": "Next",
|
||||
"no": "No",
|
||||
"no-data-found": "No data found",
|
||||
"no-description": "No description",
|
||||
"no-entity": "No {{entity}}",
|
||||
"no-of-test": " No. of Test",
|
||||
@ -363,6 +375,7 @@
|
||||
"policy-name": "Policy Name",
|
||||
"policy-plural": "Policies",
|
||||
"posted-on-lowercase": "posted on",
|
||||
"press": "Press",
|
||||
"primary-key": "Primary Key",
|
||||
"private-key": "PrivateKey",
|
||||
"profile": "Profile",
|
||||
@ -370,6 +383,8 @@
|
||||
"profile-sample-type": "Profile Sample {{type}}",
|
||||
"profiler": "Profiler",
|
||||
"profiler-amp-data-quality": "Profiler & Data Quality",
|
||||
"profiler-ingestion": "Profiler Ingestion",
|
||||
"profiler-lowercase": "profiler",
|
||||
"profiler-timeout-second-plural-label": "Timeout in Seconds",
|
||||
"property": "Property",
|
||||
"quality": "Quality",
|
||||
@ -427,6 +442,7 @@
|
||||
"sample-data": "Sample Data",
|
||||
"save": "Save",
|
||||
"schedule": "Schedule",
|
||||
"schedule-for-ingestion": "Schedule for Ingestion",
|
||||
"schedule-interval": "Schedule Interval",
|
||||
"schema": "Schema",
|
||||
"schema-field": "Schema Field",
|
||||
@ -445,10 +461,12 @@
|
||||
"select-column-plural-to-exclude": "Select Columns to Exclude",
|
||||
"select-column-plural-to-include": "Select Columns to Include",
|
||||
"select-field": "Select {{field}}",
|
||||
"send-now": "Send now",
|
||||
"send-to": "Send to",
|
||||
"server": "Server",
|
||||
"service": "Service",
|
||||
"service-account-email": "Service Account Email",
|
||||
"service-created-successfully": "Service Created Successfully",
|
||||
"service-lowercase": "service",
|
||||
"service-name": "Service Name",
|
||||
"service-sso": "{{serviceType}} SSO",
|
||||
@ -534,6 +552,8 @@
|
||||
"url-lowercase": "url",
|
||||
"url-uppercase": "URL",
|
||||
"usage": "Usage",
|
||||
"usage-ingestion": "Usage Ingestion",
|
||||
"usage-lowercase": "usage",
|
||||
"use-aws-credential-plural": "Use AWS Credentials",
|
||||
"use-fqn-for-filtering": "Use FQN For Filtering",
|
||||
"use-ssl": "Use SSL",
|
||||
@ -565,6 +585,7 @@
|
||||
"action-has-been-done-but-failed-to-deploy": "has been {{action}}, but failed to deploy",
|
||||
"active-users": "Display the number of active users.",
|
||||
"add-kpi-message": "Identify the Key Performance Indicators (KPI) that best reflect the health of your data assets. Review your data assets based on Description, Ownership, and Tier. Define your target metrics in absolute or percentage to track your progress. Finally, set a start and end date to achieve your data goals.",
|
||||
"add-new-service-description": "Choose from the range of services that OpenMetadata integrates with. To add a new service, start by selecting a Service Category (Database, Messaging, Dashboard, or Pipeline). From the list of available services, select the one you'd want to integrate with.",
|
||||
"add-policy-message": "Policies are assigned to teams. In OpenMetadata, a policy is a collection of rules, which define access based on certain conditions. We support rich SpEL (Spring Expression Language) based conditions. All the operations supported by an entity are published. Use these fine grained operations to define the conditional rules for each policy. Create well-defined policies based on conditional rules to build rich access control roles.",
|
||||
"add-role-message": "Roles are assigned to Users. In OpenMetadata, Roles are a collection of Policies. Each Role must have at least one policy attached to it. A Role supports multiple policies with a one to many relationship. Ensure that the necessary policies are created before creating a new role. Build rich access control roles with well-defined policies based on conditional rules.",
|
||||
"adding-new-tag": "Adding new tag on {{categoryName}}",
|
||||
@ -591,9 +612,12 @@
|
||||
"at-least-one-policy": "Enter at least one policy",
|
||||
"bot-email-confirmation": "{{email}} for {{botName}} bot",
|
||||
"collaborate-with-other-user": "to collaborate with other users.",
|
||||
"configure-a-service-description": "Enter a unique service name. The name must be unique across the category of services. For e.g., among database services, both MySQL and Snowflake cannot have the same service name (E.g. customer_data). However, different service categories (dashboard, pipeline) can have the same service name. Spaces are not supported in the service name. Characters like - _ are supported. Also, add a description.",
|
||||
"configure-dbt-model-description": "A dbt model provides transformation logic that creates a table from raw data. Lineage traces the path of data across tables, but a dbt model provides specifics. Select the required dbt source provider and fill in the mandatory fields. Integrate with dbt from OpenMetadata to view the models used to generate tables.",
|
||||
"configure-webhook-message": "OpenMetadata can be configured to automatically send out event notifications to registered webhooks. Enter the Webhook Name, and an Endpoint URL to receive the HTTP callback on. Use Event Filters to only receive notifications based on events of interest, like when an entity is created, updated, or deleted; and for the entities your application is interested in. Add a description to help people understand the purpose of the webhook and to keep track of the use case. Use advanced configuration to set up a shared secret key to verify the webhook events using HMAC signature.",
|
||||
"configure-webhook-name-message": "OpenMetadata can be configured to automatically send out event notifications to registered {{webhookType}} webhooks through OpenMetadata. Enter the {{webhookType}} webhook name, and an Endpoint URL to receive the HTTP callback on. Use Event Filters to only receive notifications for the required entities. Filter events based on when an entity is created, updated, or deleted. Add a description to note the use case of the webhook. You can use advanced configuration to set up a shared secret key to verify the {{webhookType}} webhook events using HMAC signature.",
|
||||
"confirm-delete-message": "Are you sure you want to permanently delete this message?",
|
||||
"connection-details-description": "Every service comes with its standard set of requirements and here are the basics of what you’d need to connect. The connection requirements are generated from the JSON schema for that service. The mandatory fields are marked with an asterisk.",
|
||||
"copied-to-clipboard": "Copied to the clipboard",
|
||||
"create-new-glossary-guide": "A Glossary is a controlled vocabulary used to define the concepts and terminology in an organization. Glossaries can be specific to a certain domain (for e.g., Business Glossary, Technical Glossary). In the glossary, the standard terms and concepts can be defined along with the synonyms, and related terms. Control can be established over how and who can add the terms in the glossary.",
|
||||
"create-or-update-email-account-for-bot": "Changing the account email will update or create a new bot user.",
|
||||
@ -602,6 +626,7 @@
|
||||
"data-insight-page-views": "Displays the number of times a dataset type was viewed.",
|
||||
"data-insight-subtitle": "Get a single pane view of the health of all your data assets over time.",
|
||||
"database-service-name-message": "Database Service Name for creation of lineage.",
|
||||
"dbt-ingestion-description": "A dbt workflow can be configured and deployed after a metadata ingestion has been set up. Multiple dbt pipelines can be set up for the same database service. The pipeline feeds the dbt tab of the Table entity, creates lineage from dbt nodes and adds tests from dbt. Add the source configuration of the dbt files to start.",
|
||||
"dbt-run-result-http-path-message": "dbt runs the results on an http path to extract the test results.",
|
||||
"deeply-understand-table-relations-message": "Deeply understand table relations; thanks to column-level lineage.",
|
||||
"delete-action-description": "Deleting this {{entityType}} will permanently remove its metadata from OpenMetadata.",
|
||||
@ -614,6 +639,7 @@
|
||||
"enable-column-profile": "Enable column profile",
|
||||
"enable-debug-logging": "Enable debug logging",
|
||||
"enables-end-to-end-metadata-management": "Enables end-to-end metadata management with data discovery, data quality, observability, and people collaboration",
|
||||
"ensure-airflow-set-up-correctly-before-heading-to-ingest-metadata": "Ensure that you have Airflow set up correctly before heading to ingest metadata.",
|
||||
"enter-a-field": "Enter a {{field}}",
|
||||
"enter-column-description": "Enter column description",
|
||||
"enter-comma-separated-term": "Enter comma separated term",
|
||||
@ -642,11 +668,13 @@
|
||||
"fosters-collaboration-among-producers-and-consumers": "Fosters collaboration among the producers and consumers of data.",
|
||||
"get-started-with-open-metadata": "Get started with OpenMetadata",
|
||||
"group-team-type-change-message": "The team type 'Group' cannot be changed. Please create a new team with the preferred type.",
|
||||
"in-this-database": "In this Database",
|
||||
"include-assets-message": "Enable extracting {{assets}} from the data source.",
|
||||
"include-lineage-message": "Configuration to turn off fetching lineage from pipelines.",
|
||||
"ingest-sample-data-for-entity": "Extract sample data from each {{entity}}.",
|
||||
"ingestion-bot-cant-be-deleted": "You cannot delete the ingestion bot.",
|
||||
"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.",
|
||||
"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",
|
||||
@ -657,6 +685,7 @@
|
||||
"leave-the-team-team-name": "Leave the team {{teamName}}",
|
||||
"length-validator-error": "At least {{length}} {{field}} required",
|
||||
"lineage-data-is-not-available-for-deleted-entities": "Lineage data is not available for deleted entities.",
|
||||
"lineage-ingestion-description": "Lineage ingestion can be configured and deployed after a metadata ingestion has been set up. The lineage ingestion workflow obtains the query history, parses CREATE, INSERT, MERGE... queries and prepares the lineage between the involved entities. The lineage ingestion can have only one pipeline for a database service. Define the Query Log Duration (in days) and Result Limit to start.",
|
||||
"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!",
|
||||
@ -664,6 +693,7 @@
|
||||
"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.",
|
||||
"mentioned-you-on-the-lowercase": "mentioned you on the",
|
||||
"metadata-ingestion-description": "Based on the service type selected, enter the filter pattern details for the schema or table (database), or topic (messaging), or dashboard. You can include or exclude the filter patterns. Choose to include views, enable or disable the data profiler, and ingest sample data, as required.",
|
||||
"most-active-users": "Displays the most active users on the platform based on Page Views.",
|
||||
"most-viewed-data-assets": "Displays the most viewed data assets.",
|
||||
"new-conversation": "You are starting a new conversation",
|
||||
@ -710,6 +740,7 @@
|
||||
"pipeline-trigger-success-message": "Pipeline triggered successfully!",
|
||||
"profile-sample-percentage-message": "Set the Profiler value as percentage",
|
||||
"profile-sample-row-count-message": " Set the Profiler value as row count",
|
||||
"profiler-ingestion-description": "A profiler workflow can be configured and deployed after a metadata ingestion has been set up. Multiple profiler pipelines can be set up for the same database service. The pipeline feeds the Profiler tab of the Table entity, and also runs the tests configured for that entity. Add a Name, FQN, and define the filter pattern to start.",
|
||||
"profiler-timeout-seconds-message": "For the Profiler, add the duration in seconds for timeout (optional). The profiler will wait for any pending queries to be executed, or will terminate them once it reaches the timeout.",
|
||||
"query-log-duration-message": "Configuration to tune how far we want to look back in query logs to process usage data.",
|
||||
"reacted-with-emoji": "reacted with {{type}} emoji",
|
||||
@ -721,6 +752,7 @@
|
||||
"restore-entities-error": "Error while restoring {{entity}}",
|
||||
"restore-entities-success": "{{entity}} restored successfully",
|
||||
"result-limit-message": "Configuration to set the limit for query logs.",
|
||||
"schedule-for-ingestion-description": "Scheduling can be set up at an hourly, daily, or weekly cadence. The timezone is in UTC.",
|
||||
"scopes-comma-separated": "Add the Scopes value, separated by commas",
|
||||
"search-for-entity-types": "Search for Tables, Topics, Dashboards, Pipelines and ML Models.",
|
||||
"search-for-ingestion": "Search for ingestion",
|
||||
@ -729,6 +761,8 @@
|
||||
"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}}",
|
||||
"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.",
|
||||
"stage-file-location-message": "Temporary file name to store the query logs before processing. Absolute file path required.",
|
||||
@ -751,6 +785,7 @@
|
||||
"tour-step-search-for-matching-dataset": "Search for matching data assets by \"name\", \"description\", \"column name\", and so on from the <0>{{text}}</0> box.",
|
||||
"tour-step-trace-path-across-tables": " With <0>{{text}}</0>, trace the path of data across tables, pipelines, & dashboards.",
|
||||
"tour-step-type-search-term": "In the search box, type <0>\"{{text}}\"</0>. Hit <0>{{enterText}}.</0>",
|
||||
"usage-ingestion-description": "Usage ingestion can be configured and deployed after a metadata ingestion has been set up. The usage ingestion workflow obtains the query log and table creation details from the underlying database and feeds it to OpenMetadata. Metadata and usage can have only one pipeline for a database service. Define the Query Log Duration (in days), Stage File Location, and Result Limit to start.",
|
||||
"use-fqn-for-filtering-message": "Regex will be applied on fully qualified name (e.g service_name.db_name.schema_name.table_name) instead of raw name (e.g. table_name).",
|
||||
"view-deleted-teams": "View All the Deleted Teams, which come under this Team.",
|
||||
"view-sample-data-message": "To view Sample Data, run the MetaData Ingestion. Please refer to this doc to schedule the",
|
||||
@ -758,7 +793,8 @@
|
||||
"webhook-type-listing-message": "Provide timely updates to the producers and consumers of metadata via {{webhookType}} notifications. Use {{webhookType}} webhooks to send notifications regarding the metadata change events in your organization through APIs. You can add, list, update, and delete these webhooks.",
|
||||
"would-like-to-start-adding-some": "Would like to start adding some?",
|
||||
"write-your-announcement-lowercase": "write your announcement",
|
||||
"write-your-description": "Write your description"
|
||||
"write-your-description": "Write your description",
|
||||
"you-can-also-set-up-the-metadata-ingestion": "You can also set up the metadata ingestion."
|
||||
},
|
||||
"server": {
|
||||
"add-entity-error": "Error while adding {{entity}}!",
|
||||
|
@ -74,18 +74,28 @@ window.IntersectionObserver = jest.fn().mockImplementation(() => ({
|
||||
}));
|
||||
|
||||
/**
|
||||
* mock react-i18next
|
||||
* mock i18next
|
||||
*/
|
||||
jest.mock('react-i18next', () => ({
|
||||
|
||||
jest.mock('i18next', () => ({
|
||||
...jest.requireActual('i18next'),
|
||||
use: jest.fn(),
|
||||
init: jest.fn(),
|
||||
t: jest.fn().mockImplementation((key) => key),
|
||||
}));
|
||||
|
||||
jest.mock('utils/i18next/LocalUtil', () => ({
|
||||
useTranslation: jest.fn().mockReturnValue({
|
||||
t: (key) => key,
|
||||
}),
|
||||
t: (key) => key,
|
||||
}));
|
||||
|
||||
/**
|
||||
* mock i18next
|
||||
* mock react-i18next
|
||||
*/
|
||||
jest.mock('i18next', () => ({
|
||||
t: jest.fn().mockImplementation((key) => key),
|
||||
jest.mock('react-i18next', () => ({
|
||||
...jest.requireActual('react-i18next'),
|
||||
useTranslation: jest.fn().mockReturnValue({
|
||||
t: (key) => key,
|
||||
}),
|
||||
}));
|
||||
|
@ -16,10 +16,10 @@ import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import { getInitOptions } from './i18nextUtil';
|
||||
|
||||
export const initLocale = (): void => {
|
||||
// Initialize i18next (language)
|
||||
i18n
|
||||
.use(LanguageDetector) // Detects system language
|
||||
.use(initReactI18next)
|
||||
.init(getInitOptions());
|
||||
};
|
||||
// Initialize i18next (language)
|
||||
i18n
|
||||
.use(LanguageDetector) // Detects system language
|
||||
.use(initReactI18next)
|
||||
.init(getInitOptions());
|
||||
|
||||
export default i18n;
|
||||
|
Loading…
x
Reference in New Issue
Block a user