diff --git a/assets/translations/en_US.ts b/assets/translations/en_US.ts index d54f985fa..fb30a6c6c 100644 --- a/assets/translations/en_US.ts +++ b/assets/translations/en_US.ts @@ -17,6 +17,82 @@ + + AddModelDialog + + + Model Name + + + + + + Required, please enter. + + + + + Model Type + + + + + OpenAi(Compatible) + + + + + Api Path + + + + + Api Key + + + + + Optional, please enter. + + + + + Add Model + + + + + + Confirm + + + + + Cancel + + + + + To test if the model is available, the system will send a small amount of information, which will consume a small amount of tokens. + + + + + Checking... please wait. + + + + + + This field cannot be empty. + + + + + Error Information + + + AdvancedSearchWidget @@ -1013,7 +1089,7 @@ storage: %2 CmakeAsynParse - + build @@ -1026,52 +1102,52 @@ storage: %2 - + Clear CMake - + Files in project %1 have changed, needs to run cmake to update - + Properties - + File are not automatically added to the CmakeList.txt file to the Cmake project. Copy the path to the source files to the clipboard? - + Copy to Clipboard? - + Ok - + Project Properties - + Build - + Run - + Kit @@ -1183,7 +1259,7 @@ storage: %2 CodeGeeX::AskApi - + Install @@ -1201,43 +1277,43 @@ storage: %2 - + This project has not yet established a file index, @codebase wont`t work directly. Confirm whether to create one now. - + Confirm - + It may take servel minutes - + Indexing Done - + Indexing Failed - + The error occurred when performing rag on project %1. - + The file indexing feature is not available, which may cause functions such as @codebase to not work properly.Please install the required environment. the installation process may take several minutes. - + The indexing of project %1 has not been completed, which may cause the results to be inaccurate. @@ -1268,22 +1344,22 @@ storage: %2 CodeGeex - + Login - + Please login to use CodeGeeX. - + Install - + Install a Python Conda virtual environment for using the file indexing feature. Without it, there may be abnormalities in the @codebase and some AI functionalities. @@ -2148,6 +2224,16 @@ Delete anyway? Can not find kit. + + + Add + + + + + Remove + + DetailsButton @@ -2160,42 +2246,42 @@ Delete anyway? DetailsView - + Description - + Dependency - + reLaunch when changed! - + Settings - + Relaunch required! - + This platform not support doc display! - + unload - + load @@ -3007,12 +3093,12 @@ need to manually copy the source code to this path InterpreterModel - + Package - + Version @@ -3020,56 +3106,61 @@ need to manually copy the source code to this path InterpreterWidget - + Python Interpreter: - + Browse - - + + Remove - + + PIP Source: + + + + Select Local Interpreter - + Selected Interpreter already exists - - + + Warning - + Confirm the removal of this interpreter? - + Default Interpreter can`t be removed - - - + + + Yes - + Cancel @@ -3630,12 +3721,12 @@ repos path: %0 NotificationCenterWidget - + Notification - + No new notifications @@ -3648,6 +3739,14 @@ repos path: %0 + + NotificationModel + + + Source: %1 + + + OptionsDialog @@ -3692,7 +3791,7 @@ repos path: %0 PIPInstaller - + Install packages by pip @@ -3793,27 +3892,27 @@ repos path: %0 - + Current project - + Config - + Project Type: - + Cancel - + Confirm @@ -3839,93 +3938,93 @@ repos path: %0 ProjectTree - - - + + + New Document - - + + New Directory - + Show Containing Folder - - + + Rename - + Open In Terminal - + Delete Document - - + + New Document Name - - - - - - - + + + + + + + Ok - + New Dirctory Name - + New Dirctory - + Delete operation not be recoverable, delete anyway? - + Delete: - + A directory with name %1 already exists. please reanme it - - - + + + A file with name %1 already exists. Would you like to overwrite it? - - - - + + + + Cancel @@ -4027,17 +4126,17 @@ repos path: %0 - + Project Active - + Project Close - + Project Info @@ -4275,7 +4374,7 @@ not exists support files: %0 QFileDialog - + Open Project Directory @@ -4646,7 +4745,7 @@ not exists support files: %0 - + AI @@ -4690,6 +4789,11 @@ not exists support files: %0 Automatically obtain the entry file + + + ZhiPu + + QPushButton @@ -4713,7 +4817,7 @@ not exists support files: %0 QTabWidget - + Projects @@ -4783,69 +4887,69 @@ not exists support files: %0 RecentDisplayWidget - + Projects And Documents - + Clear All - + Confirm to clear the record of the opened projects and documents? - + Cancel button - + Delete button - + Session - + session manager - + Open Document - + Open File - + Open Project - + New File or Project - + No Project - + Recent Open @@ -5985,27 +6089,27 @@ not exists support files: %0 - + New Session - + Open Session - + Rename Session - + Clone Session - + Remove Session @@ -6027,19 +6131,6 @@ not exists support files: %0 Remove - - - %1 (last session) - - - - - %1 (current session) - - - - - SessionItemWidgetPrivate Are you sure to remove this session? @@ -6097,6 +6188,16 @@ not exists support files: %0 Please input session name + + + %1 (last session) + + + + + %1 (current session) + + SessionListView @@ -6186,12 +6287,12 @@ not exists support files: %0 SessionNameInputDialog - + Please input session name - + Cancel button diff --git a/assets/translations/zh_CN.ts b/assets/translations/zh_CN.ts index 265404237..693d32918 100644 --- a/assets/translations/zh_CN.ts +++ b/assets/translations/zh_CN.ts @@ -17,6 +17,82 @@ 显示可用的操作 + + AddModelDialog + + + Model Name + + + + + + Required, please enter. + + + + + Model Type + + + + + OpenAi(Compatible) + + + + + Api Path + + + + + Api Key + + + + + Optional, please enter. + + + + + Add Model + + + + + + Confirm + 确定 + + + + Cancel + 取消 + + + + To test if the model is available, the system will send a small amount of information, which will consume a small amount of tokens. + + + + + Checking... please wait. + + + + + + This field cannot be empty. + + + + + Error Information + + + AdvancedSearchWidget @@ -1033,7 +1109,7 @@ storage: %2 CmakeAsynParse - + build 编译 @@ -1046,52 +1122,52 @@ storage: %2 执行CMake - + Clear CMake 清除CMake - + Files in project %1 have changed, needs to run cmake to update 项目%1中的文件已经更改,需要运行 cmake 来更新 - + Properties 工程属性 - + File are not automatically added to the CmakeList.txt file to the Cmake project. Copy the path to the source files to the clipboard? 文件不会自动添加到 Cmake 项目的 CmakeList.txt 文件中。将源文件的路径复制到剪贴板? - + Copy to Clipboard? 复制到剪贴板? - + Ok 确定 - + Project Properties 工程属性 - + Build 编译 - + Run 运行 - + Kit 套件 @@ -1203,7 +1279,7 @@ storage: %2 CodeGeeX::AskApi - + Install 安装 @@ -1221,44 +1297,44 @@ storage: %2 请求超时,请检查网络或者大模型是否可用。 - + This project has not yet established a file index, @codebase wont`t work directly. Confirm whether to create one now. 该工程还没有建立文件索引,@codebase无法正常使用.确认是否现在创建索引 - + Confirm 确定 - + It may take servel minutes 该过程也许会耗费若干分钟 - + Indexing Done 创建索引完成 - + Indexing Failed 建立索引失败 - + The error occurred when performing rag on project %1. 在为工程%1建立文件索引时出现错误 - + The file indexing feature is not available, which may cause functions such as @codebase to not work properly.Please install the required environment. the installation process may take several minutes. 文件索引功能不可用,可能会导致@codebase等功能无法正常使用,请安装相应的环境。 安装过程可能会耗费若干分钟。 - + The indexing of project %1 has not been completed, which may cause the results to be inaccurate. 工程%1的文件索引尚未完全完成,可能会导致结果不准确. @@ -1289,22 +1365,22 @@ storage: %2 CodeGeex - + Login 登录 - + Please login to use CodeGeeX. 请登录后使用CodeGeex. - + Install 安装 - + Install a Python Conda virtual environment for using the file indexing feature. Without it, there may be abnormalities in the @codebase and some AI functionalities. 安装Python Conda虚拟环境,以用于文件索引功能。否则可能导致@codebase或部分Ai功能异常。 @@ -2182,6 +2258,16 @@ Delete anyway? Can not find kit. 找不到配套工具。 + + + Add + + + + + Remove + 删除 + DetailsButton @@ -2194,42 +2280,42 @@ Delete anyway? DetailsView - + Description 描述 - + Dependency 依赖 - + reLaunch when changed! 修改后请重启! - + Settings 设置 - + Relaunch required! 需要重启! - + This platform not support doc display! 该平台不支持doc显示! - + unload 卸载 - + load 加载 @@ -3042,12 +3128,12 @@ need to manually copy the source code to this path InterpreterModel - + Package 软件包 - + Version 版本 @@ -3055,56 +3141,61 @@ need to manually copy the source code to this path InterpreterWidget - + Python Interpreter: Python解释器: - + Browse 浏览 - - + + Remove 删除 - + + PIP Source: + + + + Select Local Interpreter 选择本地解释器 - + Selected Interpreter already exists 选择的解释器已经存在 - - + + Warning 警告 - + Confirm the removal of this interpreter? 确认移除这个解释器? - + Default Interpreter can`t be removed 默认解释器无法被删除 - - - + + + Yes 确定 - + Cancel 取消 @@ -3667,12 +3758,12 @@ repos path: %0 NotificationCenterWidget - + Notification 通知 - + No new notifications 没有新通知 @@ -3685,6 +3776,14 @@ repos path: %0 来源:%1 + + NotificationModel + + + Source: %1 + 来源:%1 + + OptionsDialog @@ -3729,7 +3828,7 @@ repos path: %0 PIPInstaller - + Install packages by pip 通过PIP安装包 @@ -3830,27 +3929,27 @@ repos path: %0 聚焦文件 - + Current project 当前工程 - + Config 配置 - + Project Type: 工程类型: - + Cancel 取消 - + Confirm 确定 @@ -3876,93 +3975,93 @@ repos path: %0 ProjectTree - - - + + + New Document 新建文件 - - + + New Directory 新建文件夹 - + Show Containing Folder 显示所在文件夹 - - + + Rename 重命名 - + Open In Terminal 在终端中打开 - + Delete Document 删除文件 - - + + New Document Name 新文件名 - - - - - - - + + + + + + + Ok 确定 - + New Dirctory Name 新文件夹名 - + New Dirctory 新建文件夹 - + Delete operation not be recoverable, delete anyway? 删除操作不可逆转,是否删除? - + Delete: 删除: - + A directory with name %1 already exists. please reanme it 名称为% 1的目录已经存在。请将其重命名 - - - + + + A file with name %1 already exists. Would you like to overwrite it? 名称为"%1" 的文件已经存在,您想覆盖它吗? - - - - + + + + Cancel 取消 @@ -4079,17 +4178,17 @@ repos path: %0 程序 - + Project Active 激活工程 - + Project Close 关闭工程 - + Project Info 工程信息 @@ -4314,7 +4413,7 @@ not exists support files: %0 QFileDialog - + Open Project Directory 打开工程目录 @@ -4685,7 +4784,7 @@ not exists support files: %0 目标 - + AI @@ -4729,6 +4828,11 @@ not exists support files: %0 Automatically obtain the entry file 自动获取入口文件 + + + ZhiPu + + QPushButton @@ -4752,7 +4856,7 @@ not exists support files: %0 QTabWidget - + Projects 工程 @@ -4822,69 +4926,69 @@ not exists support files: %0 RecentDisplayWidget - + Projects And Documents 工程和文档 - + Clear All 清空 - + Confirm to clear the record of the opened projects and documents? 确认清除已打开项目和文档的记录吗? - + Cancel button 取消 - + Delete button 删除 - + Session 会话 - + session manager 会话管理 - + Open Document 打开文件 - + Open File 打开文件 - + Open Project 打开工程 - + New File or Project 新建文件或工程 - + No Project 无记录 - + Recent Open 最近打开 @@ -6031,27 +6135,27 @@ not exists support files: %0 关闭 - + New Session 新建会话 - + Open Session 打开会话 - + Rename Session 重命名会话 - + Clone Session 克隆会话 - + Remove Session 删除会话 @@ -6073,23 +6177,10 @@ not exists support files: %0 Remove 删除 - - - %1 (last session) - %1(最后的会话) - - - - %1 (current session) - %1(当前的会话) - - - - SessionItemWidgetPrivate Are you sure to remove this session? - 您确定要删除这个会话吗? + 确定要删除会话吗? @@ -6143,6 +6234,16 @@ not exists support files: %0 Please input session name 请输入会话名称 + + + %1 (last session) + %1(最后的会话) + + + + %1 (current session) + %1(当前的会话) + SessionListView @@ -6232,12 +6333,12 @@ not exists support files: %0 SessionNameInputDialog - + Please input session name 请输入会话名称 - + Cancel button 取消 diff --git a/src/plugins/recent/mainframe/sessionitemwidget.cpp b/src/plugins/recent/mainframe/sessionitemwidget.cpp index d9e0849db..153d19fc3 100644 --- a/src/plugins/recent/mainframe/sessionitemwidget.cpp +++ b/src/plugins/recent/mainframe/sessionitemwidget.cpp @@ -260,9 +260,9 @@ void SessionItemWidgetPrivate::removeSession() { DDialog dlg(q); dlg.setIcon(QIcon::fromTheme("dialog-warning")); - dlg.setTitle(tr("Are you sure to remove this session?")); - dlg.addButton(tr("Cancel", "button")); - dlg.addButton(tr("Remove", "button"), true, DDialog::ButtonWarning); + dlg.setTitle(SessionItemWidget::tr("Are you sure to remove this session?")); + dlg.addButton(SessionItemWidget::tr("Cancel", "button")); + dlg.addButton(SessionItemWidget::tr("Remove", "button"), true, DDialog::ButtonWarning); if (dlg.exec() == 1) sessionSrv->removeSession(sessionName); @@ -270,8 +270,8 @@ void SessionItemWidgetPrivate::removeSession() void SessionItemWidgetPrivate::renameSession() { - QStringList actList { tr("Rename", "button"), tr("Rename and Open", "button") }; - runInputDialog(tr("Rename Session"), actList, sessionName, + QStringList actList { SessionItemWidget::tr("Rename", "button"), SessionItemWidget::tr("Rename and Open", "button") }; + runInputDialog(SessionItemWidget::tr("Rename Session"), actList, sessionName, [this](const QString &newName) { sessionSrv->renameSession(sessionName, newName); }); @@ -279,8 +279,8 @@ void SessionItemWidgetPrivate::renameSession() void SessionItemWidgetPrivate::cloneSession() { - QStringList actList { tr("Clone", "button"), tr("Clone and Open", "button") }; - runInputDialog(tr("New Session Name"), actList, sessionName + " (2)", + QStringList actList { SessionItemWidget::tr("Clone", "button"), SessionItemWidget::tr("Clone and Open", "button") }; + runInputDialog(SessionItemWidget::tr("New Session Name"), actList, sessionName + " (2)", [this](const QString &newName) { sessionSrv->cloneSession(sessionName, newName); }); @@ -301,14 +301,14 @@ void SessionItemWidgetPrivate::runInputDialog(const QString &title, const QStrin dlg.setTitle(title); dlg.setIcon(QIcon::fromTheme("ide")); DLineEdit *lineEdit = new DLineEdit(&dlg); - lineEdit->setPlaceholderText(tr("Please input session name")); + lineEdit->setPlaceholderText(SessionItemWidget::tr("Please input session name")); connect(lineEdit, &DLineEdit::textChanged, &dlg, [&dlg](const QString &text) { dlg.getButton(1)->setEnabled(!text.isEmpty()); dlg.getButton(2)->setEnabled(!text.isEmpty()); }); dlg.addContent(lineEdit); - dlg.addButton(tr("Cancel", "button")); + dlg.addButton(SessionItemWidget::tr("Cancel", "button")); dlg.addButton(actList[0]); dlg.addButton(actList[1], true, DDialog::ButtonRecommend); dlg.getButton(1)->setEnabled(false);