satof3 пре 1 година
родитељ
комит
a40cf4f4e7

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

@@ -565,6 +565,16 @@
       "reset_to_default": "Reset to default"
     }
   },
+  "share_scope_warning_modal": {
+    "header_title": "Confirm Sharing Scope",
+    "warning_message": "This assistant includes pages with limited access.<br>With the current settings, information from these pages may be shared beyond their original access permissions through the assistant.",
+    "selected_pages_label": "Selected page paths",
+    "confirmation_message": "Please confirm that you understand the content of these pages may be shared within the assistant's public scope if you proceed.",
+    "button": {
+      "review": "Review settings",
+      "proceed": "Understand and proceed"
+    }
+  },
   "ai_assistant_tree": {
     "add_assistant": "Add Assistant",
     "my_assistants": "My Assistants",

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

@@ -560,6 +560,16 @@
       "reset_to_default": "Réinitialiser par défaut"
     }
   },
+  "share_scope_warning_modal": {
+    "header_title": "Confirmation de la portée de partage",
+    "warning_message": "Cet assistant comprend des pages à accès limité.<br>Avec les paramètres actuels, les informations de ces pages peuvent être partagées au-delà de leurs autorisations d'accès d'origine via l'assistant.",
+    "selected_pages_label": "Chemins de pages sélectionnés",
+    "confirmation_message": "Veuillez confirmer que vous comprenez que le contenu de ces pages peut être partagé dans la portée publique de l'assistant si vous continuez.",
+    "button": {
+      "review": "Réviser les paramètres",
+      "proceed": "Comprendre et continuer"
+    }
+  },
  "ai_assistant_tree": {
     "add_assistant": "Ajouter un assistant",
     "my_assistants": "Mes assistants",

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

@@ -598,6 +598,16 @@
       "reset_to_default": "デフォルトに戻す"
     }
   },
+  "share_scope_warning_modal": {
+    "header_title": "共有範囲の確認",
+    "warning_message": "このアシスタントには限定公開されているページが含まれています。<br />現在の設定では、アシスタントを通じてこれらのページの情報が、本来のアクセス権限を超えて共有される可能性があります。",
+    "selected_pages_label": "選択されているページパス",
+    "confirmation_message": "続行する場合、これらのページの内容がアシスタントの公開範囲内で共有される可能性があることを確認してください。",
+    "button": {
+      "review": "設定を見直す",
+      "proceed": "理解して続行する"
+    }
+  },
   "ai_assistant_tree": {
     "add_assistant": "アシスタントを追加する",
     "my_assistants": "マイアシスタント",

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

@@ -555,6 +555,16 @@
       "reset_to_default": "恢复默认设置"
     }
   },
+  "share_scope_warning_modal": {
+    "header_title": "确认共享范围",
+    "warning_message": "此助手包含访问受限的页面。<br>使用当前设置,这些页面的信息可能通过助手超出其原始访问权限范围进行共享。",
+    "selected_pages_label": "已选择的页面路径",
+    "confirmation_message": "如果继续,请确认您了解这些页面的内容可能会在助手的公开范围内共享。",
+    "button": {
+      "review": "重新检查设置",
+      "proceed": "了解并继续"
+    }
+  },
   "ai_assistant_tree": {
     "add_assistant": "添加助手",
     "my_assistants": "我的助手",

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

@@ -1,5 +1,6 @@
 import React, { useCallback } from 'react';
 
+import { useTranslation } from 'react-i18next';
 import {
   Modal, ModalHeader, ModalBody, ModalFooter,
 } from 'reactstrap';
@@ -21,6 +22,8 @@ export const ShareScopeWarningModal = (props: Props): JSX.Element => {
     onSubmit,
   } = props;
 
+  const { t } = useTranslation();
+
   const upsertAiAssistantHandler = useCallback(() => {
     closeModal();
     onSubmit();
@@ -31,18 +34,19 @@ export const ShareScopeWarningModal = (props: Props): JSX.Element => {
       <ModalHeader toggle={closeModal}>
         <div className="d-flex align-items-center">
           <span className="material-symbols-outlined text-warning me-2 fs-4">warning</span>
-          <span className="text-warning fw-bold">共有範囲の確認</span>
+          <span className="text-warning fw-bold">{t('share_scope_warning_modal.header_title')}</span>
         </div>
       </ModalHeader>
 
       <ModalBody className="py-4 px-4">
-        <p className="mb-4">
-          このアシスタントには限定公開されているページが含まれています。<br />
-          現在の設定では、アシスタントを通じてこれらのページの情報が、本来のアクセス権限を超えて共有される可能性があります。
-        </p>
+        <p
+          className="mb-4"
+          // eslint-disable-next-line react/no-danger
+          dangerouslySetInnerHTML={{ __html: t('share_scope_warning_modal.warning_message') }}
+        />
 
         <div className="mb-4">
-          <p className="mb-2 text-secondary">選択されているページパス</p>
+          <p className="mb-2 text-secondary">{t('share_scope_warning_modal.selected_pages_label')}</p>
           {selectedPages.map(selectedPage => (
             <code key={selectedPage.page.path}>
               {selectedPage.page.path}
@@ -51,7 +55,7 @@ export const ShareScopeWarningModal = (props: Props): JSX.Element => {
         </div>
 
         <p>
-          続行する場合、これらのページの内容がアシスタントの公開範囲内で共有される可能性があることを確認してください。
+          {t('share_scope_warning_modal.confirmation_message')}
         </p>
       </ModalBody>
 
@@ -61,7 +65,7 @@ export const ShareScopeWarningModal = (props: Props): JSX.Element => {
           className="btn btn-outline-secondary"
           onClick={closeModal}
         >
-          設定を見直す
+          {t('share_scope_warning_modal.button.review')}
         </button>
 
         <button
@@ -69,7 +73,7 @@ export const ShareScopeWarningModal = (props: Props): JSX.Element => {
           className="btn btn-warning"
           onClick={upsertAiAssistantHandler}
         >
-          理解して続行する
+          {t('share_scope_warning_modal.button.proceed')}
         </button>
       </ModalFooter>
     </Modal>