Browse Source

Change text content

Shun Miyazawa 1 year ago
parent
commit
8589133d33

+ 1 - 1
apps/app/public/static/locales/en_US/translation.json

@@ -491,7 +491,7 @@
     "placeholder": "Ask me anything.",
     "caution_against_hallucination": "Please verify the information and check the sources.",
     "progress_label": "Generating answers",
-    "thread_id_is_not_set": "Failed to generate thread"
+    "failed_to_create_or_retrieve_thread": "Failed to create or retrieve thread"
   },
   "link_edit": {
     "edit_link": "Edit Link",

+ 1 - 1
apps/app/public/static/locales/fr_FR/translation.json

@@ -485,7 +485,7 @@
     "placeholder": "Demandez-moi n'importe quoi.",
     "caution_against_hallucination": "Veuillez vérifier les informations et consulter les sources.",
     "progress_label": "Génération des réponses",
-    "thread_id_is_not_set": "Échec de la génération d'un fil de discussion"
+    "failed_to_create_or_retrieve_thread": "Échec de la création ou de la récupération du fil de discussion"
   },
   "link_edit": {
     "edit_link": "Modifier lien",

+ 1 - 1
apps/app/public/static/locales/ja_JP/translation.json

@@ -524,7 +524,7 @@
     "placeholder": "ききたいことを入力してください",
     "caution_against_hallucination": "情報が正しいか出典を確認しましょう",
     "progress_label": "回答を生成しています",
-    "thread_id_is_not_set": "スレッドの生成に失敗しました"
+    "failed_to_create_or_retrieve_thread": "スレッドの作成または取得に失敗しました"
   },
   "link_edit": {
     "edit_link": "リンク編集",

+ 1 - 1
apps/app/public/static/locales/zh_CN/translation.json

@@ -480,7 +480,7 @@
     "placeholder": "问我任何问题。",
     "caution_against_hallucination": "请核实信息并检查来源。",
     "progress_label": "生成答案中",
-    "thread_id_is_not_set": "生成线程失败"
+    "failed_to_create_or_retrieve_thread": "创建或获取线程失败"
   },
   "link_edit": {
     "edit_link": "Edit Link",

+ 3 - 2
apps/app/src/features/openai/chat/components/AiChatModal/AiChatModal.tsx

@@ -66,11 +66,12 @@ const AiChatModalSubstance = (): JSX.Element => {
       }
       catch (err) {
         logger.error(err.toString());
+        toastError(t('modal_aichat.failed_to_create_or_retrieve_thread'));
       }
     };
 
     createThread();
-  }, [threadId]);
+  }, [t, threadId]);
 
   const submit = useCallback(async(data: FormData) => {
     // do nothing when the assistant is generating an answer
@@ -113,7 +114,7 @@ const AiChatModalSubstance = (): JSX.Element => {
 
           const hasThreadIdNotSetError = resJson.errors.some(err => err.code === MessageErrorCode.THREAD_ID_IS_NOT_SET);
           if (hasThreadIdNotSetError) {
-            toastError(t('modal_aichat.thread_id_is_not_set'));
+            toastError(t('modal_aichat.failed_to_create_or_retrieve_thread'));
           }
         }
         setGeneratingAnswerMessage(undefined);