mirror of
https://github.com/docmost/docmost.git
synced 2025-11-17 00:51:15 +10:00
feat: update workspace translation
This commit is contained in:
1
apps/client/public/locales/en/group.json
Normal file
1
apps/client/public/locales/en/group.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@ -47,28 +47,7 @@
|
|||||||
"Updated successfully": "Updated successfully",
|
"Updated successfully": "Updated successfully",
|
||||||
"Failed to update data": "Failed to update data"
|
"Failed to update data": "Failed to update data"
|
||||||
},
|
},
|
||||||
"member": {
|
"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"
|
|
||||||
},
|
|
||||||
"group": {
|
"group": {
|
||||||
"Groups": "Groups",
|
"Groups": "Groups",
|
||||||
"Create group": "Create group",
|
"Create group": "Create group",
|
||||||
|
|||||||
@ -1 +1,22 @@
|
|||||||
{}
|
{
|
||||||
|
"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"
|
||||||
|
}
|
||||||
|
|||||||
1
apps/client/public/locales/zh/group.json
Normal file
1
apps/client/public/locales/zh/group.json
Normal file
@ -0,0 +1 @@
|
|||||||
|
{}
|
||||||
@ -47,28 +47,7 @@
|
|||||||
"Updated successfully": "更新成功",
|
"Updated successfully": "更新成功",
|
||||||
"Failed to update data": "数据更新失败"
|
"Failed to update data": "数据更新失败"
|
||||||
},
|
},
|
||||||
"member": {
|
"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": "发送邀请"
|
|
||||||
},
|
|
||||||
"group": {
|
"group": {
|
||||||
"Groups": "群组",
|
"Groups": "群组",
|
||||||
"Create group": "创建群组",
|
"Create group": "创建群组",
|
||||||
|
|||||||
@ -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": "发送邀请"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,7 +11,7 @@ interface Props {
|
|||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
}
|
}
|
||||||
export function WorkspaceInviteForm({ onClose }: Props) {
|
export function WorkspaceInviteForm({ onClose }: Props) {
|
||||||
const { t } = useTranslation(["settings", "translation"]);
|
const { t } = useTranslation(["workspace", "translation"]);
|
||||||
const [emails, setEmails] = useState<string[]>([]);
|
const [emails, setEmails] = useState<string[]>([]);
|
||||||
const [role, setRole] = useState<string | null>(UserRole.MEMBER);
|
const [role, setRole] = useState<string | null>(UserRole.MEMBER);
|
||||||
const [groupIds, setGroupIds] = useState<string[]>([]);
|
const [groupIds, setGroupIds] = useState<string[]>([]);
|
||||||
@ -47,10 +47,10 @@ export function WorkspaceInviteForm({ onClose }: Props) {
|
|||||||
<TagsInput
|
<TagsInput
|
||||||
mt="sm"
|
mt="sm"
|
||||||
description={t(
|
description={t(
|
||||||
"workspace.member.Enter valid email addresses separated by comma or space max_50",
|
"Enter valid email addresses separated by comma or space max_50",
|
||||||
)}
|
)}
|
||||||
label={t("workspace.member.Invite by email")}
|
label={t("Invite by email")}
|
||||||
placeholder={t("workspace.member.enter valid emails addresses")}
|
placeholder={t("enter valid emails addresses")}
|
||||||
variant="filled"
|
variant="filled"
|
||||||
splitChars={[",", " "]}
|
splitChars={[",", " "]}
|
||||||
maxDropdownHeight={200}
|
maxDropdownHeight={200}
|
||||||
@ -60,11 +60,9 @@ export function WorkspaceInviteForm({ onClose }: Props) {
|
|||||||
|
|
||||||
<Select
|
<Select
|
||||||
mt="sm"
|
mt="sm"
|
||||||
description={t(
|
description={t("Select role to assign to all invited members")}
|
||||||
"workspace.member.Select role to assign to all invited members",
|
label={t("Select role")}
|
||||||
)}
|
placeholder={t("Choose a role")}
|
||||||
label={t("workspace.member.Select role")}
|
|
||||||
placeholder={t("workspace.member.Choose a role")}
|
|
||||||
variant="filled"
|
variant="filled"
|
||||||
data={userRoleData
|
data={userRoleData
|
||||||
.filter((role) => role.value !== UserRole.OWNER)
|
.filter((role) => role.value !== UserRole.OWNER)
|
||||||
@ -82,9 +80,9 @@ export function WorkspaceInviteForm({ onClose }: Props) {
|
|||||||
<MultiGroupSelect
|
<MultiGroupSelect
|
||||||
mt="sm"
|
mt="sm"
|
||||||
description={t(
|
description={t(
|
||||||
"workspace.member.Invited members will be granted access to spaces the groups can access",
|
"Invited members will be granted access to spaces the groups can access",
|
||||||
)}
|
)}
|
||||||
label={t("workspace.member.Add to groups")}
|
label={t("Add to groups")}
|
||||||
onChange={handleGroupSelect}
|
onChange={handleGroupSelect}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@ -93,7 +91,7 @@ export function WorkspaceInviteForm({ onClose }: Props) {
|
|||||||
onClick={handleSubmit}
|
onClick={handleSubmit}
|
||||||
loading={createInvitationMutation.isPending}
|
loading={createInvitationMutation.isPending}
|
||||||
>
|
>
|
||||||
{t("workspace.member.Send invitation")}
|
{t("Send invitation")}
|
||||||
</Button>
|
</Button>
|
||||||
</Group>
|
</Group>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@ -4,9 +4,7 @@ import { useDisclosure } from "@mantine/hooks";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function WorkspaceInviteModal() {
|
export default function WorkspaceInviteModal() {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("workspace");
|
||||||
keyPrefix: "workspace.member",
|
|
||||||
});
|
|
||||||
const [opened, { open, close }] = useDisclosure(false);
|
const [opened, { open, close }] = useDisclosure(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -9,9 +9,7 @@ import useUserRole from "@/hooks/use-user-role.tsx";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function WorkspaceInvitesTable() {
|
export default function WorkspaceInvitesTable() {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("workspace");
|
||||||
keyPrefix: "workspace.member",
|
|
||||||
});
|
|
||||||
const { data, isLoading } = useWorkspaceInvitationsQuery({
|
const { data, isLoading } = useWorkspaceInvitationsQuery({
|
||||||
limit: 100,
|
limit: 100,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -15,9 +15,7 @@ import { UserRole } from "@/lib/types.ts";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function WorkspaceMembersTable() {
|
export default function WorkspaceMembersTable() {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("workspace");
|
||||||
keyPrefix: "workspace.member",
|
|
||||||
});
|
|
||||||
const { data, isLoading } = useWorkspaceMembersQuery({ limit: 100 });
|
const { data, isLoading } = useWorkspaceMembersQuery({ limit: 100 });
|
||||||
const changeMemberRoleMutation = useChangeMemberRoleMutation();
|
const changeMemberRoleMutation = useChangeMemberRoleMutation();
|
||||||
const { isAdmin, isOwner } = useUserRole();
|
const { isAdmin, isOwner } = useUserRole();
|
||||||
|
|||||||
@ -9,9 +9,7 @@ import useUserRole from "@/hooks/use-user-role.tsx";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
export default function WorkspaceMembers() {
|
export default function WorkspaceMembers() {
|
||||||
const { t } = useTranslation("settings", {
|
const { t } = useTranslation("workspace");
|
||||||
keyPrefix: "workspace.member",
|
|
||||||
});
|
|
||||||
const [segmentValue, setSegmentValue] = useState("members");
|
const [segmentValue, setSegmentValue] = useState("members");
|
||||||
const [searchParams] = useSearchParams();
|
const [searchParams] = useSearchParams();
|
||||||
const { isAdmin } = useUserRole();
|
const { isAdmin } = useUserRole();
|
||||||
|
|||||||
Reference in New Issue
Block a user