# 与非英语界面语言结合的AI助手翻译选项

**URL:** <https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689>\
**Category:** UX\
**Tags:** completed, ai, ai-helper\
**Created:** [2024年六月25日 21:15 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689 "2024-06-25T21:15:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年六月25日 21:15 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/1 "2024-06-25T21:15:20Z")

</div>

我碰巧将我的界面语言设置为德语，过了一会儿，我又使用了助手在编辑器中的“翻译成英语”选项。不幸的是，在这种组合下，它将我的德语文本“翻译”成了德语。这没什么帮助 ☹

这让我产生了两个问题：

1. 这是故意的吗？虽然将用户选择的语言翻译成用户选择的语言在阅读他人帖子时肯定非常有帮助，但在回复时对我来说似乎是一种阻碍。
2. 我看到的“Übersetze ins Englische”是翻译错误吗？毕竟，它被翻译成了德语。

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2024年六月25日 23:23 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/2 "2024-06-25T23:23:52Z")

</div>

> [@Moin](#):
>
> 我看到“Übersetze ins Englische”的翻译错误吗？毕竟，它已经被翻译成德语了。

这肯定是翻译中的一个错误。@gerhard 我们该如何标记翻译人员不要直译“Translate into English”？

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2024年六月25日 23:26 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/3 "2024-06-25T23:26:25Z")

</div>

