From 9fca00b465f55e7ae5339e359b00ee92b5a7195a Mon Sep 17 00:00:00 2001 From: Ashish Gupta Date: Wed, 23 Nov 2022 14:35:55 +0530 Subject: [PATCH] UI : Label fixes for Errorplaceholder in User page (#8960) * UI label fixes for errorplaceholder in User page * minor changes * added fix for server error Co-authored-by: Sachin Chaurasiya --- .../ui/src/components/Explore/Explore.component.tsx | 2 +- .../ui/src/components/TeamDetails/TeamDetailsV1.tsx | 2 +- .../resources/ui/src/components/Users/Users.component.tsx | 8 ++++++-- .../src/main/resources/ui/src/locale/languages/en-us.json | 3 +-- .../ui/src/pages/UserPage/UserPage.component.tsx | 6 +++--- .../src/main/resources/ui/src/pages/teams/TeamsPage.tsx | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx index 6ffd1f0c324..7d7ec4afa79 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Explore/Explore.component.tsx @@ -191,7 +191,7 @@ const Explore: React.FC = ({ }); } catch { showErrorToast( - t('message.entity-fetch-error', { + t('server.entity-fetch-error', { entity: `profile details for table ${source?.name || ''}`, }) ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx index 5537cc47a7e..127aeae5bde 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TeamDetails/TeamDetailsV1.tsx @@ -562,7 +562,7 @@ const TeamDetailsV1 = ({ } catch (error) { showErrorToast( error as AxiosError, - t('message.entity-fetch-error', { + t('server.entity-fetch-error', { entity: 'User Permissions', }) ); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx index 21fbbbbbc13..41305866458 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Users/Users.component.tsx @@ -942,8 +942,12 @@ const Users = ({ ) : ( {tabNumber === 3 - ? t('message.no-owned-entities') - : t('message.no-followed-entities')} + ? t('server.no-user-entities', { + type: 'owned', + }) + : t('server.no-user-entities', { + type: 'followed', + })} )} 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 cfc4e8e206e..7779202c243 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 @@ -380,8 +380,7 @@ "all-charts-are-mapped": "All charts are mapped with existing KPIs." }, "server": { - "no-followed-entities": "You have not followed anything yet.", - "no-owned-entities": "You have not owned anything yet.", + "no-user-entities": "You have not {{type}} anything yet.", "no-task-available": "No task data is available", "entity-fetch-error": "Error while fetching {{entity}}", "feed-post-error": "Error while posting the message!", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx index 2fe57086a1a..895f7561816 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/UserPage/UserPage.component.tsx @@ -104,7 +104,7 @@ const UserPage = () => { .catch((err: AxiosError) => { showErrorToast( err, - t('message.entity-fetch-error', { + t('server.entity-fetch-error', { entity: 'User Details', }) ); @@ -152,7 +152,7 @@ const UserPage = () => { .catch((err: AxiosError) => { showErrorToast( err, - t('message.entity-fetch-error', { + t('server.entity-fetch-error', { entity: `${fetchOwnedEntities ? 'Owned' : 'Follwing'} Entities`, }) ); @@ -207,7 +207,7 @@ const UserPage = () => { .catch((err: AxiosError) => { showErrorToast( err, - t('message.entity-fetch-error', { + t('server.entity-fetch-error', { entity: 'Activity Feeds', }) ); diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/teams/TeamsPage.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/teams/TeamsPage.tsx index 66a422ec775..2c05cb90a78 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/teams/TeamsPage.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/teams/TeamsPage.tsx @@ -503,7 +503,7 @@ const TeamsPage = () => { .catch((err: AxiosError) => { showErrorToast( err, - t('message.entity-fetch-error', { + t('server.entity-fetch-error', { entity: 'Team Assets', }) );