diff --git a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/PromptReply/index.jsx b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/PromptReply/index.jsx
index f4847dfc41d..d347848952b 100644
--- a/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/PromptReply/index.jsx
+++ b/frontend/src/components/WorkspaceChat/ChatContainer/ChatHistory/PromptReply/index.jsx
@@ -1,5 +1,6 @@
/* eslint-disable react-hooks/refs */
import { memo, useRef, useEffect } from "react";
+import { useTranslation } from "react-i18next";
import { Warning } from "@phosphor-icons/react";
import renderMarkdown from "@/utils/chat/markdown";
import DOMPurify from "@/utils/chat/purify";
@@ -12,13 +13,27 @@ import {
} from "../ThoughtContainer";
const PromptReply = ({ uuid, reply, pending, error, sources = [] }) => {
+ const { t } = useTranslation();
if (!reply && sources.length === 0 && !pending && !error) return null;
if (pending) {
return (
-
+ {/*
+ The animation below is the only signal that a reply is coming, and it
+ is purely visual. The status region gives a screen reader user the
+ same information. It carries the text rather than wrapping the
+ animation so that it announces once, on appearance, instead of on
+ every repaint.
+ */}
+
+ {t("chat_window.generating_response")}
+
+
);
@@ -28,10 +43,22 @@ const PromptReply = ({ uuid, reply, pending, error, sources = [] }) => {
return (
-
- Could not respond
- to message.
- Reason: {error || "unknown"}
+ {/*
+ role="alert" rather than "status": a failed reply is the one case
+ where the user needs interrupting, because nothing else on the page
+ changes to tell them the turn ended.
+ */}
+
+ {" "}
+ {t("chat_window.response_failed")}
+
+ {t("chat_window.response_failed_reason", {
+ reason: error || "unknown",
+ })}
+
diff --git a/frontend/src/locales/ar/common.js b/frontend/src/locales/ar/common.js
index f3155e5346c..52afa7b12e9 100644
--- a/frontend/src/locales/ar/common.js
+++ b/frontend/src/locales/ar/common.js
@@ -1278,6 +1278,9 @@ const TRANSLATIONS = {
export: "تصدير المحادثة كـ...",
exporting: "التصدير...",
preset_img_description: "إنشاء صورة بناءً على نص معين.",
+ generating_response: "إنشاء رد",
+ response_failed: "لم أتمكن من الرد على الرسالة.",
+ response_failed_reason: "السبب: {{reason}}",
},
profile_settings: {
edit_account: "تحرير الحساب",
diff --git a/frontend/src/locales/ca/common.js b/frontend/src/locales/ca/common.js
index 63e054fc8e7..b43561a8d35 100644
--- a/frontend/src/locales/ca/common.js
+++ b/frontend/src/locales/ca/common.js
@@ -1511,6 +1511,9 @@ const TRANSLATIONS = {
export: "Exporta la conversa com a...",
exporting: "Exportant…",
preset_img_description: "Generar una imatge a partir d'un text",
+ generating_response: "Generar resposta",
+ response_failed: "No he pogut respondre al missatge.",
+ response_failed_reason: "Motiu: {{reason}}",
},
profile_settings: {
edit_account: "Edita el compte",
diff --git a/frontend/src/locales/cs/common.js b/frontend/src/locales/cs/common.js
index ccbf0602a96..f064afa200a 100644
--- a/frontend/src/locales/cs/common.js
+++ b/frontend/src/locales/cs/common.js
@@ -1418,6 +1418,9 @@ const TRANSLATIONS = {
export: "Exportujte konverzaci jako…",
exporting: "Exportování...",
preset_img_description: "Vytvořit obrázek na základě textového pokynu",
+ generating_response: "Generování odpovědi",
+ response_failed: "Nebyl možné odpovědět na zprávu.",
+ response_failed_reason: "Důvod: {{reason}}",
},
profile_settings: {
edit_account: "Upravit účet",
diff --git a/frontend/src/locales/da/common.js b/frontend/src/locales/da/common.js
index 07c2cf40add..7dd72feb96c 100644
--- a/frontend/src/locales/da/common.js
+++ b/frontend/src/locales/da/common.js
@@ -1293,6 +1293,9 @@ const TRANSLATIONS = {
export: "Eksportér chat som...",
exporting: "Eksportér...",
preset_img_description: "Generer et billede ud fra en tekstbeskrivelse",
+ generating_response: "Generere svar",
+ response_failed: "Kunne ikke svare på beskeden.",
+ response_failed_reason: "Årsag: {{reason}}",
},
profile_settings: {
edit_account: "Rediger konto",
diff --git a/frontend/src/locales/de/common.js b/frontend/src/locales/de/common.js
index 5e7bb5073f2..fc605077192 100644
--- a/frontend/src/locales/de/common.js
+++ b/frontend/src/locales/de/common.js
@@ -1417,6 +1417,9 @@ const TRANSLATIONS = {
exporting: "Exportieren...",
preset_img_description:
"Erstelle ein Bild basierend auf einer Textanfrage.",
+ generating_response: "Antwort generieren",
+ response_failed: "Ich konnte die Nachricht nicht beantworten.",
+ response_failed_reason: "Grund: {{reason}}",
},
profile_settings: {
edit_account: "Account bearbeiten",
diff --git a/frontend/src/locales/en/common.js b/frontend/src/locales/en/common.js
index 9715f52b8ab..088156c6482 100644
--- a/frontend/src/locales/en/common.js
+++ b/frontend/src/locales/en/common.js
@@ -1524,6 +1524,9 @@ const TRANSLATIONS = {
},
chat_window: {
attachments_processing: "Attachments are processing. Please wait...",
+ generating_response: "Generating response",
+ response_failed: "Could not respond to message.",
+ response_failed_reason: "Reason: {{reason}}",
send_message: "Send a message",
attach_file: "Attach a file to this chat",
text_size: "Change text size.",
diff --git a/frontend/src/locales/es/common.js b/frontend/src/locales/es/common.js
index 2ce486aff8d..2c9292ea6d1 100644
--- a/frontend/src/locales/es/common.js
+++ b/frontend/src/locales/es/common.js
@@ -1432,6 +1432,9 @@ const TRANSLATIONS = {
exporting: "Exportando...",
preset_img_description:
"Generar una imagen a partir de una descripción textual.",
+ generating_response: "Generar respuesta",
+ response_failed: "No fue posible responder al mensaje.",
+ response_failed_reason: "Razón: {{reason}}",
},
profile_settings: {
edit_account: "Editar cuenta",
diff --git a/frontend/src/locales/et/common.js b/frontend/src/locales/et/common.js
index 86f048d420e..4dc2244f56c 100644
--- a/frontend/src/locales/et/common.js
+++ b/frontend/src/locales/et/common.js
@@ -1358,6 +1358,9 @@ const TRANSLATIONS = {
export: "Экспорти руй чат kui...",
exporting: "Экспорт",
preset_img_description: "Loo pilt tekstist antud juhiste põhjal",
+ generating_response: "Vastus genereerimine",
+ response_failed: "Ei olnud võimalik vastata teatele.",
+ response_failed_reason: "põhjus: {{reason}}",
},
profile_settings: {
edit_account: "Muuda kontot",
diff --git a/frontend/src/locales/fa/common.js b/frontend/src/locales/fa/common.js
index 48e8647510e..4f4dfd25abc 100644
--- a/frontend/src/locales/fa/common.js
+++ b/frontend/src/locales/fa/common.js
@@ -1285,6 +1285,9 @@ const TRANSLATIONS = {
export: "صدور چت به صورت...",
exporting: "صدور به خارج",
preset_img_description: "ایجاد یک تصویر بر اساس یک دستور متنی",
+ generating_response: "تولید پاسخ",
+ response_failed: "امکان پاسخ دادن به پیام وجود نداشت.",
+ response_failed_reason: "دلیل: {{reason}}",
},
profile_settings: {
edit_account: "ویرایش حساب",
diff --git a/frontend/src/locales/fr/common.js b/frontend/src/locales/fr/common.js
index 2dfc97dfcb9..4b46754ffab 100644
--- a/frontend/src/locales/fr/common.js
+++ b/frontend/src/locales/fr/common.js
@@ -1322,6 +1322,9 @@ const TRANSLATIONS = {
exporting: "Exportation...",
preset_img_description:
"Générer une image à partir d'une requête textuelle.",
+ generating_response: "Générer une réponse",
+ response_failed: "Impossible de répondre au message.",
+ response_failed_reason: "Raison : {{reason}}",
},
profile_settings: {
edit_account: "Modifier le compte",
diff --git a/frontend/src/locales/he/common.js b/frontend/src/locales/he/common.js
index 2e307050d17..d00ef86ba22 100644
--- a/frontend/src/locales/he/common.js
+++ b/frontend/src/locales/he/common.js
@@ -1345,6 +1345,9 @@ const TRANSLATIONS = {
export: "ייצוא צ'אט כ...",
exporting: "ייצוא...",
preset_img_description: "יצירת תמונה על סמך הנחיה טקסטואלית",
+ generating_response: "יצירת תגובה",
+ response_failed: "לא ניתן להגיב למסר.",
+ response_failed_reason: "סיבה: {{reason}}",
},
profile_settings: {
edit_account: "ערוך חשבון",
diff --git a/frontend/src/locales/hr/common.js b/frontend/src/locales/hr/common.js
index 5ad2791b0ad..5f497c1a682 100644
--- a/frontend/src/locales/hr/common.js
+++ b/frontend/src/locales/hr/common.js
@@ -1665,6 +1665,9 @@ const TRANSLATIONS = {
},
},
preset_img_description: "Generiraj sliku na temelju tekstualnog uputa.",
+ generating_response: "Generiranje odgovora",
+ response_failed: "Nije moguće odgovoriti na poruku.",
+ response_failed_reason: "Razlog: {{reason}}",
},
profile_settings: {
edit_account: "Uredi račun",
diff --git a/frontend/src/locales/id/common.js b/frontend/src/locales/id/common.js
index 9ad3de4335a..a06ac857956 100644
--- a/frontend/src/locales/id/common.js
+++ b/frontend/src/locales/id/common.js
@@ -1661,6 +1661,9 @@ const TRANSLATIONS = {
},
},
preset_img_description: "Hasilkan gambar berdasarkan teks yang diberikan.",
+ generating_response: "Menghasilkan respons",
+ response_failed: "Tidak dapat membalas pesan tersebut.",
+ response_failed_reason: "Alasan: {{reason}}",
},
profile_settings: {
edit_account: "Edit Akun",
diff --git a/frontend/src/locales/it/common.js b/frontend/src/locales/it/common.js
index 3cd118e19a3..95837a01331 100644
--- a/frontend/src/locales/it/common.js
+++ b/frontend/src/locales/it/common.js
@@ -1324,6 +1324,9 @@ const TRANSLATIONS = {
export: "Esporta la conversazione come...",
exporting: "Esportazione...",
preset_img_description: "Genera un'immagine a partire da un testo",
+ generating_response: "Generare una risposta",
+ response_failed: "Non è stato possibile rispondere al messaggio.",
+ response_failed_reason: "Motivo: {{reason}}",
},
profile_settings: {
edit_account: "Modifica account",
diff --git a/frontend/src/locales/ja/common.js b/frontend/src/locales/ja/common.js
index 265b350602c..f3d35bca4fc 100644
--- a/frontend/src/locales/ja/common.js
+++ b/frontend/src/locales/ja/common.js
@@ -1276,6 +1276,9 @@ const TRANSLATIONS = {
export: "チャットを以下のような形式でエクスポートする:",
exporting: "輸出…",
preset_img_description: "テキストプロンプトから画像を生成する。",
+ generating_response: "応答を生成する",
+ response_failed: "メッセージへの返信ができませんでした。",
+ response_failed_reason: "理由:{{reason}}",
},
profile_settings: {
edit_account: "アカウントを編集",
diff --git a/frontend/src/locales/ko/common.js b/frontend/src/locales/ko/common.js
index fd722a9d184..04b321a7ab3 100644
--- a/frontend/src/locales/ko/common.js
+++ b/frontend/src/locales/ko/common.js
@@ -1359,6 +1359,9 @@ const TRANSLATIONS = {
export: "채팅 내용을 다음 형식으로 내보내기:",
exporting: "수출 중…",
preset_img_description: "텍스트 프롬프트에서 이미지를 생성합니다.",
+ generating_response: "응답 생성",
+ response_failed: "메시지에 응답할 수 없었습니다.",
+ response_failed_reason: "이유: {{reason}}",
},
profile_settings: {
edit_account: "계정 정보 수정",
diff --git a/frontend/src/locales/lo/common.js b/frontend/src/locales/lo/common.js
index dbcd91cf00b..51cd755f69a 100644
--- a/frontend/src/locales/lo/common.js
+++ b/frontend/src/locales/lo/common.js
@@ -1579,6 +1579,9 @@ const TRANSLATIONS = {
},
},
preset_img_description: "ຈາກຂໍ້ຄວາມ ໃຫ້ສ້າງຮູບພາບ",
+ generating_response: "ຜົນການຕອບ",
+ response_failed: "ສາมาถ ප්රතිສະໜອງ ຂໍ້ຄວາມ ໄດ້",
+ response_failed_reason: "ສາเหตุ: {{reason}}",
},
profile_settings: {
edit_account: "ແກ້ໄຂບັນຊີ",
diff --git a/frontend/src/locales/lt/common.js b/frontend/src/locales/lt/common.js
index e09dc941445..aeed941c7aa 100644
--- a/frontend/src/locales/lt/common.js
+++ b/frontend/src/locales/lt/common.js
@@ -1422,6 +1422,9 @@ const TRANSLATIONS = {
export: "Eksporteri pokalbį kaip…",
exporting: "Eksporteris...",
preset_img_description: "Sukurkite vaizdą iš teksto instrukcijos",
+ generating_response: "Sukurti atsakymą",
+ response_failed: "Nepavyko atsakyti į pranešimą.",
+ response_failed_reason: "Priežastis: {{reason}}",
},
profile_settings: {
edit_account: "Redaguoti paskyrą",
diff --git a/frontend/src/locales/lv/common.js b/frontend/src/locales/lv/common.js
index 7818c15af93..1da5214dcb1 100644
--- a/frontend/src/locales/lv/common.js
+++ b/frontend/src/locales/lv/common.js
@@ -1402,6 +1402,9 @@ const TRANSLATIONS = {
export: "Eksportēt čatu kā...",
exporting: "Eksporteris…",
preset_img_description: "Izveidot attēlu no teksta norādījuma",
+ generating_response: "Atbildes izveide",
+ response_failed: "Neizdevās atbildēt uz ziņojumu.",
+ response_failed_reason: "Iemesls: {{reason}}",
},
profile_settings: {
edit_account: "Rediģēt kontu",
diff --git a/frontend/src/locales/nl/common.js b/frontend/src/locales/nl/common.js
index 10f48daf73a..08b53572dfc 100644
--- a/frontend/src/locales/nl/common.js
+++ b/frontend/src/locales/nl/common.js
@@ -1305,6 +1305,9 @@ const TRANSLATIONS = {
exporting: "Exporteren...",
preset_img_description:
"Genereer een afbeelding op basis van een tekstuele instructie.",
+ generating_response: "Antwoord genereren",
+ response_failed: "Kon de bericht niet beantwoorden.",
+ response_failed_reason: "Reden: {{reason}}",
},
profile_settings: {
edit_account: "Account bewerken",
diff --git a/frontend/src/locales/pl/common.js b/frontend/src/locales/pl/common.js
index d2238e94ee6..afebd89ff3b 100644
--- a/frontend/src/locales/pl/common.js
+++ b/frontend/src/locales/pl/common.js
@@ -1409,6 +1409,9 @@ const TRANSLATIONS = {
export: "Eksportuj czat jako…",
exporting: "Eksportowanie...",
preset_img_description: "Wygeneruj obraz na podstawie tekstu",
+ generating_response: "Generowanie odpowiedzi",
+ response_failed: "Nie udało się odpowiedzieć na wiadomość.",
+ response_failed_reason: "Powód: {{reason}}",
},
profile_settings: {
edit_account: "Edytuj konto",
diff --git a/frontend/src/locales/pt_BR/common.js b/frontend/src/locales/pt_BR/common.js
index aac8192dd62..d0276ecc272 100644
--- a/frontend/src/locales/pt_BR/common.js
+++ b/frontend/src/locales/pt_BR/common.js
@@ -1392,6 +1392,9 @@ const TRANSLATIONS = {
export: "Exporte a conversa como...",
exporting: "Exportando...",
preset_img_description: "Gerar uma imagem a partir de um texto",
+ generating_response: "Gerando resposta",
+ response_failed: "Não foi possível responder à mensagem.",
+ response_failed_reason: "Motivo: {{reason}}",
},
profile_settings: {
edit_account: "Editar conta",
diff --git a/frontend/src/locales/ro/common.js b/frontend/src/locales/ro/common.js
index 8d6c35345e4..8144524fde1 100644
--- a/frontend/src/locales/ro/common.js
+++ b/frontend/src/locales/ro/common.js
@@ -668,6 +668,9 @@ const TRANSLATIONS = {
export: "Exportați conversația sub forma de...",
exporting: "Exportare...",
preset_img_description: "Generați o imagine pe baza unui text.",
+ generating_response: "Generarea răspunsului",
+ response_failed: "Nu am putut răspunde la mesaj.",
+ response_failed_reason: "Motiv: {{reason}}",
},
profile_settings: {
edit_account: "Editează contul",
diff --git a/frontend/src/locales/ru/common.js b/frontend/src/locales/ru/common.js
index 1ea83372246..a2f7ddb525b 100644
--- a/frontend/src/locales/ru/common.js
+++ b/frontend/src/locales/ru/common.js
@@ -1313,6 +1313,9 @@ const TRANSLATIONS = {
export: "Экспортировать чат в формате…",
exporting: "Экспорт...",
preset_img_description: "Создать изображение на основе текстового запроса",
+ generating_response: "Формирование ответа",
+ response_failed: "Не удалось ответить на сообщение.",
+ response_failed_reason: "Причина: {{reason}}",
},
profile_settings: {
edit_account: "Редактировать учётную запись",
diff --git a/frontend/src/locales/tr/common.js b/frontend/src/locales/tr/common.js
index 23262ec8d27..c5da3c9b54b 100644
--- a/frontend/src/locales/tr/common.js
+++ b/frontend/src/locales/tr/common.js
@@ -1306,6 +1306,9 @@ const TRANSLATIONS = {
export: "Çat sohbetini şu şekilde dışa aktar:",
exporting: "Dışarıya satışı yapma...",
preset_img_description: "Bir metin isteminden bir görüntü oluşturun",
+ generating_response: "Yanıt üretme",
+ response_failed: "Mesaja cevap veremedim.",
+ response_failed_reason: "Nedeni: {{reason}}",
},
profile_settings: {
edit_account: "Hesabı Düzenle",
diff --git a/frontend/src/locales/vn/common.js b/frontend/src/locales/vn/common.js
index 36e00c5c046..2e5d653b859 100644
--- a/frontend/src/locales/vn/common.js
+++ b/frontend/src/locales/vn/common.js
@@ -1290,6 +1290,9 @@ const TRANSLATIONS = {
export: "Xuất trò chuyện dưới dạng...",
exporting: "Xuất khẩu...",
preset_img_description: "Tạo một hình ảnh từ một đoạn mô tả bằng văn bản.",
+ generating_response: "Tạo ra câu trả lời",
+ response_failed: "Không thể phản hồi tin nhắn.",
+ response_failed_reason: "Lý do: {{reason}}",
},
profile_settings: {
edit_account: "Chỉnh sửa Tài khoản",
diff --git a/frontend/src/locales/zh/common.js b/frontend/src/locales/zh/common.js
index 5e83dc31123..7802bd9f043 100644
--- a/frontend/src/locales/zh/common.js
+++ b/frontend/src/locales/zh/common.js
@@ -1301,6 +1301,9 @@ const TRANSLATIONS = {
export: "导出聊天记录为…",
exporting: "出口…",
preset_img_description: "根据文本提示生成图像。",
+ generating_response: "生成回复",
+ response_failed: "无法回复消息。",
+ response_failed_reason: "原因:{{reason}}",
},
profile_settings: {
edit_account: "编辑帐户",
diff --git a/frontend/src/locales/zh_TW/common.js b/frontend/src/locales/zh_TW/common.js
index 406790df868..e045a38dd63 100644
--- a/frontend/src/locales/zh_TW/common.js
+++ b/frontend/src/locales/zh_TW/common.js
@@ -1209,6 +1209,9 @@ const TRANSLATIONS = {
export: "匯出對話內容為…",
exporting: "出口...",
preset_img_description: "根據文字提示,生成圖像。",
+ generating_response: "產生回應",
+ response_failed: "無法回覆訊息。",
+ response_failed_reason: "原因:{{reason}}",
},
profile_settings: {
edit_account: "編輯帳戶",