> [@Moin](#):
>
> 这是故意的吗？虽然将帖子翻译成用户所选语言在阅读他人帖子时肯定非常有帮助，但在回复时似乎会造成阻碍。

这是故意的，我们正在尝试匹配界面语言。如果您更喜欢其他语言，我认为您可以使用自定义说明？

 ![图片显示了一个翻译界面或工具，其中包含在不同语言之间翻译文本的选项，例如翻译成乌尔都语或英语，解释翻译或校对文本。（由 AI 题注）](https://global.discourse-cdn.com/meta/original/4X/8/1/4/814f2dd6955c64125af466484942bee819cdaca7.png)

 ![此图片显示了一些文本的乌尔都语翻译，以及翻译文本下方的“取消”和“复制”按钮。（由 AI 题注）](https://global.discourse-cdn.com/meta/original/4X/c/0/7/c071d899b2c7d289c099c4713b3a59222f7d08f1.png)

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年六月25日 23:53 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/4 "2024-06-25T23:53:38Z")

</div>

正如我所说，当我能轻松地将论坛上的文本翻译成我的界面语言时，这很有帮助。但我仍然不明白在撰写帖子时的用例。

 ![Screenshot_20240626_013235_Chrome](https://global.discourse-cdn.com/meta/original/4X/6/a/d/6ad3aef2c6e400271c3121cfbd0cf043f4532b62.jpeg)

当我选择德语作为我的界面语言时，我假设我德语说得相当好。我为什么还需要使用人工智能将我自己写的外国语文本翻译成德语？我可以直接用德语写。如果我能将我用首选语言（例如德语）写下的文本翻译成论坛的默认语言，那会更有帮助。  
目前，当我将界面语言设置为德语时，即使是校对也会将我的整个帖子翻译成德语。我很感谢有机会让人工智能帮我校对文本。但我需要支持我用英语写作，即使我的界面是德语。我认为你不会喜欢我用德语发帖。这就是为什么我立即将语言改回英语。这对我来说肯定比每次都要制定自定义提示更容易。自定义提示通常会在帖子中添加机器人的一些额外评论，我之后必须删除它们。这就是为什么我喜欢默认的提示，通常机器人不会在那里添加评论。

---

<div class="post-metadata">

**Author:** ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)\
**Post date:** [2024年六月26日 08:00 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/5 "2024-06-26T08:00:05Z")

</div>

> [@sam](#):
>
> 这无疑是翻译中的一个错误。@gerhard 我们该如何提醒翻译人员不要逐字翻译“Translate into English”？

您可以在 locale 文件中添加注释，这会作为上下文显示给翻译人员。

> [@Moin](#):
>
> 为什么我需要使用 AI 来翻译我自己用外语写成的德语文本？

我同意 Moin 的观点。我认为问题在于我们有两种不同的用例，但试图使用相同的功能。

- 阅读：我正在阅读一篇非母语的帖子。在这种情况下，使用 AI 将其翻译成我的界面语言（德语）是有意义的。

- 写作：我正在用我的母语（德语）写帖子，并希望 AI 将其翻译成论坛的默认语言（英语）或我回复的帖子的语言[^1]。

校对绝对不应该改变我所写帖子的语言。这完全是错误的。

[^1]：该帖子可能使用的语言与我的母语和默认语言环境不同。

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2024年六月26日 08:24 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/6 "2024-06-26T08:24:34Z")

</div>

@Moin 你有机会创建一个pr来添加注释吗？我会更仔细地校对，但我认为我们已经尝试过提示工程来保持语言。

---

<div class="post-metadata">

**Author:** ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)\
**Post date:** [2024年六月26日 09:01 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/7 "2024-06-26T09:01:16Z")

</div>

> [@Moin](#):
>
> 为什么我需要使用人工智能将我自己写的外国语文本翻译成德语？

我不敢苟同 🙂  
虽然我理解你的观点，但有多种用例。

在我们的德语论坛中，我们希望为我们的商业/赞助商账户使用从英语到德语的人工智能翻译。其中一些用户不是德语母语者，他们希望能够发帖。

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年六月26日 09:04 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/8 "2024-06-26T09:04:03Z")

</div>

> [@sam](#):
>
> pr to add the comment

像这样吗？

> <https://github.com/moin-Jana/discourse-ai/blob/535f9b0c1085ddcff3a0ba448c08db7d5ecee82c/config/locales/server.en.yml#L149>

当用户的界面语言没有翻译可用时会发生什么？我认为在这种情况下会显示默认的“翻译成英文”。AI 在这种情况下会做什么？它会翻译成英文还是用户的语言环境。  
那么也许“翻译成 %{language}”会更有帮助。

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年六月26日 09:10 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/9 "2024-06-26T09:10:36Z")

</div>

> [@jrgong](#):
>
> 恕我不敢苟同

我认为我们意见一致。

您打算将撰写器中输入的文本翻译成您论坛的默认语言，对吗？我也想这样做。但目前，文本被翻译成用户选择的区域设置。因此，如果您的赞助商使用英语版本的论坛，AI 助手将提供“翻译成英语”。

---

<div class="post-metadata">

**Author:** ![jrgong](https://avatars.discourse-cdn.com/v4/letter/j/c57346/32.png) [@jrgong](https://meta.discourse.org/u/jrgong)\
**Post date:** [2024年六月26日 09:13 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/10 "2024-06-26T09:13:03Z")

</div>

好的，谢谢你的澄清！那么，理想情况下，应该有一个单独的设置来选择 AI 翻译的目标语言。

此外，在较大的英语论坛上，通常也会找到特定语言的版块，所以这将是另一个用例。

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2024年六月27日 06:51 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/11 "2024-06-27T06:51:55Z")

</div>

> [@Moin](#):
>
> “翻译成 %{language}” 会更有帮助

这绝对是个好主意。@keegan 改变这个有多复杂？我认为我们已经将所有语言都正确翻译了，所以我们可以为德语中的“language”传入 `Deutsch`。

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年六月27日 06:59 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/12 "2024-06-27T06:59:28Z")

</div>

> [@sam](#):
>
> 我认为我们已经正确翻译了所有语言，所以我们可以为德语中的“language”传入 `Deutsch`。

偏好设置中的语言设置提供了它们：

 ![Screenshot_20240627_085555_Chrome](https://global.discourse-cdn.com/meta/original/4X/4/a/2/4a29b49cc7f355f8f540b622cb16448619aba9ca.jpeg)

---

<div class="post-metadata">

**Author:** ![keegan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/keegan/32/383395_2.png) [@keegan](https://meta.discourse.org/u/keegan)\
**Post date:** [2024年六月27日 17:33 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/13 "2024-06-27T17:33:59Z")

</div>

> [@sam](#):
>
> 这个改动有多复杂？

传递翻译的语言并将字符串替换为“翻译到 `%{language}`”应该相当容易。但是，我们使用了相同的 `CompletionPrompt`，称为 `translate`，它同时用于帖子 AI 助手和编辑器 AI 助手。

如果我们想要实现的功能是：

- **帖子** 助手：翻译到 **界面** 区域设置
- **编辑器** 助手：翻译到 **站点** 区域设置

这将需要更多的工作（尽管仍然可行），因为我们可能需要为每个帖子/编辑器创建一个单独的 `CompletionPrompt`。更简单的方法是使用相同的（即都翻译到界面区域设置）。

我可以推送一个更新，我们更喜欢哪种？

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2024年六月27日 22:22 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/14 "2024-06-27T22:22:01Z")

</div>

> [@keegan](#):
>
> 如果我们希望功能是：
> 
> - **Post** Helper：翻译成 **Interface** Locale
> - **Composer** Helper：翻译成 **Site** locale

这感觉是对的 👍 @Falco？

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2024年六月28日 00:10 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/15 "2024-06-28T00:10:20Z")

</div>

> [@keegan](#):
>
> 翻译为 **站点** 区域设置

但反例是：

> **[Mozilla Discourse](https://discourse.mozilla.org/)**
>
> Mozilla Community Discourse forum

> **[WebVR (Chinese 中文)](https://discourse.mozilla.org/c/communities/webvr-zh/233)**
>
> 討論 WebVR 的技術相關事宜。包括 WebVR 於各瀏覽器的實作、相關消息、專案分享、新手問題、老手切磋等。

多语言论坛需要特殊行为。我认为默认情况下保持与界面区域设置一致可能是最安全的选择。

长远来看，也许我们可以为类别添加一个选项来指定主要区域设置，或者我梦想中的……我知道意大利语……我只看到到处都是意大利语，我用意大利语写，我用意大利语读，我用意大利语搜索。

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年六月28日 15:47 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/16 "2024-06-28T15:47:22Z")

</div>

> [@sam](#):
>
> 多语言论坛需要特殊行为。我认为默认情况下始终保持界面语言一致可能是最安全的选择。

为什么多语言论坛需要特殊行为？我认为它们通常工作方式相同：  
我们假设用户选择他们能很好地沟通的界面语言。因此，在阅读时，提供翻译成界面语言是有帮助的。

但我认为用户不太可能需要帮助将他们在撰写框中用母语写的内容翻译成他们的首选语言。更有可能的是，他们用首选语言写了文本，需要帮助将其翻译成外语。他们可以使用自定义提示来选择他们需要的任何语言。

我认为提供论坛的默认语言将是最好的默认选项。通常并非所有内容都提供多种语言。我的印象是，即使在多语言论坛中，大部分活动也通常以默认语言进行。当我查看 [https://forum.arduino.cc/](https://forum.arduino.cc/) 上的类别统计数据时，上周国际类别中发布了约 80 个主题，而在其他类别中则发布了约 400 个主题。此外，通常与每个人相关的一般主题，例如在元类别中，通常以默认语言讨论。

这就是为什么我认为默认论坛语言也可以成为多语言论坛中撰写内容的一个好默认选项。@gerhard 提出的提供翻译成我正在回复的帖子的语言的建议会更好，但我预计这会复杂得多。

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2024年六月28日 22:20 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/17 "2024-06-28T22:20:00Z")

</div>

好的，风险看起来足够低了

@keegan 请随意采纳你的建议

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年七月4日 18:23 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/19 "2024-07-04T18:23:54Z")

</div>

它运行得非常好！ → It works splendidly!

> <https://github.com/discourse/discourse-ai/pull/698>
>
> As requested on \[Meta\](https://meta.discourse.org/t/translation-option-of-ai-hel…per-in-combination-with-non-english-interface-language/313689?u=keegan): 
> 
> Currently, all translation prompts translate to the interface locale if it has been set by the user. However with this PR, it updates the AI helper work as:
> \- \*\*Post\*\* Helper: Translates to \*\*Interface\*\* Locale
> \- \*\*Composer\*\* Helper: Translates to \*\*Site\*\* locale
> 
> Instead of adding a separate prompt for handling this, we do this instead by adding a param to the \`suggest\` assistant controller action called \`force\_default\_locale\`. By default the param is false, however, in the composer AI helper, when we make the request, we pass it as true so that it forces the translation to be from the site locale instead of the interface locale.

---

<div class="post-metadata">

**Author:** ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)\
**Post date:** [2024年七月9日 09:07 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/21 "2024-07-09T09:07:05Z")

</div>

我知道这已经解决了，但我不确定刚才发生了什么。

一小时前我升级了。论坛使用的是芬兰语，并且使用了正确的区域设置，我猜是这样。现在：

- 帖子助手提供翻译成英语，这在某种程度上是合乎逻辑的，但不确定有多大用处
- 编辑器助手提供翻译成芬兰语，这几乎总是有用的\*

所以，一个最终用户级别的解决方案是完全隐藏翻译选项，因为它几乎从不提供帮助。或者我应该从另一个角度考虑这个问题？

---

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2024年七月9日 09:14 UTC](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689/22 "2024-07-09T09:14:32Z")

</div>

> [@Jagster](#):
>
> 帖子助手提供英语翻译，这在某种程度上是合乎逻辑的，但不确定有多大用处

当翻译合并后，文本将更新。目前，它仍然显示“翻译成英语”，因为翻译没有被“翻译成 %{language}”替换。尽管它显示的是“英语”，但它会像以前一样翻译成您的界面语言。旧文本具有误导性。

> [@Jagster](#):
>
> 作曲家助手提供芬兰语翻译，这几乎总是完全没用的

哪种语言会更有帮助？

[下一頁](https://meta.discourse.org/t/translation-option-of-ai-helper-in-combination-with-non-english-interface-language/313689.md?page=2)
