From 8826cca539c643fd4334b64fd926959b5691db20 Mon Sep 17 00:00:00 2001 From: Philip Okugbe <16838612+Philipinho@users.noreply.github.com> Date: Fri, 7 Mar 2025 00:03:57 +0000 Subject: [PATCH] fix space translations (#826) --- .../public/locales/en-US/translation.json | 8 +++++++- .../space/components/space-member-role.tsx | 10 +++++++++- .../src/features/space/queries/space-query.ts | 19 +++++++++++++------ .../features/space/types/space-role-data.ts | 13 ++++++------- 4 files changed, 35 insertions(+), 15 deletions(-) diff --git a/apps/client/public/locales/en-US/translation.json b/apps/client/public/locales/en-US/translation.json index d3619bc1..209280b1 100644 --- a/apps/client/public/locales/en-US/translation.json +++ b/apps/client/public/locales/en-US/translation.json @@ -340,5 +340,11 @@ "Write anything. Enter \"/\" for commands": "Write anything. Enter \"/\" for commands", "Names do not match": "Names do not match", "Today, {{time}}": "Today, {{time}}", - "Yesterday, {{time}}": "Yesterday, {{time}}" + "Yesterday, {{time}}": "Yesterday, {{time}}", + "Space created successfully": "Space created successfully", + "Space updated successfully": "Space updated successfully", + "Space deleted successfully": "Space deleted successfully", + "Members added successfully": "Members added successfully", + "Member removed successfully": "Member removed successfully", + "Member role updated successfully": "Member role updated successfully" } diff --git a/apps/client/src/features/space/components/space-member-role.tsx b/apps/client/src/features/space/components/space-member-role.tsx index b6b70a47..17e2e358 100644 --- a/apps/client/src/features/space/components/space-member-role.tsx +++ b/apps/client/src/features/space/components/space-member-role.tsx @@ -2,6 +2,8 @@ import { IconCheck } from "@tabler/icons-react"; import { Group, Select, SelectProps, Text } from "@mantine/core"; import React from "react"; import { spaceRoleData } from "@/features/space/types/space-role-data.ts"; +import { useTranslation } from "react-i18next"; +import { IRoleData } from "@/lib/types.ts"; const iconProps = { stroke: 1.5, @@ -38,9 +40,15 @@ export function SpaceMemberRole({ defaultRole, label, }: SpaceMemberRoleProps) { + const { t } = useTranslation(); + return (