Taichi Masuyama 4 лет назад
Родитель
Сommit
6f816b04a5

+ 7 - 0
packages/app/resource/locales/en_US/translation.json

@@ -653,6 +653,13 @@
       "convert_recursively_label": "Convert child pages recursively.",
       "convert_recursively_desc": "Convert pages under this path recursively.",
       "button_label": "Convert"
+    },
+    "by_path_modal": {
+      "title": "Convert to new v5 compatible format",
+      "description": "Enter a path and all pages under that path will be converted to v5 compatible format.",
+      "button_label": "Convert",
+      "success": "Successfully requested conversion.",
+      "error": "Failed to request conversion."
     }
   },
   "security_setting": {

+ 7 - 0
packages/app/resource/locales/ja_JP/translation.json

@@ -652,6 +652,13 @@
       "convert_recursively_label": "再起的に変換",
       "convert_recursively_desc": "このページの配下のページを再起的に変換します",
       "button_label": "変換"
+    },
+    "by_path_modal": {
+      "title": "新しい v5 互換形式への変換",
+      "description": "パスを入力することで、そのパスの配下のページを全て v5 互換形式に変換します",
+      "button_label": "変換",
+      "success": "正常に変換を開始しました",
+      "error": "変換を開始できませんでした"
     }
   },
   "security_setting": {

+ 7 - 0
packages/app/resource/locales/zh_CN/translation.json

@@ -939,6 +939,13 @@
       "convert_recursively_label": "递归地转换子页面。",
       "convert_recursively_desc": "递归地转换该路径下的页面。",
       "button_label": "转换"
+    },
+    "by_path_modal": {
+      "title": "转换为新的v5兼容格式",
+      "description": "输入一个路径,该路径下的所有页面将被转换为v5兼容格式。",
+      "button_label": "转换",
+      "success": "成功地请求转换。",
+      "error": "请求转换失败。"
     }
   },
 	"to_cloud_settings": "進入 GROWI.cloud 的管理界面",

+ 5 - 8
packages/app/src/components/PrivateLegacyPages.tsx

@@ -141,17 +141,16 @@ const ConvertByPathModal = React.memo((props: ConvertByPathModalProps): JSX.Elem
   return (
     <Modal size="lg" isOpen={props.isOpen} toggle={props.close} className="grw-create-page">
       <ModalHeader tag="h4" toggle={props.close} className="bg-primary text-light">
-        { t('private_legacy_pages.modal.title') }
+        { t('private_legacy_pages.by_path_modal.title') }
       </ModalHeader>
       <ModalBody>
-        {/* TODO: i18n */}
-        <p>{t('modal_description')}</p>
+        <p>{t('private_legacy_pages.by_path_modal.description')}</p>
         <input type="text" className="form-control" placeholder="/" value={currentInput} onChange={e => setInput(e.target.value)} />
       </ModalBody>
       <ModalFooter>
         <button type="button" className="btn btn-primary" onSubmit={(e) => { e.preventDefault(); props.onSubmit?.(currentInput) }}>
           <i className="icon-fw icon-refresh" aria-hidden="true"></i>
-          { t('private_legacy_pages.modal.button_label') }
+          { t('private_legacy_pages.by_path_modal.button_label') }
         </button>
       </ModalFooter>
     </Modal>
@@ -396,12 +395,10 @@ const PrivateLegacyPages = (props: Props): JSX.Element => {
             await apiv3Post<void>('/pages/legacy-pages-migration', {
               convertPath,
             });
-            // TODO: i18n
-            toastSuccess(t('success_message'));
+            toastSuccess(t('private_legacy_pages.by_path_modal.success'));
           }
           catch {
-            // TODO: i18n
-            toastError(t('error_message'));
+            toastError(t('private_legacy_pages.by_path_modal.error'));
           }
         }}
       />