diff --git a/CHANGELOG.md b/CHANGELOG.md index 06c5e4b..8a82815 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,6 @@ - MCP:stdio JSON-RPC,自动 initialize / tools-list,工具以 function calling 暴露给模型并在对话中执行 - 合成器 portal(flake-wm / gxde-wlcom):org.gxde.Portal、缩略图坐标映射、 原生 drop 到目标窗口 -- gxde-k9 开机自启与保活开关;不支持环境只提示一次并保持待命 +- 英文翻译(95 条)与翻译加载;gxde-k9 开机自启与保活开关;不支持环境只提示一次并保持待命 -- shenmo diff --git a/tests/selftest.cpp b/tests/selftest.cpp index 9243260..67ea510 100644 --- a/tests/selftest.cpp +++ b/tests/selftest.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include "actions/texttools.h" #include "factory/contentclassifier.h" @@ -39,6 +40,22 @@ int main(int argc, char *argv[]) { QCoreApplication app(argc, argv); + if (qEnvironmentVariableIsSet("GXDE_AI_SEE_QM")) { + auto *translator = new QTranslator(&app); + if (translator->load(QString::fromLocal8Bit(qgetenv("GXDE_AI_SEE_QM")))) { + app.installTranslator(translator); + check(QCoreApplication::translate("PortalPanel", "暂存区") + == QStringLiteral("Staging"), + "english translation: PortalPanel/暂存区"); + check(QCoreApplication::translate("ChatWindow", "发送") == QStringLiteral("Send"), + "english translation: ChatWindow/发送"); + check(QCoreApplication::translate("TodoWindow", "待办") == QStringLiteral("Todo"), + "english translation: TodoWindow/待办"); + } else { + check(false, "load english .qm"); + } + } + // http link with a video extension const LinkInfo video = LinkTools::parse(QStringLiteral("https://example.com/media/clip.mp4")); check(video.kind == LinkInfo::Http, "https link recognised"); diff --git a/translations/gxde-ai-see_en.ts b/translations/gxde-ai-see_en.ts index 6b9f09c..4a1b1bc 100644 --- a/translations/gxde-ai-see_en.ts +++ b/translations/gxde-ai-see_en.ts @@ -6,12 +6,12 @@ 小埃同学 - + AI See 当前桌面不支持传送门(需要 GXDE Wayland 合成器)。小埃同学会继续在后台待命,暂存区、内容工厂和对话仍然可用。 - + This desktop does not support the portal (a GXDE Wayland compositor is required). AI See will stay idle in the background; staging, the content factory and chat remain available. @@ -19,17 +19,17 @@ 模型没有返回内容 - + The model returned nothing 请求失败 - + Request failed API Key 无效或已过期 - + The API key is invalid or expired @@ -38,164 +38,164 @@ 小埃同学 - + AI See 工具调用次数过多,已停止 - + Too many tool calls, stopped ⚠️ %1 - + ⚠️ %1 把内容拖进对话即可提问 - + Drop content into a conversation to ask about it + 新建对话 - + + New conversation ⋯ 更多 - + ⋯ More 压缩上下文 - + Compress context 重试上一条 - + Retry last message 重新加载 MCP - + Reload MCP 没有配置 MCP 服务器 - + No MCP server configured 关于 - + About 设置 - + Settings 输入消息,Ctrl+Enter 发送;也可以把文件/文字拖进窗口 - + Type a message, Ctrl+Enter to send; you can also drop files or text here 发送 - + Send 新对话 - + New conversation 你 - + You 小埃 - + AI See 正在压缩上下文… - + Compressing context… 编辑消息 - + Edit message %1 · 分支 - + %1 · branch 关于小埃同学 - + About AI See <h3>GXDE 小埃同学</h3><p>版本 %1</p><p>GXDE 桌面的 AI 助手:传送门、内容工厂、待办与对话。</p><p>许可证:GPL-3.0-or-later<br/>仓库:<a href='https://gitee.com/GXDE-OS/gxde-ai-see'>gitee.com/GXDE-OS/gxde-ai-see</a></p> - + <h3>GXDE AI See</h3><p>Version %1</p><p>The AI assistant for the GXDE desktop: portal, content factory, todo and chat.</p><p>License: GPL-3.0-or-later<br/>Repository: <a href='https://gitee.com/GXDE-OS/gxde-ai-see'>gitee.com/GXDE-OS/gxde-ai-see</a></p> 小埃同学设置 - + AI See settings DeepSeek API Key - + DeepSeek API key API 地址 - + API endpoint 模型 - + Model 上下文条数 - + Context messages 超出后自动压缩旧消息 - + Automatically compress older messages when exceeded MCP 服务器(JSON) - + MCP servers (JSON) 系统提示 - + System prompt 还没有账号?前往 <a href='https://platform.deepseek.com'>platform.deepseek.com</a> 开通并创建 API Key。Key 只保存在本机配置文件中。 - + No account yet? Sign up and create an API key at <a href='https://platform.deepseek.com'>platform.deepseek.com</a>. The key is stored only in the local configuration file. MCP 配置不是合法的 JSON 数组,已忽略 - + The MCP configuration is not a valid JSON array; ignored @@ -204,12 +204,12 @@ 拖到这里,按类型处理 - + Drop here to process by type 拖到动作上松手 - + Drop onto an action @@ -217,27 +217,27 @@ 另存为 - + Save as 无法写入:%1 - + Cannot write: %1 开始下载:%1 - + Downloading: %1 下载失败:%1 - + Download failed: %1 下载完成:%1 - + Downloaded: %1 @@ -245,184 +245,184 @@ GXDE 小埃同学 - + GXDE AI See %1 项 - + %1 items 移动到目标窗口上松手 - + Move onto a target window and release 当前无已打开的窗口 - + No open windows 当前环境不支持传送门 - + The portal is not supported in this environment 暂存区 - + Staging 全选 - + Select all 反选 - + Invert 删除选中 - + Delete selected 复制 - + Copy 已复制 - + Copied 真实地址 - + Real address 分词(%1) - + Segmented (%1) 提取链接(%1) - + Links (%1) 未找到语音朗读程序 - + No speech program found 开始朗读 - + Reading aloud 已添加到待办 - + Added to todo 没有可保存的图片 - + No image to save 保存图片 - + Save image 图片 (*.png *.jpg) - + Images (*.png *.jpg) 已保存:%1 - + Saved: %1 翻译接口将在小埃同学接入后可用 - + Translation will be available once the AI backend is wired up 该能力尚未接入 GXDE Daemon - + This capability is not wired to GXDE Daemon yet 未知操作:%1 - + Unknown action: %1 固定位置 - + Pin position 恢复默认位置 - + Restore default position 固定大小 - + Pin size 全屏时隐藏 - + Hide on fullscreen 开机自启与后台保活 - + Start at login and keep alive 清空暂存区 - + Clear staging area 关于 - + About 退出 - + Quit 已开启开机自启与保活 - + Startup and keep-alive enabled 已关闭开机自启与保活 - + Startup and keep-alive disabled 关于小埃同学 - + About AI See <h3>GXDE 小埃同学</h3><p>版本 %1</p><p>传送门、内容工厂、待办与小埃同学对话。</p><p>GPL-3.0-or-later · <a href='https://gitee.com/GXDE-OS/gxde-ai-see'>gxde-ai-see</a></p> - + <h3>GXDE AI See</h3><p>Version %1</p><p>Portal, content factory, todo and AI See chat.</p><p>GPL-3.0-or-later · <a href='https://gitee.com/GXDE-OS/gxde-ai-see'>gxde-ai-see</a></p> @@ -430,23 +430,24 @@ 问问小埃 → - + Ask AI See → 传送门 - + Portal 拖到这里 选择窗口跃迁 - + Drop here +to choose a window 悬停在「传送门」上,再移动到目标窗口 - + Hover the portal, then move onto a target window @@ -454,22 +455,22 @@ 还没有配置 API Key。请先点右上角设置,填入 DeepSeek API Key。 - + No API key configured yet. Open Settings and enter your DeepSeek API key. 文件 - + File 图片 - + Image 文字 · %1 字 - + Text · %1 chars @@ -477,7 +478,7 @@ 把文件、文字或图片拖到这里 - + Drop files, text or images here @@ -486,39 +487,39 @@ 待办 - + Todo %1 项 - + %1 items + - + + 新建待办 - + New todo × - + × 隐藏 - + Hide 要做的事… - + Something to do…