ryoji-s 2 лет назад
Родитель
Сommit
472364de5a

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

@@ -6,6 +6,7 @@
   "Reset": "Reset",
   "Sign out": "Logout",
   "New": "New",
+  "Delete": "Delete",
 
   "meta": {
     "display_name": "English"

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

@@ -820,5 +820,11 @@
     "tags_input": {
       "tag_name": "tag name"
     }
+  },
+  "delete_attachment_modal": {
+    "confirm_delete_attachment": "Delete attachment?"
+  },
+  "rich_attachment": {
+    "attachment_not_be_found": "The attachment could not be found"
   }
 }

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

@@ -6,6 +6,7 @@
   "Reset": "リセット",
   "Sign out": "ログアウト",
   "New": "作成",
+  "Delete": "削除",
   "meta": {
     "display_name": "日本語"
   },

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

@@ -853,5 +853,11 @@
     "tags_input": {
       "tag_name": "タグ名"
     }
+  },
+  "delete_attachment_modal": {
+    "confirm_delete_attachment": "アタッチメントを削除しますか?"
+  },
+  "rich_attachment": {
+    "attachment_not_be_found": "アタッチメントが見つかりません"
   }
 }

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

@@ -6,6 +6,7 @@
   "Reset": "重启",
 	"Sign out": "退出",
   "New": "新建",
+  "Delete": "删除",
 
   "meta": {
     "display_name": "简体中文"

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

@@ -823,5 +823,11 @@
     "tags_input": {
       "tag_name": "标签名称"
     }
+  },
+  "delete_attachment_modal": {
+    "confirm_delete_attachment": "你想删除一个附件吗?"
+  },
+  "rich_attachment": {
+    "attachment_not_be_found": "没有找到附件"
   }
 }

+ 5 - 3
apps/app/src/components/PageAttachment/DeleteAttachmentModal.tsx

@@ -4,6 +4,7 @@ import React, {
 
 import type { IUser } from '@growi/core';
 import { UserPicture } from '@growi/ui/dist/components/User/UserPicture';
+import { useTranslation } from 'next-i18next';
 import {
   Button, Modal, ModalHeader, ModalBody, ModalFooter,
 } from 'reactstrap';
@@ -26,6 +27,7 @@ export const DeleteAttachmentModal: React.FC = () => {
   const [deleting, setDeleting] = useState<boolean>(false);
   const [deleteError, setDeleteError] = useState<string>('');
 
+  const { t } = useTranslation();
   const { data: deleteAttachmentModal, close: closeDeleteAttachmentModal } = useDeleteAttachmentModal();
   const isOpen = deleteAttachmentModal?.isOpened;
   const attachment = deleteAttachmentModal?.attachment;
@@ -52,7 +54,7 @@ export const DeleteAttachmentModal: React.FC = () => {
     }
     catch (err) {
       setDeleting(false);
-      setDeleteError('Something went wrong.');
+      setDeleteError('Attachment could not be deleted.');
       toastError(err);
       logger.error(err);
     }
@@ -100,7 +102,7 @@ export const DeleteAttachmentModal: React.FC = () => {
       fade={false}
     >
       <ModalHeader tag="h4" toggle={toggleHandler} className="bg-danger text-light">
-        <span id="contained-modal-title-lg">Delete attachment?</span>
+        <span id="contained-modal-title-lg">{t('delete_attachment_modal.confirm_delete_attachment')}</span>
       </ModalHeader>
       <ModalBody>
         {attachmentFileFormat}
@@ -113,7 +115,7 @@ export const DeleteAttachmentModal: React.FC = () => {
           color="danger"
           onClick={onClickDeleteButtonHandler}
           disabled={deleting}
-        >Delete
+        >{t('commons:Delete')}
         </Button>
       </ModalFooter>
     </Modal>