Support I18n (#243)

* feat: support i18n

* feat: wip support i18n

* feat: complete space translation

* feat: complete page translation

* feat: update space translation

* feat: update workspace translation

* feat: update group translation

* feat: update workspace translation

* feat: update page translation

* feat: update user translation

* chore: update pnpm-lock

* feat: add query translation

* refactor: merge to single file

* chore: remove necessary code

* feat: save language to BE

* fix: only load current language

* feat: save language to locale column

* fix: cleanups

* add language menu to preferences page

* new translations

* translate editor

* Translate editor placeholders

* translate space selection component

---------

Co-authored-by: Philip Okugbe <phil@docmost.com>
Co-authored-by: Philip Okugbe <16838612+Philipinho@users.noreply.github.com>
This commit is contained in:
lleohao
2025-01-04 21:17:17 +08:00
committed by GitHub
parent 290b7d9d94
commit 670ee64179
119 changed files with 1672 additions and 649 deletions

View File

@ -0,0 +1,335 @@
{
"Account": "Account",
"Active": "Active",
"Add": "Add ",
"Add group members": "Add group members",
"Add groups": "Add groups",
"Add members": "Add members",
"Add to groups": "Add to groups",
"Add space members": "Add space members",
"Admin": "Admin",
"Are you sure you want to delete this group? Members will lose access to resources this group has access to.": "Are you sure you want to delete this group? Members will lose access to resources this group has access to.",
"Are you sure you want to delete this page?": "Are you sure you want to delete this page?",
"Are you sure you want to remove this user from the group? The user will lose access to resources this group has access to.": "Are you sure you want to remove this user from the group? The user will lose access to resources this group has access to.",
"Are you sure you want to remove this user from the space? The user will lose all access to this space.": "Are you sure you want to remove this user from the space? The user will lose all access to this space.",
"Are you sure you want to restore this version? Any changes not versioned will be lost.": "Are you sure you want to restore this version? Any changes not versioned will be lost.",
"Can become members of groups and spaces in workspace": "Can become members of groups and spaces in workspace",
"Can create and edit pages in space.": "Can create and edit pages in space.",
"Can edit": "Can edit",
"Can manage workspace": "Can manage workspace",
"Can manage workspace but cannot delete it": "Can manage workspace but cannot delete it",
"Can view": "Can view",
"Can view pages in space but not edit.": "Can view pages in space but not edit.",
"Cancel": "Cancel",
"Change email": "Change email",
"Change password": "Change password",
"Change photo": "Change photo",
"Choose a role": "Choose a role",
"Choose your preferred color scheme.": "Choose your preferred color scheme.",
"Choose your preferred interface language.": "Choose your preferred interface language.",
"Choose your preferred page width.": "Choose your preferred page width.",
"Confirm": "Confirm",
"Copy link": "Copy link",
"Create": "Create",
"Create group": "Create group",
"Create page": "Create page",
"Create space": "Create space",
"Create workspace": "Create workspace",
"Current password": "Current password",
"Dark": "Dark",
"Date": "Date",
"Delete": "Delete",
"Delete group": "Delete group",
"Are you sure you want to delete this page? This will delete its children and page history. This action is irreversible.": "Are you sure you want to delete this page? This will delete its children and page history. This action is irreversible.",
"Description": "Description",
"Details": "Details",
"e.g ACME": "e.g ACME",
"e.g ACME Inc": "e.g ACME Inc",
"e.g Developers": "e.g Developers",
"e.g Group for developers": "e.g Group for developers",
"e.g product": "e.g product",
"e.g Product Team": "e.g Product Team",
"e.g Sales": "e.g Sales",
"e.g Space for product team": "e.g Space for product team",
"e.g Space for sales team to collaborate": "e.g Space for sales team to collaborate",
"Edit": "Edit",
"Edit group": "Edit group",
"Email": "Email",
"Enter a strong password": "Enter a strong password",
"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",
"Enter your current password": "Enter your current password",
"enter your full name": "enter your full name",
"Enter your new password": "Enter your new password",
"Enter your new preferred email": "Enter your new preferred email",
"Enter your password": "Enter your password",
"Error fetching page data.": "Error fetching page data.",
"Error loading page history.": "Error loading page history.",
"Export": "Export",
"Failed to create page": "Failed to create page",
"Failed to delete page": "Failed to delete page",
"Failed to fetch recent pages": "Failed to fetch recent pages",
"Failed to import pages": "Failed to import pages",
"Failed to load page. An error occurred.": "Failed to load page. An error occurred.",
"Failed to update data": "Failed to update data",
"Full access": "Full access",
"Full page width": "Full page width",
"Full width": "Full width",
"General": "General",
"Group": "Group",
"Group description": "Group description",
"Group name": "Group name",
"Groups": "Groups",
"Has full access to space settings and pages.": "Has full access to space settings and pages.",
"Home": "Home",
"Import pages": "Import pages",
"Import pages & space settings": "Import pages & space settings",
"Importing pages": "Importing pages",
"invalid invitation link": "invalid invitation link",
"Invitation signup": "Invitation signup",
"Invite by email": "Invite by email",
"Invite members": "Invite members",
"Invite new members": "Invite new members",
"Invited members who are yet to accept their invitation will appear here.": "Invited members who are yet to accept their invitation will appear here.",
"Invited members will be granted access to spaces the groups can access": "Invited members will be granted access to spaces the groups can access",
"Join the workspace": "Join the workspace",
"Language": "Language",
"Light": "Light",
"Link copied": "Link copied",
"Login": "Login",
"Logout": "Logout",
"Manage Group": "Manage Group",
"Manage members": "Manage members",
"member": "member",
"Member": "Member",
"members": "members",
"Members": "Members",
"My preferences": "My preferences",
"My Profile": "My Profile",
"My profile": "My profile",
"Name": "Name",
"New email": "New email",
"New page": "New page",
"New password": "New password",
"No group found": "No group found",
"No page history saved yet.": "No page history saved yet.",
"No pages yet": "No pages yet",
"No results found...": "No results found...",
"No user found": "No user found",
"Overview": "Overview",
"Owner": "Owner",
"page": "page",
"Page deleted successfully": "Page deleted successfully",
"Page history": "Page history",
"Page import is in progress. Please do not close this tab.": "Page import is in progress. Please do not close this tab.",
"Pages": "Pages",
"pages": "pages",
"Password": "Password",
"Password changed successfully": "Password changed successfully",
"Pending": "Pending",
"Please confirm your action": "Please confirm your action",
"Preferences": "Preferences",
"Print PDF": "Print PDF",
"Profile": "Profile",
"Recently updated": "Recently updated",
"Remove": "Remove",
"Remove group member": "Remove group member",
"Remove space member": "Remove space member",
"Restore": "Restore",
"Role": "Role",
"Save": "Save",
"Search": "Search",
"Search for groups": "Search for groups",
"Search for users": "Search for users",
"Search for users and groups": "Search for users and groups",
"Search...": "Search...",
"Select language": "Select language",
"Select role": "Select role",
"Select role to assign to all invited members": "Select role to assign to all invited members",
"Select theme": "Select theme",
"Send invitation": "Send invitation",
"Settings": "Settings",
"Setup workspace": "Setup workspace",
"Sign In": "Sign In",
"Sign Up": "Sign Up",
"Slug": "Slug",
"Space": "Space",
"Space description": "Space description",
"Space menu": "Space menu",
"Space name": "Space name",
"Space settings": "Space settings",
"Space slug": "Space slug",
"Spaces": "Spaces",
"Spaces you belong to": "Spaces you belong to",
"No space found": "No space found",
"Search for spaces": "Search for spaces",
"Start typing to search...": "Start typing to search...",
"Status": "Status",
"Successfully imported": "Successfully imported",
"Successfully restored": "Successfully restored",
"System settings": "System settings",
"Theme": "Theme",
"To change your email, you have to enter your password and new email.": "To change your email, you have to enter your password and new email.",
"Toggle full page width": "Toggle full page width",
"Unable to import pages. Please try again.": "Unable to import pages. Please try again.",
"untitled": "untitled",
"Untitled": "Untitled",
"Updated successfully": "Updated successfully",
"User": "User",
"Workspace": "Workspace",
"Workspace Name": "Workspace Name",
"Workspace settings": "Workspace settings",
"You can change your password here.": "You can change your password here.",
"Your Email": "Your Email",
"Your import is complete.": "Your import is complete.",
"Your name": "Your name",
"Your Name": "Your Name",
"Your password": "Your password",
"Your password must be a minimum of 8 characters.": "Your password must be a minimum of 8 characters.",
"Sidebar toggle": "Sidebar toggle",
"Comments": "Comments",
"404 page not found": "404 page not found",
"Sorry, we can't find the page you are looking for.": "Sorry, we can't find the page you are looking for.",
"Take me back to homepage": "Take me back to homepage",
"Forgot password": "Forgot password",
"Forgot your password?": "Forgot your password?",
"A password reset link has been sent to your email. Please check your inbox.": "A password reset link has been sent to your email. Please check your inbox.",
"Send reset link": "Send reset link",
"Password reset": "Password reset",
"Your new password": "Your new password",
"Set password": "Set password",
"Write a comment": "Write a comment",
"Reply...": "Reply...",
"Error loading comments.": "Error loading comments.",
"No comments yet.": "No comments yet.",
"Edit comment": "Edit comment",
"Delete comment": "Delete comment",
"Are you sure you want to delete this comment?": "Are you sure you want to delete this comment?",
"Comment created successfully": "Comment created successfully",
"Error creating comment": "Error creating comment",
"Comment updated successfully": "Comment updated successfully",
"Failed to update comment": "Failed to update comment",
"Comment deleted successfully": "Comment deleted successfully",
"Failed to delete comment": "Failed to delete comment",
"Comment resolved successfully": "Comment resolved successfully",
"Failed to resolve comment": "Failed to resolve comment",
"Revoke invitation": "Revoke invitation",
"Revoke": "Revoke",
"Don't": "Don't",
"Are you sure you want to revoke this invitation? The user will not be able to join the workspace.": "Are you sure you want to revoke this invitation? The user will not be able to join the workspace.",
"Resend invitation": "Resend invitation",
"Anyone with this link can join this workspace.": "Anyone with this link can join this workspace.",
"Invite link": "Invite link",
"Copy": "Copy",
"Copied": "Copied",
"Select a user": "Select a user",
"Select a group": "Select a group",
"Export all pages and attachments in this space.": "Export all pages and attachments in this space.",
"Delete space": "Delete space",
"Delete this space with all its pages and data.": "Delete this space with all its pages and data.",
"Format": "Format",
"Include subpages": "Include subpages",
"Include attachments": "Include attachments",
"Select export format": "Select export format",
"Export failed:": "Export failed:",
"export error": "export error",
"Export page": "Export page",
"Export space": "Export space",
"Export {{type}}": "Export {{type}}",
"File exceeds the {{limit}} attachment limit": "File exceeds the {{limit}} attachment limit",
"Align left": "Align left",
"Align right": "Align right",
"Align center": "Align center",
"Merge cells": "Merge cells",
"Split cell": "Split cell",
"Delete column": "Delete column",
"Delete row": "Delete row",
"Add left column": "Add left column",
"Add right column": "Add right column",
"Add row above": "Add row above",
"Add row below": "Add row below",
"Delete table": "Delete table",
"Info": "Info",
"Success": "Success",
"Warning": "Warning",
"Danger": "Danger",
"Mermaid diagram error:": "Mermaid diagram error:",
"Invalid Mermaid diagram": "Invalid Mermaid diagram",
"Double-click to edit Draw.io diagram": "Double-click to edit Draw.io diagram",
"Exit": "Exit",
"Save & Exit": "Save & Exit",
"Double-click to edit Excalidraw diagram": "Double-click to edit Excalidraw diagram",
"Paste link": "Paste link",
"Edit link": "Edit link",
"Remove link": "Remove link",
"Add link": "Add link",
"Please enter a valid url": "Please enter a valid url",
"Empty equation": "Empty equation",
"Invalid equation": "Invalid equation",
"Color": "Color",
"Text color": "Text color",
"Default": "Default",
"Blue": "Blue",
"Green": "Green",
"Purple": "Purple",
"Red": "Red",
"Yellow": "Yellow",
"Orange": "Orange",
"Pink": "Pink",
"Gray": "Gray",
"Embed link": "Embed link",
"Invalid {{provider}} embed link": "",
"Embed {{provider}}": "Embed {{provider}}",
"Enter {{provider}} link to embed": "Enter {{provider}} link to embed",
"Bold": "Bold",
"Italic": "Italic",
"Underline": "Underline",
"Strike": "Strike",
"Code": "Code",
"Comment": "Comment",
"Text": "Text",
"Heading 1": "Heading 1",
"Heading 2": "Heading 2",
"Heading 3": "Heading 3",
"To-do List": "To-do List",
"Bullet List": "Bullet List",
"Numbered List": "Numbered List",
"Blockquote": "Blockquote",
"Just start typing with plain text.": "Just start typing with plain text.",
"Track tasks with a to-do list.": "Track tasks with a to-do list.",
"Big section heading.": "Big section heading.",
"Medium section heading.": "Medium section heading.",
"Small section heading.": "Small section heading.",
"Create a simple bullet list.": "Create a simple bullet list.",
"Create a list with numbering.": "Create a list with numbering.",
"Create block quote.": "Create block quote.",
"Insert code snippet.": "Insert code snippet.",
"Insert horizontal rule divider": "Insert horizontal rule divider",
"Upload any image from your device.": "Upload any image from your device.",
"Upload any video from your device.": "Upload any video from your device.",
"Upload any file from your device.": "Upload any file from your device.",
"Table": "Table",
"Insert a table.": "Insert a table.",
"Insert collapsible block.": "Insert collapsible block.",
"Video": "Video",
"Divider": "Divider",
"Quote": "Quote",
"Image": "Image",
"File attachment": "File attachment",
"Toggle block": "Toggle block",
"Callout": "Callout",
"Insert callout notice.": "Insert callout notice.",
"Math inline": "Math inline",
"Insert inline math equation.": "Insert inline math equation.",
"Math block": "Math block",
"Insert math equation": "Insert math equation",
"Mermaid diagram": "Mermaid diagram",
"Insert mermaid diagram": "Insert mermaid diagram",
"Insert and design Drawio diagrams": "Insert and design Drawio diagrams",
"Insert current date": "Insert current date",
"Draw and sketch excalidraw diagrams": "Draw and sketch excalidraw diagrams",
"Multiple": "Multiple",
"Heading {{level}}": "Heading {{level}}",
"Toggle title": "Toggle title",
"Write anything. Enter \"/\" for commands": "Write anything. Enter \"/\" for commands"
}

View File

@ -0,0 +1,187 @@
{
"Account": "账户",
"Active": "活跃",
"add": "添加",
"Add group members": "添加群组成员",
"Add groups": "添加群组",
"Add members": "添加成员",
"Add to groups": "添加到群组",
"add space members": "添加空间成员",
"Admin": "管理员",
"Are you sure you want to delete this group? Members will lose access to resources this group has access to.": "您确定要删除这个群组吗?成员将失去对该群组可访问资源的访问权限。",
"Are you sure you want to delete this page?": "您确定要删除这个页面吗?",
"Are you sure you want to remove this user from the group? The user will lose access to resources this group has access to.": "您确定要从群组中移除这个用户吗?该用户将失去对该群组可访问资源的访问权限。",
"Are you sure you want to remove this user from the space? The user will lose all access to this space.": "您确定要从空间中移除这个用户吗?该用户将失去对这个空间的所有访问权限。",
"Are you sure you want to restore this version? Any changes not versioned will be lost.": "您确定要恢复此版本吗?任何未版本化的更改将会丢失。",
"Can become members of groups and spaces in workspace": "可以成为工作区中群组和空间的成员",
"Can create and edit pages in space": "可以在空间中创建和编辑页面",
"Can edit": "可以编辑",
"Can manage workspace": "可以管理工作区",
"Can manage workspace but cannot delete it": "可以管理工作区但不能删除它",
"Can view": "可以查看",
"Can view pages in space but not edit": "可以查看空间中的页面但不能编辑",
"Cancel": "取消",
"Change email": "更改电子邮箱",
"Change password": "更改密码",
"Change photo": "更改照片",
"Choose a role": "选择一个角色",
"Choose your preferred color scheme.": "选择您喜欢的配色方案。",
"Choose your preferred interface language.": "选择您喜欢的界面语言。",
"Choose your preferred page width.": "选择您喜欢的页面宽度。",
"Confirm": "确认",
"Copy link": "复制链接",
"Create": "创建",
"Create group": "创建群组",
"Create page": "创建页面",
"Create space": "创建空间",
"Create workspace": "创建工作空间",
"Current password": "当前密码",
"Dark": "深色",
"Date": "日期",
"Delete": "删除",
"Delete group": "删除群组",
"Are you sure you want to delete this page? This will delete its children and page history. This action is irreversible.": "您确定要删除这个页面吗?这将删除其子页面和页面历史记录。此操作不可逆。",
"Description": "描述",
"Details": "详情",
"e.g ACME": "例如ACME",
"e.g ACME Inc": "例如ACME Inc",
"e.g Developers": "例如:开发人员",
"e.g Group for developers": "例如:开发人员群组",
"e.g product": "例如product",
"e.g Product Team": "例如:产品团队",
"e.g Sales": "例如:销售",
"e.g Space for product team": "例如:产品团队的空间",
"e.g Space for sales team to collaborate": "例如:销售团队协作的空间",
"Edit": "编辑",
"Edit group": "编辑群组",
"Email": "电子邮箱",
"Enter a strong password": "输入一个强密码",
"Enter valid email addresses separated by comma or space max_50": "输入有效的电子邮箱地址,用逗号或空格分隔 [最多50个]",
"enter valid emails addresses": "输入有效的电子邮箱地址",
"Enter your current password": "输入您的当前密码",
"enter your full name": "输入您的全名",
"Enter your new password": "输入您的新密码",
"Enter your new preferred email": "输入您新的首选电子邮箱",
"Enter your password": "输入您的密码",
"Error fetching page data.": "获取页面数据时出错。",
"Error loading page history.": "加载页面历史时出错。",
"Export": "导出",
"Failed to create page": "创建页面失败",
"Failed to delete page": "删除页面失败",
"Failed to fetch recent pages": "获取最近页面失败",
"Failed to import pages": "导入页面失败",
"Failed to load page. An error occurred.": "页面加载失败。发生了一个错误。",
"Failed to update data": "数据更新失败",
"Full access": "完全访问",
"Full page width": "全页宽度",
"Full width": "全宽",
"General": "常规",
"Group": "群组",
"Group description": "群组描述",
"Group name": "群组名称",
"Groups": "群组",
"Has full access to space settings and pages": "具有对空间设置和页面的完全访问权限",
"Home": "首页",
"Import pages": "导入页面",
"Import pages & space settings": "导入页面和空间设置",
"Importing pages": "正在导入页面",
"invalid invitation link": "无效的邀请链接",
"Invitation signup": "邀请注册",
"Invite by email": "通过电子邮箱邀请",
"Invite members": "邀请成员",
"Invite new members": "邀请新成员",
"Invited members who are yet to accept their invitation will appear here.": "尚未接受邀请的成员将显示在这里。",
"Invited members will be granted access to spaces the groups can access": "被邀请的成员将被授予访问群组可以访问的空间的权限",
"Join the workspace": "加入工作空间",
"Language": "语言",
"Light": "浅色",
"Link copied": "链接已复制",
"Login": "登录",
"Logout": "退出登录",
"Manage Group": "管理群组",
"Manage members": "管理成员",
"member": "成员",
"Member": "成员",
"Members": "成员",
"members": "成员",
"My preferences": "我的偏好设置",
"My Profile": "我的个人资料",
"My profile": "我的个人资料",
"Name": "名称",
"New email": "新电子邮箱",
"New page": "新建页面",
"New password": "新密码",
"No group found": "未找到群组",
"No page history saved yet.": "尚未保存页面历史。",
"No pages yet": "暂无页面",
"No results found...": "未找到结果...",
"No user found": "未找到用户",
"Overview": "概览",
"Owner": "所有者",
"page": "个页面",
"Page deleted successfully": "页面已成功删除",
"Page history": "页面历史",
"Page import is in progress. Please do not close this tab.": "页面导入正在进行中。请不要关闭此标签页。",
"Pages": "页面",
"pages": "个页面",
"Password": "密码",
"Password changed successfully": "密码更改成功",
"Pending": "待定",
"Please confirm your action": "请确认您的操作",
"Preferences": "偏好设置",
"Print PDF": "打印 PDF",
"Profile": "个人资料",
"Recently updated": "最近更新",
"Remove": "移除",
"Remove group member": "移除群组成员",
"Remove space member": "移除空间成员",
"Restore": "恢复",
"Role": "角色",
"Save": "保存",
"Search": "搜索",
"Search for groups": "搜索群组",
"Search for users": "搜索用户",
"Search for users and groups": "搜索用户和群组",
"Search...": "搜索...",
"Select language": "选择语言",
"Select role": "选择角色",
"Select role to assign to all invited members": "选择要分配给所有被邀请成员的角色",
"Select theme": "选择主题",
"Send invitation": "发送邀请",
"Settings": "设置",
"Setup workspace": "设置工作空间",
"Sign In": "登录",
"Sign Up": "注册",
"Slug": "短链接",
"Space": "空间",
"Space description": "空间描述",
"Space menu": "空间菜单",
"Space name": "空间名称",
"Space settings": "空间设置",
"Space slug": "空间短链接",
"Spaces": "空间",
"Spaces you belong to": "您所属的空间",
"Start typing to search...": "开始输入以搜索...",
"Status": "状态",
"Successfully imported": "成功导入",
"Successfully restored": "恢复成功",
"System settings": "系统设置",
"Theme": "主题",
"To change your email, you have to enter your password and new email.": "要更改您的电子邮箱,您需要输入密码和新的电子邮箱地址。",
"Toggle full page width": "切换全页宽度",
"Unable to import pages. Please try again.": "无法导入页面。请重试。",
"untitled": "无标题",
"Untitled": "无标题",
"Updated successfully": "更新成功",
"User": "用户",
"Workspace": "工作区",
"Workspace Name": "工作空间名称",
"Workspace settings": "工作区设置",
"You can change your password here.": "您可以在这里更改密码。",
"Your Email": "您的电子邮箱",
"Your import is complete.": "导入已完成。",
"Your name": "您的姓名",
"Your Name": "您的姓名",
"Your password": "您的密码",
"Your password must be a minimum of 8 characters.": "您的密码必须至少包含8个字符。"
}