From 0ba1882bc377304a7bffa28efb1682aa0fe7abb4 Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Thu, 23 Feb 2023 11:02:15 +0530 Subject: [PATCH] Final Localization (#10288) --- .../resources/ui/src/components/nav-bar/NavBar.tsx | 8 ++++++-- .../resources/ui/src/locale/languages/en-us.json | 2 ++ .../ui/src/pages/database-details/index.tsx | 4 ++-- .../resources/ui/src/pages/teams/AddTeamForm.tsx | 14 +++++++++++--- 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/nav-bar/NavBar.tsx b/openmetadata-ui/src/main/resources/ui/src/components/nav-bar/NavBar.tsx index e3bbdf86c13..f27b636f15c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/nav-bar/NavBar.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/nav-bar/NavBar.tsx @@ -171,12 +171,16 @@ const NavBar = ({ let path: string; switch (type) { case 'Task': - body = `${createdBy} assigned you a new task.`; + body = t('message.user-assign-new-task', { + user: createdBy, + }); path = getTaskDetailPath(toString(id)).pathname; break; case 'Conversation': - body = `${createdBy} mentioned you in a comment.`; + body = t('message.user-mentioned-in-comment', { + user: createdBy, + }); path = prepareFeedLink(entityType as string, entityFQN as string); } const notification = new Notification('Notification From OpenMetadata', { diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index e015073462b..025355512eb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -1144,6 +1144,8 @@ "unable-to-error-elasticsearch": "We are unable to {{error}}} Elasticsearch for entity indexes.", "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).", + "user-assign-new-task": "{{user}} assigned you a new task.", + "user-mentioned-in-comment": "{{user}} mentioned you in a comment.", "user-verified-successfully": "User Verified Successfully", "valid-url-endpoint": "Endpoints should be valid URL", "view-deleted-teams": "View All the Deleted Teams, which come under this Team.", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/database-details/index.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/database-details/index.tsx index 2ffad0f6a96..3d02b1a1f7d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/database-details/index.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/database-details/index.tsx @@ -174,7 +174,7 @@ const DatabaseDetails: FunctionComponent = () => { const tabs = [ { - name: 'Schemas', + name: t('label.schema-plural'), icon: { alt: 'schemas', name: 'schema-grey', @@ -186,7 +186,7 @@ const DatabaseDetails: FunctionComponent = () => { position: 1, }, { - name: 'Activity Feeds', + name: t('label.activity-feed-plural'), icon: { alt: 'activity_feed', name: 'activity_feed', diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/teams/AddTeamForm.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/teams/AddTeamForm.tsx index f2aa2c411d8..5a8858a98ab 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/teams/AddTeamForm.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/teams/AddTeamForm.tsx @@ -53,11 +53,19 @@ const AddTeamForm: React.FC = ({ const validationMessages = useMemo( () => ({ - required: '${label} is required', + required: t('message.field-text-is-required', { + fieldText: '${label}', + }), string: { - range: '${label} must be between ${min} and ${max}.', + range: t('message.entity-size-in-between', { + entity: '${label}', + min: '${min}', + max: '${max}', + }), }, - whitespace: '${label} is required', + whitespace: t('message.entity-not-contain-whitespace', { + entity: '${label}', + }), }), [] );