satof3 1 год назад
Родитель
Сommit
bd972fdafa

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

@@ -535,6 +535,10 @@
         "label": "Same as page access scope",
         "desc": "Shared with the same scope as page access"
       }
+    },
+    "instructions": {
+      "description": "You can set instructions that determine how the assistant behaves.<br />The assistant will answer and analyze based on these instructions.",
+      "reset_to_default": "Reset to default"
     }
   },
   "ai_assistant_tree": {

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

@@ -530,6 +530,10 @@
         "label": "Même portée que l'accès à la page",
         "desc": "Partagé avec la même portée que l'accès à la page"
       }
+    },
+    "instructions": {
+      "description": "Vous pouvez définir des instructions qui déterminent le comportement de l'assistant.<br />L'assistant répondra et analysera en fonction de ces instructions.",
+      "reset_to_default": "Réinitialiser par défaut"
     }
   },
  "ai_assistant_tree": {

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

@@ -568,6 +568,10 @@
         "label": "ページのアクセス権限と同じ範囲",
         "desc": "ページのアクセス権限と同じ範囲で共有されます"
       }
+    },
+    "instructions": {
+      "description": "アシスタントの振る舞いを決める指示文を設定できます。<br />この指示に従ってにアシスタントの回答や分析を行います。",
+      "reset_to_default": "デフォルトに戻す"
     }
   },
   "ai_assistant_tree": {

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

@@ -525,6 +525,10 @@
         "label": "与页面访问范围相同",
         "desc": "与页面访问范围相同的范围共享"
       }
+    },
+    "instructions": {
+      "description": "您可以设置决定助手行为的指令。<br />助手将根据这些指令进行回答和分析。",
+      "reset_to_default": "恢复默认设置"
     }
   },
   "ai_assistant_tree": {

+ 4 - 3
apps/app/src/features/openai/client/components/AiAssistant/AiAssistantManagementModal/AiAssistantManagementEditInstruction.tsx

@@ -1,3 +1,4 @@
+import { useTranslation } from 'react-i18next';
 import { ModalBody, Input } from 'reactstrap';
 
 import { AiAssistantManagementHeader } from './AiAssistantManagementHeader';
@@ -10,6 +11,7 @@ type Props = {
 
 export const AiAssistantManagementEditInstruction = (props: Props): JSX.Element => {
   const { instruction, onChange, onReset } = props;
+  const { t } = useTranslation();
 
   return (
     <>
@@ -17,8 +19,7 @@ export const AiAssistantManagementEditInstruction = (props: Props): JSX.Element
 
       <ModalBody className="px-4">
         <p className="text-secondary py-1">
-          アシスタントの振る舞いを決める指示文を設定できます。<br />
-          この指示に従ってにアシスタントの回答や分析を行います。
+          {t('modal_ai_assistant.instructions.description')}
         </p>
 
         <Input
@@ -31,7 +32,7 @@ export const AiAssistantManagementEditInstruction = (props: Props): JSX.Element
         />
 
         <button type="button" onClick={onReset} className="btn btn-outline-secondary btn-sm">
-          デフォルトに戻す
+          {t('modal_ai_assistant.instructions.reset_to_default')}
         </button>
       </ModalBody>
     </>