Add docs for autotranslations#8765
Conversation
|
Newest code from mattermost has been published to preview environment for Git SHA c92dcf4 |
|
Thanks @BenCookie95! Can you please help remove the "docs/needed" label and replace with "docs/done" label on any code PRs that are covered by this docs PR? @Combs7th can you help do a first pass review on this? |
| - **LibreTranslate**: A running LibreTranslate server reachable from the Mattermost server. | ||
| - **Agents**: The :doc:`Mattermost Agents plugin </administration-guide/configure/agents-admin-guide>` installed and configured with at least one LLM service. | ||
|
|
||
| Enable autotranslation |
There was a problem hiding this comment.
This should probably be after the step of selecting and configuring your translation provider.
| - **LibreTranslate**: A self-hosted, open-source machine translation engine. | ||
| - **Agents**: Uses the Mattermost Agents plugin with a configured LLM backend. | ||
|
|
||
| Before you begin |
There was a problem hiding this comment.
We can probably create a heading to house everything related to setting up and selecting your translation provider
|
|
||
| **Choosing an LLM for the Agents provider**: Smaller, faster models are recommended for autotranslation. Translation is a well-defined task that doesn't benefit from the extended reasoning capabilities of larger models — larger models may actually overthink the task, adding unnecessary latency without improving quality. A model like ``gpt-3.5-turbo`` provides accurate translations with lower latency. | ||
|
|
||
| Manage autotranslation per channel |
There was a problem hiding this comment.
We should be more explicit in this doc about how to actually enable autotranslate in the channel. Maybe title this "Enable Auto-Translation in a Channel"
| Autotranslation is managed on a per-channel basis and is disabled by default for all channels. System admins and channel admins can enable or disable autotranslation for individual channels. | ||
|
|
||
| - When autotranslation is enabled or disabled in a channel, a system post notifies channel members of the change. | ||
| - Use the :ref:`Restrict autotranslation in direct and group messages <administration-guide/configure/site-configuration-settings:restrict autotranslation in direct and group messages>` setting to control whether autotranslation can be enabled in direct and group messages. |
There was a problem hiding this comment.
This can probably move to the "enable autotranslate" section since it's a system wide configuration
| - When autotranslation is enabled or disabled in a channel, a system post notifies channel members of the change. | ||
| - Use the :ref:`Restrict autotranslation in direct and group messages <administration-guide/configure/site-configuration-settings:restrict autotranslation in direct and group messages>` setting to control whether autotranslation can be enabled in direct and group messages. | ||
|
|
||
| Tune worker performance |
There was a problem hiding this comment.
This may need an intro so we are more opinionated on when and why an admin might need to do this
| :environment: MM_AUTOTRANSLATIONSETTINGS_WORKERS | ||
| :description: The number of concurrent translation workers per node. Default is **6**. | ||
|
|
||
| Translation workers |
There was a problem hiding this comment.
I don't see this in the system console in my test server
|
|
||
| .. _autotranslation: | ||
|
|
||
| Autotranslation |
There was a problem hiding this comment.
Can we order this based on how it appears in the system console?
| :environment: MM_AUTOTRANSLATIONSETTINGS_TARGETLANGUAGES | ||
| :description: The languages that all messages in autotranslation-enabled channels are translated into. Every message is translated into each language in this list. Default is **["en"]**. | ||
|
|
||
| Target languages |
There was a problem hiding this comment.
This is called "Languages allowed" in the sys console UI
| @@ -0,0 +1,199 @@ | |||
| Set up autotranslation (Beta) | |||
There was a problem hiding this comment.
Applicable throughout, in the UI we are using "Auto-translation"
| Set up LibreTranslate | ||
| --------------------- | ||
|
|
||
| `LibreTranslate <https://libretranslate.com/>`__ is a self-hosted, open-source machine translation engine. See the `LibreTranslate documentation <https://github.com/LibreTranslate/LibreTranslate>`__ for deployment instructions. |
There was a problem hiding this comment.
Do we have opinionated recommendations for optimal performance, in terms of hardware, install guidance (ie using it's own machine or can it be installed on the same machine as the server, etc)
Software requirements (ie version compatibility etc)
There was a problem hiding this comment.
Also the link should be directly to the install docs
|
Pending the updates Eric shared above, this LGTM. Added labels and release milestone to the PR. |
marianunez
left a comment
There was a problem hiding this comment.
Thanks Ben! Great section on the scaling 👍
Left some minor comments
|
|
||
| - **Direct and group messages**: Your system admin may have restricted autotranslation in direct and group messages. If autotranslation isn't available in a direct or group message, contact your system admin. | ||
| - **Short or mixed-language messages**: Very short messages or messages that mix multiple languages may not be reliably detected and translated. | ||
| - **Code-only messages**: Messages that contain only code blocks are skipped and not translated. |
There was a problem hiding this comment.
Would we consider this a limitation or a as expected? Above we mention that code blocks are preserved
|
|
||
| From Mattermost v11.5, autotranslation automatically translates channel messages into each user's preferred display language. This enables multilingual teams to collaborate without language barriers. | ||
|
|
||
| Autotranslation uses an asynchronous queue-based architecture. When a message is posted in a channel with autotranslation enabled, the message is queued for translation into every configured target language. Translated messages replace the original display for users whose display language matches a target language, and they can toggle to view the original text at any time. |
There was a problem hiding this comment.
and they can toggle to view the original text at any time.
Toggle makes it sound like it can switch the view back and forth to the original to translated text but it's really just that you can view the original message at any time. However, not sure what the correct wording would be
|
|
||
| Two translation provider options are available: | ||
|
|
||
| - **LibreTranslate**: A self-hosted, open-source machine translation engine. |
There was a problem hiding this comment.
We should include the link here too to their documentation, especially because it's the first time introduced in this page.
|
|
||
| .. tip:: | ||
|
|
||
| **Choosing between LibreTranslate and Agents**: LibreTranslate is a lightweight, self-hosted translation engine. The Agents provider uses an LLM backend and generally produces more accurate translations, especially for languages such as Japanese, Korean, and Chinese where contextual understanding improves quality. Consider your translation quality needs and existing infrastructure when choosing. |
There was a problem hiding this comment.
What are we basing this recommendation of from regarding LLM being more accurate in JKC languages?
|
|
||
| Autotranslation is managed on a per-channel basis and is disabled by default for all channels. System admins and channel admins can enable or disable autotranslation for individual channels. | ||
|
|
||
| - When autotranslation is enabled or disabled in a channel, a system post notifies channel members of the change. |
There was a problem hiding this comment.
We should also include that the messages will be translated starting from this point when enabled and not the history.
Summary
Ticket Link
https://mattermost.atlassian.net/browse/MM-67781