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

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

@@ -506,6 +506,22 @@
     "show_error_detail": "Show error details"
     "show_error_detail": "Show error details"
   },
   },
   "modal_ai_assistant": {
   "modal_ai_assistant": {
+    "header": {
+      "update_assistant": "Update Assistant",
+      "add_new_assistant": "Add New Assistant"
+    },
+    "assistant_name_placeholder": "Enter assistant name",
+    "page_count": "{{count}} pages",
+    "memo": {
+      "title": "Assistant memo",
+      "optional": "Optional",
+      "placeholder": "You can display notes about content and usage",
+      "description": "The contents of the memo do not affect the assistant's processing."
+    },
+    "submit_button": {
+      "update_assistant": "Update Assistant",
+      "create_assistant": "Create Assistant"
+    },
     "edit_page_description": "Edit pages that the assistant can reference.<br> The assistant can reference up to {{limitLearnablePageCountPerAssistant}} pages including child pages.",
     "edit_page_description": "Edit pages that the assistant can reference.<br> The assistant can reference up to {{limitLearnablePageCountPerAssistant}} pages including child pages.",
     "default_instruction": "You are the knowledge assistant for this Wiki. Please provide support according to the following guidelines:\n\n- Analyze document relevance and connect information\n- Suggest new perspectives\n- Provide accurate information based on understanding the intent of questions\nI will provide information in a structured format when necessary.",
     "default_instruction": "You are the knowledge assistant for this Wiki. Please provide support according to the following guidelines:\n\n- Analyze document relevance and connect information\n- Suggest new perspectives\n- Provide accurate information based on understanding the intent of questions\nI will provide information in a structured format when necessary.",
     "page_mode_title": {
     "page_mode_title": {

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

@@ -489,6 +489,22 @@
     "selected_editable_revision": "Corps de page sélectionné (Modifiable)"
     "selected_editable_revision": "Corps de page sélectionné (Modifiable)"
   },
   },
   "sidebar_aichat": {
   "sidebar_aichat": {
+    "header": {
+      "update_assistant": "Mettre à jour l'assistant",
+      "add_new_assistant": "Ajouter un nouvel assistant"
+    },
+    "assistant_name_placeholder": "Entrer le nom de l'assistant",
+    "page_count": "{{count}} pages",
+    "memo": {
+      "title": "Note sur l'assistant",
+      "optional": "Optionnel",
+      "placeholder": "Vous pouvez afficher des notes sur le contenu et l'utilisation",
+      "description": "Le contenu de la note n'affecte pas le traitement de l'assistant."
+    },
+    "submit_button": {
+      "update_assistant": "Mettre à jour l'assistant",
+      "create_assistant": "Créer l'assistant"
+    },
     "placeholder": "Demandez-moi n'importe quoi.",
     "placeholder": "Demandez-moi n'importe quoi.",
     "summary_mode_label": "Mode résumé",
     "summary_mode_label": "Mode résumé",
     "summary_mode_help": "Réponse concise en 2-3 phrases",
     "summary_mode_help": "Réponse concise en 2-3 phrases",

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

@@ -539,6 +539,22 @@
     "show_error_detail": "詳細を表示"
     "show_error_detail": "詳細を表示"
   },
   },
   "modal_ai_assistant": {
   "modal_ai_assistant": {
+    "header": {
+      "update_assistant": "アシスタントの更新",
+      "add_new_assistant": "新規アシスタントの追加"
+    },
+    "assistant_name_placeholder": "アシスタント名を入力",
+    "page_count": "{{count}} ページ",
+    "memo": {
+      "title": "アシスタントのメモ",
+      "optional": "任意",
+      "placeholder": "内容や用途のメモを表示させることができます",
+      "description": "メモの内容はアシスタントの処理に影響しません。"
+    },
+    "submit_button": {
+      "update_assistant": "アシスタントを更新する",
+      "create_assistant": "アシスタントを作成する"
+    },
     "default_instruction": "あなたはこのWikiの知識アシスタントです。以下の方針で支援を行ってください:\n\n- 文書の関連性分析と情報の関連付け\n- 新しい視点の提案\n- 質問の意図を理解した的確な情報提供 必要に応じて構造化された形式で情報を提供します。",
     "default_instruction": "あなたはこのWikiの知識アシスタントです。以下の方針で支援を行ってください:\n\n- 文書の関連性分析と情報の関連付け\n- 新しい視点の提案\n- 質問の意図を理解した的確な情報提供 必要に応じて構造化された形式で情報を提供します。",
     "edit_page_description": " アシスタントが参照するページを編集します。<br> 参照できるページは配下ページも含めて {{limitLearnablePageCountPerAssistant}} ページまでです。",
     "edit_page_description": " アシスタントが参照するページを編集します。<br> 参照できるページは配下ページも含めて {{limitLearnablePageCountPerAssistant}} ページまでです。",
     "page_mode_title": {
     "page_mode_title": {

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

@@ -496,6 +496,22 @@
     "show_error_detail": "显示详情"
     "show_error_detail": "显示详情"
   },
   },
   "modal_ai_assistant": {
   "modal_ai_assistant": {
+    "header": {
+      "update_assistant": "更新助手",
+      "add_new_assistant": "添加新助手"
+    },
+    "assistant_name_placeholder": "输入助手名称",
+    "page_count": "{{count}} 页",
+    "memo": {
+      "title": "助手备忘录",
+      "optional": "可选",
+      "placeholder": "您可以显示关于内容和用途的备注",
+      "description": "备忘录的内容不会影响助手的处理。"
+    },
+    "submit_button": {
+      "update_assistant": "更新助手",
+      "create_assistant": "创建助手"
+    },
     "edit_page_description": "编辑助手可以参考的页面。<br> 助手可以参考最多 {{limitLearnablePageCountPerAssistant}} 个页面,包括子页面。",
     "edit_page_description": "编辑助手可以参考的页面。<br> 助手可以参考最多 {{limitLearnablePageCountPerAssistant}} 个页面,包括子页面。",
     "default_instruction": "您是这个Wiki的知识助手。请按照以下方针提供支持:\n\n- 分析文档相关性并连接信息\n- 提出新的观点\n- 理解问题意图并提供准确信息\n必要时我会以结构化的形式提供信息。",
     "default_instruction": "您是这个Wiki的知识助手。请按照以下方针提供支持:\n\n- 分析文档相关性并连接信息\n- 提出新的观点\n- 理解问题意图并提供准确信息\n必要时我会以结构化的形式提供信息。",
     "page_mode_title": {
     "page_mode_title": {

+ 9 - 9
apps/app/src/features/openai/client/components/AiAssistant/AiAssistantManagementModal/AiAssistantManagementHome.tsx

@@ -116,7 +116,7 @@ export const AiAssistantManagementHome = (props: Props): JSX.Element => {
     <>
     <>
       <ModalHeader tag="h4" toggle={closeAiAssistantManagementModal} className="pe-4">
       <ModalHeader tag="h4" toggle={closeAiAssistantManagementModal} className="pe-4">
         <span className="growi-custom-icons growi-ai-assistant-icon me-3 fs-4">ai_assistant</span>
         <span className="growi-custom-icons growi-ai-assistant-icon me-3 fs-4">ai_assistant</span>
-        <span className="fw-bold">{t(shouldEdit ? 'アシスタントの更新' : '新規アシスタントの追加')}</span> {/* TODO i18n */}
+        <span className="fw-bold">{t(shouldEdit ? 'modal_ai_assistant.header.update_assistant' : 'modal_ai_assistant.header.add_new_assistant')}</span>
       </ModalHeader>
       </ModalHeader>
 
 
       <div className="px-4">
       <div className="px-4">
@@ -124,7 +124,7 @@ export const AiAssistantManagementHome = (props: Props): JSX.Element => {
           <div className="mb-4 growi-ai-assistant-name">
           <div className="mb-4 growi-ai-assistant-name">
             <Input
             <Input
               type="text"
               type="text"
-              placeholder="アシスタント名を入力"
+              placeholder={t('modal_ai_assistant.assistant_name_placeholder')}
               bsSize="lg"
               bsSize="lg"
               className="border-0 border-bottom border-2 px-0 rounded-0"
               className="border-0 border-bottom border-2 px-0 rounded-0"
               value={name}
               value={name}
@@ -134,18 +134,18 @@ export const AiAssistantManagementHome = (props: Props): JSX.Element => {
 
 
           <div className="mb-4">
           <div className="mb-4">
             <div className="d-flex align-items-center mb-2">
             <div className="d-flex align-items-center mb-2">
-              <span className="text-secondary">アシスタントのメモ</span>
-              <span className="badge text-bg-secondary ms-2">任意</span>
+              <span className="text-secondary">{t('modal_ai_assistant.memo.title')}</span>
+              <span className="badge text-bg-secondary ms-2">{t('modal_ai_assistant.memo.optional')}</span>
             </div>
             </div>
             <Input
             <Input
               type="textarea"
               type="textarea"
-              placeholder="内容や用途のメモを表示させることができます"
+              placeholder={t('modal_ai_assistant.memo.placeholder')}
               rows="4"
               rows="4"
               value={description}
               value={description}
               onChange={e => onDescriptionChange(e.target.value)}
               onChange={e => onDescriptionChange(e.target.value)}
             />
             />
             <small className="text-secondary d-block mt-2">
             <small className="text-secondary d-block mt-2">
-              メモの内容はアシスタントの処理に影響しません。
+              {t('modal_ai_assistant.memo.description')}
             </small>
             </small>
           </div>
           </div>
 
 
@@ -169,7 +169,7 @@ export const AiAssistantManagementHome = (props: Props): JSX.Element => {
             >
             >
               <span className="fw-normal">{t('modal_ai_assistant.page_mode_title.pages')}</span>
               <span className="fw-normal">{t('modal_ai_assistant.page_mode_title.pages')}</span>
               <div className="d-flex align-items-center text-secondary">
               <div className="d-flex align-items-center text-secondary">
-                <span>{`${totalSelectedPageCount} ページ`}</span>
+                <span>{t('modal_ai_assistant.page_count', { count: totalSelectedPageCount })}</span>
                 <span className="material-symbols-outlined ms-2 align-middle">chevron_right</span>
                 <span className="material-symbols-outlined ms-2 align-middle">chevron_right</span>
               </div>
               </div>
             </button>
             </button>
@@ -196,7 +196,7 @@ export const AiAssistantManagementHome = (props: Props): JSX.Element => {
             className="btn btn-outline-secondary"
             className="btn btn-outline-secondary"
             onClick={closeAiAssistantManagementModal}
             onClick={closeAiAssistantManagementModal}
           >
           >
-            キャンセル
+            {t('Cancel')}
           </button>
           </button>
 
 
           <button
           <button
@@ -205,7 +205,7 @@ export const AiAssistantManagementHome = (props: Props): JSX.Element => {
             className="btn btn-primary"
             className="btn btn-primary"
             onClick={upsertAiAssistantHandler}
             onClick={upsertAiAssistantHandler}
           >
           >
-            {t(shouldEdit ? 'アシスタントを更新する' : 'アシスタントを作成する')}
+            {t(shouldEdit ? 'modal_ai_assistant.submit_button.update_assistant' : 'modal_ai_assistant.submit_button.create_assistant')}
           </button>
           </button>
         </ModalFooter>
         </ModalFooter>
       </div>
       </div>