From 30ed6640ad88789292a66221084d452c77ba818f Mon Sep 17 00:00:00 2001 From: Zhang Yu Date: Mon, 20 Jan 2025 11:14:34 +0800 Subject: [PATCH] feat: Provide English prompt Provide English prompt. Log: --- .../preview/generalwidget/aitoolbar.cpp | 6 +++--- translations/dde-grand-search.ts | 15 +++++++++++++++ translations/dde-grand-search_zh_CN.ts | 15 +++++++++++++++ 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp b/src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp index 46c54ed..75fb946 100644 --- a/src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp +++ b/src/grand-search/gui/exhibition/preview/generalwidget/aitoolbar.cpp @@ -276,7 +276,7 @@ void AiToolBarInner::onSummary() { qDBusRegisterMetaType>(); QMap params; params.insert("file", m_filePath); - params.insert("defaultPrompt", "帮我总结这篇文档,直接给我清晰的结果,不用多余内容"); + params.insert("defaultPrompt", tr("Summarize this document for me and provide me with a clear result directly, without any unnecessary content.")); QDBusInterface notification("com.deepin.copilot", "/org/deepin/copilot/chat", "org.deepin.copilot.chat", QDBusConnection::sessionBus()); QString error = notification.call(QDBus::Block, "inputPrompt", "", QVariant::fromValue(params)).errorMessage(); if (!error.isEmpty()) { @@ -291,7 +291,7 @@ void AiToolBarInner::onTranslation() { qDBusRegisterMetaType>(); QMap params; params.insert("file", m_filePath); - params.insert("defaultPrompt", "帮我翻译这篇文档,直接给我清晰的结果,不用多余内容"); + params.insert("defaultPrompt", tr("Translate this document for me and provide me with a clear result directly, without any unnecessary content.")); QDBusInterface notification("com.deepin.copilot", "/org/deepin/copilot/chat", "org.deepin.copilot.chat", QDBusConnection::sessionBus()); QString error = notification.call(QDBus::Block, "inputPrompt", "", QVariant::fromValue(params)).errorMessage(); if (!error.isEmpty()) { @@ -306,7 +306,7 @@ void AiToolBarInner::onExtension() { qDBusRegisterMetaType>(); QMap params; params.insert("file", m_filePath); - params.insert("defaultPrompt", "帮我扩写这篇文档,直接给我清晰的结果,不用多余内容"); + params.insert("defaultPrompt", tr("Expand this document for me and provide me with a clear and expanded result directly, without any unnecessary content.")); QDBusInterface notification("com.deepin.copilot", "/org/deepin/copilot/chat", "org.deepin.copilot.chat", QDBusConnection::sessionBus()); QString error = notification.call(QDBus::Block, "inputPrompt", "", QVariant::fromValue(params)).errorMessage(); if (!error.isEmpty()) { diff --git a/translations/dde-grand-search.ts b/translations/dde-grand-search.ts index 2523e78..2929e20 100644 --- a/translations/dde-grand-search.ts +++ b/translations/dde-grand-search.ts @@ -65,6 +65,21 @@ Add document to UOS AI knowledge base + + + Summarize this document for me and provide me with a clear result directly, without any unnecessary content. + + + + + Translate this document for me and provide me with a clear result directly, without any unnecessary content. + + + + + Expand this document for me and provide me with a clear and expanded result directly, without any unnecessary content. + + DDE Grand Search diff --git a/translations/dde-grand-search_zh_CN.ts b/translations/dde-grand-search_zh_CN.ts index f1cc663..cda3be5 100644 --- a/translations/dde-grand-search_zh_CN.ts +++ b/translations/dde-grand-search_zh_CN.ts @@ -65,6 +65,21 @@ Add document to UOS AI knowledge base 将文档添加到UOS AI知识库 + + + Summarize this document for me and provide me with a clear result directly, without any unnecessary content. + 帮我总结这篇文档,直接给我清晰的结果,不用多余内容 + + + + Translate this document for me and provide me with a clear result directly, without any unnecessary content. + 帮我翻译这篇文档,直接给我清晰的结果,不用多余内容 + + + + Expand this document for me and provide me with a clear and expanded result directly, without any unnecessary content. + 帮我扩写这篇文档,直接给我清晰的结果,不用多余内容 + DDE Grand Search