diff --git a/apps/client/public/locales/en/settings.json b/apps/client/public/locales/en/settings.json
index a1e19862..02458dbd 100644
--- a/apps/client/public/locales/en/settings.json
+++ b/apps/client/public/locales/en/settings.json
@@ -98,7 +98,10 @@
"Active": "Active",
"Add members": "Add members",
"Search for users": "Search for users",
- "No user found": "No user found"
+ "No user found": "No user found",
+ "Add groups": "Add groups",
+ "Search for groups": "Search for groups",
+ "No group found": "No group found"
},
"space": {
"Spaces": "Spaces",
diff --git a/apps/client/public/locales/en/translation.json b/apps/client/public/locales/en/translation.json
index 2ae48360..548f3541 100644
--- a/apps/client/public/locales/en/translation.json
+++ b/apps/client/public/locales/en/translation.json
@@ -5,6 +5,20 @@
"No pages yet": "No pages yet",
"Failed to load page. An error occurred.": "Failed to load page. An error occurred."
},
+ "role": {
+ "Full access": "Full access",
+ "Has full access to space settings and pages.": "Has full access to space settings and pages.",
+ "Can edit": "Can edit",
+ "Can create and edit pages in space.": "Can create and edit pages in space.",
+ "Can view": "Can view",
+ "Can view pages in space but not edit.": "Can view pages in space but not edit.",
+ "Owner": "Owner",
+ "Can manage workspace": "Can manage workspace",
+ "Admin": "Admin",
+ "Can manage workspace but cannot delete it": "Can manage workspace but cannot delete it",
+ "Member": "Member",
+ "Can become members of groups and spaces in workspace": "Can become members of groups and spaces in workspace"
+ },
"layout": {
"Home": "Home",
"Workspace": "Workspace",
diff --git a/apps/client/public/locales/zh/settings.json b/apps/client/public/locales/zh/settings.json
index ed208ff5..6616fd70 100644
--- a/apps/client/public/locales/zh/settings.json
+++ b/apps/client/public/locales/zh/settings.json
@@ -98,7 +98,10 @@
"Active": "活跃",
"Add members": "添加成员",
"Search for users": "搜索用户",
- "No user found": "未找到用户"
+ "No user found": "未找到用户",
+ "Add groups": "添加群组",
+ "Search for groups": "搜索群组",
+ "No group found": "未找到群组"
},
"space": {
"Spaces": "空间",
diff --git a/apps/client/public/locales/zh/translation.json b/apps/client/public/locales/zh/translation.json
index 61aab577..9f2d5d22 100644
--- a/apps/client/public/locales/zh/translation.json
+++ b/apps/client/public/locales/zh/translation.json
@@ -5,6 +5,20 @@
"No pages yet": "暂无页面",
"Failed to load page. An error occurred.": "加载页面失败。发生错误。"
},
+ "role": {
+ "Full access": "完全访问",
+ "Has full access to space settings and pages": "具有对空间设置和页面的完全访问权限",
+ "Can edit": "可以编辑",
+ "Can create and edit pages in space": "可以在空间中创建和编辑页面",
+ "Can view": "可以查看",
+ "Can view pages in space but not edit": "可以查看空间中的页面但不能编辑",
+ "Owner": "所有者",
+ "Can manage workspace": "可以管理工作区",
+ "Admin": "管理员",
+ "Can manage workspace but cannot delete it": "可以管理工作区但不能删除它",
+ "Member": "成员",
+ "Can become members of groups and spaces in workspace": "可以成为工作区中群组和空间的成员"
+ },
"layout": {
"Home": "首页",
"Workspace": "工作区",
diff --git a/apps/client/src/components/ui/role-select-menu.tsx b/apps/client/src/components/ui/role-select-menu.tsx
index 0d83cb7f..9434f83c 100644
--- a/apps/client/src/components/ui/role-select-menu.tsx
+++ b/apps/client/src/components/ui/role-select-menu.tsx
@@ -2,6 +2,7 @@ import React, { forwardRef } from "react";
import { IconCheck, IconChevronDown } from "@tabler/icons-react";
import { Group, Text, Menu, Button } from "@mantine/core";
import { IRoleData } from "@/lib/types.ts";
+import { useTranslation } from "react-i18next";
interface RoleButtonProps extends React.ComponentPropsWithoutRef<"button"> {
name: string;
@@ -36,10 +37,14 @@ export default function RoleSelectMenu({
onChange,
disabled,
}: RoleMenuProps) {
+ const { t } = useTranslation("translation", {
+ keyPrefix: "role",
+ });
+
return (