update workspace

This commit is contained in:
duanfuxiang
2025-06-27 22:08:36 +08:00
parent 0df4e4edd3
commit 772270863c
86 changed files with 6988 additions and 1156 deletions

View File

@@ -54,16 +54,18 @@ const localeMap: { [k: string]: Partial<typeof en> } = {
hu,
};
const locale = localeMap[moment.locale()];
export function t(str: string, params?: Record<string, any>): any {
// 动态获取当前语言
const currentLocale = moment.locale();
const locale = localeMap[currentLocale];
if (!locale) {
console.error({
plugin: "infio-copilot",
fn: t,
where: "src/lang/helpers.ts",
message: "Error: locale not found",
data: moment.locale(),
data: currentLocale,
});
}

View File

@@ -485,5 +485,63 @@ export default {
parameters: "Parameters",
toolNoDescription: "No description",
useMcpToolFrom: "Use MCP tool from",
},
workspace: {
title: "Workspace Management",
shortTitle: "Workspace",
description: "Manage and switch between different workspaces (note vaults)",
createNew: "Create New Workspace",
recentWorkspaces: "Recent Workspaces",
loading: "Loading workspace list...",
noWorkspaces: "No workspaces available",
empty: "Empty workspace",
editTooltip: "Edit workspace",
deleteTooltip: "Delete workspace",
refreshTooltip: "Refresh workspace list",
newWorkspace: "New Workspace",
notices: {
alreadyInWorkspace: "Already in this workspace",
switchedTo: "Switched to workspace: {name}",
workspaceContent: "Workspace content: {content}",
cannotDeleteCurrent: "Cannot delete current workspace",
cannotDeleteDefault: "Cannot delete default workspace",
deleted: "Deleted workspace: {name}",
deleteFailed: "Failed to delete workspace",
created: "Created workspace: {name}",
createFailed: "Failed to create workspace",
updated: "Updated workspace: {name}",
updateFailed: "Failed to update workspace",
refreshFailed: "Failed to refresh workspace list",
switchFailed: "Failed to switch workspace"
},
deleteConfirm: 'Are you sure you want to delete workspace "{name}"? This action cannot be undone.',
current: "Current",
conversations: "conversations",
created: "Created",
updated: "Updated",
folders: "folders",
tags: "tags",
noContent: "No content",
editModal: {
editTitle: "Edit Workspace",
createTitle: "Create Workspace",
nameLabel: "Workspace Name",
namePlaceholder: "Enter workspace name",
newNamePlaceholder: "Enter new workspace name",
contentLabel: "Workspace Content",
noContent: "No content, please add folders or tags",
addPlaceholder: "Add folder or tag...",
folder: "Folder",
tag: "Tag",
tip: "Tip: Enter keywords to search existing folders and tags, entries starting with # will be recognized as tags",
cancel: "Cancel",
save: "Save",
create: "Create",
saving: "Saving...",
creating: "Creating...",
nameRequired: "Workspace name cannot be empty",
saveFailed: "Save failed, please try again",
defaultName: "Workspace {date}"
}
}
}

View File

@@ -487,5 +487,63 @@ export default {
toolNoDescription: "无描述",
useMcpToolFrom: "使用来自以下的 MCP 工具:",
}
},
workspace: {
title: "工作区管理",
shortTitle: "工作区",
description: "管理和切换不同的工作区(笔记库)",
createNew: "创建新工作区",
recentWorkspaces: "最近的工作区",
loading: "正在加载工作区列表...",
noWorkspaces: "暂无工作区",
empty: "空工作区",
editTooltip: "编辑工作区",
deleteTooltip: "删除工作区",
refreshTooltip: "刷新工作区列表",
newWorkspace: "新建工作区",
notices: {
alreadyInWorkspace: "当前已在此工作区中",
switchedTo: "切换到工作区: {name}",
workspaceContent: "工作区内容: {content}",
cannotDeleteCurrent: "无法删除当前工作区",
cannotDeleteDefault: "无法删除默认工作区",
deleted: "已删除工作区: {name}",
deleteFailed: "删除工作区失败",
created: "已创建工作区: {name}",
createFailed: "创建工作区失败",
updated: "已更新工作区: {name}",
updateFailed: "更新工作区失败",
refreshFailed: "刷新工作区列表失败",
switchFailed: "切换工作区失败"
},
deleteConfirm: '确定要删除工作区 "{name}" 吗?此操作不可撤销。',
current: "当前",
conversations: "个对话",
created: "创建",
updated: "更新",
folders: "个文件夹",
tags: "个标签",
noContent: "无内容",
editModal: {
editTitle: "编辑工作区",
createTitle: "创建工作区",
nameLabel: "工作区名称",
namePlaceholder: "请输入工作区名称",
newNamePlaceholder: "请输入新工作区名称",
contentLabel: "工作区内容",
noContent: "暂无内容,请添加文件夹或标签",
addPlaceholder: "添加文件夹或标签...",
folder: "文件夹",
tag: "标签",
tip: "提示:输入关键词搜索现有文件夹和标签,以 # 开头的会被识别为标签",
cancel: "取消",
save: "保存",
create: "创建",
saving: "保存中...",
creating: "创建中...",
nameRequired: "工作区名称不能为空",
saveFailed: "保存失败,请重试",
defaultName: "工作区 {date}"
}
}
};