From cc4924db556c71c5a31172442b32adb511ba1e43 Mon Sep 17 00:00:00 2001 From: Pranav Date: Wed, 12 Mar 2025 19:31:28 -0700 Subject: [PATCH] feat: Update translated content inline (#11074) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, viewing translations required opening a modal, which was a frustrating experience. This update improves the UX by displaying translations inline. https://www.loom.com/share/c69f4316248946208f2e56e2429063a2 A sample message with translated content (which has an option to see the original): Screenshot 2025-03-12 at 6 57 49 PM Right now, the translation is done based on the account locale. Some of the future considerations. - Add personal preference for the language (For eg: an agent can use the software in spanish even though the company default is english), then support translations based on personal preference. - Add support for LLM translations (OpenAI integration) - Add translations if Captain is enabled - Add auto translation if the feature is turned on. --- .../message/bubbles/Text/Index.vue | 43 ++++++++++++- .../conversation/bubble/TranslateModal.vue | 61 ------------------- .../i18n/locale/en/conversation.json | 2 + .../components/MessageContextMenu.vue | 14 ----- 4 files changed, 43 insertions(+), 77 deletions(-) delete mode 100644 app/javascript/dashboard/components/widgets/conversation/bubble/TranslateModal.vue diff --git a/app/javascript/dashboard/components-next/message/bubbles/Text/Index.vue b/app/javascript/dashboard/components-next/message/bubbles/Text/Index.vue index 1a7997f50..8e43c9eb4 100644 --- a/app/javascript/dashboard/components-next/message/bubbles/Text/Index.vue +++ b/app/javascript/dashboard/components-next/message/bubbles/Text/Index.vue @@ -1,5 +1,5 @@