diff --git a/apps/client/public/locales/en/group.json b/apps/client/public/locales/en/group.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/apps/client/public/locales/en/group.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/apps/client/public/locales/en/settings.json b/apps/client/public/locales/en/settings.json index 1d56278d..1835d809 100644 --- a/apps/client/public/locales/en/settings.json +++ b/apps/client/public/locales/en/settings.json @@ -47,28 +47,7 @@ "Updated successfully": "Updated successfully", "Failed to update data": "Failed to update data" }, - "member": { - "Members": "Members", - "Invite members": "Invite members", - "Invite new members": "Invite new members", - "Pending": "Pending", - "User": "User", - "Status": "Status", - "Role": "Role", - "Active": "Active", - "Email": "Email", - "Date": "Date", - "Invited members who are yet to accept their invitation will appear here.": "Invited members who are yet to accept their invitation will appear here.", - "Invite by email": "Invite by email", - "Enter valid email addresses separated by comma or space max_50": "Enter valid email addresses separated by comma or space [max: 50]", - "enter valid emails addresses": "enter valid emails addresses", - "Select role": "Select role", - "Select role to assign to all invited members": "Select role to assign to all invited members", - "Choose a role": "Choose a role", - "Add to groups": "Add to groups", - "Invited members will be granted access to spaces the groups can access": "Invited members will be granted access to spaces the groups can access", - "Send invitation": "Send invitation" - }, + "member": {}, "group": { "Groups": "Groups", "Create group": "Create group", diff --git a/apps/client/public/locales/en/workspace.json b/apps/client/public/locales/en/workspace.json index 9e26dfee..3239822c 100644 --- a/apps/client/public/locales/en/workspace.json +++ b/apps/client/public/locales/en/workspace.json @@ -1 +1,22 @@ -{} \ No newline at end of file +{ + "Members": "Members", + "Invite members": "Invite members", + "Invite new members": "Invite new members", + "Pending": "Pending", + "User": "User", + "Status": "Status", + "Role": "Role", + "Active": "Active", + "Email": "Email", + "Date": "Date", + "Invited members who are yet to accept their invitation will appear here.": "Invited members who are yet to accept their invitation will appear here.", + "Invite by email": "Invite by email", + "Enter valid email addresses separated by comma or space max_50": "Enter valid email addresses separated by comma or space [max: 50]", + "enter valid emails addresses": "enter valid emails addresses", + "Select role": "Select role", + "Select role to assign to all invited members": "Select role to assign to all invited members", + "Choose a role": "Choose a role", + "Add to groups": "Add to groups", + "Invited members will be granted access to spaces the groups can access": "Invited members will be granted access to spaces the groups can access", + "Send invitation": "Send invitation" +} diff --git a/apps/client/public/locales/zh/group.json b/apps/client/public/locales/zh/group.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/apps/client/public/locales/zh/group.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/apps/client/public/locales/zh/settings.json b/apps/client/public/locales/zh/settings.json index c4125909..c4062767 100644 --- a/apps/client/public/locales/zh/settings.json +++ b/apps/client/public/locales/zh/settings.json @@ -47,28 +47,7 @@ "Updated successfully": "更新成功", "Failed to update data": "数据更新失败" }, - "member": { - "Members": "成员", - "Invite members": "邀请成员", - "Invite new members": "邀请新成员", - "Pending": "待定", - "User": "用户", - "Status": "状态", - "Role": "角色", - "Active": "活跃", - "Email": "电子邮箱", - "Date": "日期", - "Invited members who are yet to accept their invitation will appear here.": "尚未接受邀请的成员将显示在这里。", - "Invite by email": "通过电子邮箱邀请", - "Enter valid email addresses separated by comma or space max_50": "输入有效的电子邮箱地址,用逗号或空格分隔 [最多:50个]", - "enter valid emails addresses": "输入有效的电子邮箱地址", - "Select role": "选择角色", - "Select role to assign to all invited members": "选择要分配给所有被邀请成员的角色", - "Choose a role": "选择一个角色", - "Add to groups": "添加到群组", - "Invited members will be granted access to spaces the groups can access": "被邀请的成员将被授予访问群组可以访问的空间的权限", - "Send invitation": "发送邀请" - }, + "member": {}, "group": { "Groups": "群组", "Create group": "创建群组", diff --git a/apps/client/public/locales/zh/workspace.json b/apps/client/public/locales/zh/workspace.json index 5a6f8453..1fd96984 100644 --- a/apps/client/public/locales/zh/workspace.json +++ b/apps/client/public/locales/zh/workspace.json @@ -1,3 +1,22 @@ { - "space": {} + "Members": "成员", + "Invite members": "邀请成员", + "Invite new members": "邀请新成员", + "Pending": "待定", + "User": "用户", + "Status": "状态", + "Role": "角色", + "Active": "活跃", + "Email": "电子邮箱", + "Date": "日期", + "Invited members who are yet to accept their invitation will appear here.": "尚未接受邀请的成员将显示在这里。", + "Invite by email": "通过电子邮箱邀请", + "Enter valid email addresses separated by comma or space max_50": "输入有效的电子邮箱地址,用逗号或空格分隔 [最多:50个]", + "enter valid emails addresses": "输入有效的电子邮箱地址", + "Select role": "选择角色", + "Select role to assign to all invited members": "选择要分配给所有被邀请成员的角色", + "Choose a role": "选择一个角色", + "Add to groups": "添加到群组", + "Invited members will be granted access to spaces the groups can access": "被邀请的成员将被授予访问群组可以访问的空间的权限", + "Send invitation": "发送邀请" } diff --git a/apps/client/src/features/workspace/components/members/components/workspace-invite-form.tsx b/apps/client/src/features/workspace/components/members/components/workspace-invite-form.tsx index cc402ef6..5c0075a3 100644 --- a/apps/client/src/features/workspace/components/members/components/workspace-invite-form.tsx +++ b/apps/client/src/features/workspace/components/members/components/workspace-invite-form.tsx @@ -11,7 +11,7 @@ interface Props { onClose: () => void; } export function WorkspaceInviteForm({ onClose }: Props) { - const { t } = useTranslation(["settings", "translation"]); + const { t } = useTranslation(["workspace", "translation"]); const [emails, setEmails] = useState([]); const [role, setRole] = useState(UserRole.MEMBER); const [groupIds, setGroupIds] = useState([]); @@ -47,10 +47,10 @@ export function WorkspaceInviteForm({ onClose }: Props) { role.value !== UserRole.OWNER) @@ -82,9 +80,9 @@ export function WorkspaceInviteForm({ onClose }: Props) { @@ -93,7 +91,7 @@ export function WorkspaceInviteForm({ onClose }: Props) { onClick={handleSubmit} loading={createInvitationMutation.isPending} > - {t("workspace.member.Send invitation")} + {t("Send invitation")} diff --git a/apps/client/src/features/workspace/components/members/components/workspace-invite-modal.tsx b/apps/client/src/features/workspace/components/members/components/workspace-invite-modal.tsx index d4b1d78d..6cee1197 100644 --- a/apps/client/src/features/workspace/components/members/components/workspace-invite-modal.tsx +++ b/apps/client/src/features/workspace/components/members/components/workspace-invite-modal.tsx @@ -4,9 +4,7 @@ import { useDisclosure } from "@mantine/hooks"; import { useTranslation } from "react-i18next"; export default function WorkspaceInviteModal() { - const { t } = useTranslation("settings", { - keyPrefix: "workspace.member", - }); + const { t } = useTranslation("workspace"); const [opened, { open, close }] = useDisclosure(false); return ( diff --git a/apps/client/src/features/workspace/components/members/components/workspace-invites-table.tsx b/apps/client/src/features/workspace/components/members/components/workspace-invites-table.tsx index b1f831f8..915895d5 100644 --- a/apps/client/src/features/workspace/components/members/components/workspace-invites-table.tsx +++ b/apps/client/src/features/workspace/components/members/components/workspace-invites-table.tsx @@ -9,9 +9,7 @@ import useUserRole from "@/hooks/use-user-role.tsx"; import { useTranslation } from "react-i18next"; export default function WorkspaceInvitesTable() { - const { t } = useTranslation("settings", { - keyPrefix: "workspace.member", - }); + const { t } = useTranslation("workspace"); const { data, isLoading } = useWorkspaceInvitationsQuery({ limit: 100, }); diff --git a/apps/client/src/features/workspace/components/members/components/workspace-members-table.tsx b/apps/client/src/features/workspace/components/members/components/workspace-members-table.tsx index b352c726..27bcc459 100644 --- a/apps/client/src/features/workspace/components/members/components/workspace-members-table.tsx +++ b/apps/client/src/features/workspace/components/members/components/workspace-members-table.tsx @@ -15,9 +15,7 @@ import { UserRole } from "@/lib/types.ts"; import { useTranslation } from "react-i18next"; export default function WorkspaceMembersTable() { - const { t } = useTranslation("settings", { - keyPrefix: "workspace.member", - }); + const { t } = useTranslation("workspace"); const { data, isLoading } = useWorkspaceMembersQuery({ limit: 100 }); const changeMemberRoleMutation = useChangeMemberRoleMutation(); const { isAdmin, isOwner } = useUserRole(); diff --git a/apps/client/src/pages/settings/workspace/workspace-members.tsx b/apps/client/src/pages/settings/workspace/workspace-members.tsx index 9596cad8..6a3cce2c 100644 --- a/apps/client/src/pages/settings/workspace/workspace-members.tsx +++ b/apps/client/src/pages/settings/workspace/workspace-members.tsx @@ -9,9 +9,7 @@ import useUserRole from "@/hooks/use-user-role.tsx"; import { useTranslation } from "react-i18next"; export default function WorkspaceMembers() { - const { t } = useTranslation("settings", { - keyPrefix: "workspace.member", - }); + const { t } = useTranslation("workspace"); const [segmentValue, setSegmentValue] = useState("members"); const [searchParams] = useSearchParams(); const { isAdmin } = useUserRole();