Просмотр исходного кода

Merge branch 'feat/export-n-import-revision-4' into feat/export-n-import-revision-5

mizozobu 6 лет назад
Родитель
Сommit
045e507105

+ 14 - 0
resource/locales/en-US/translation.json

@@ -759,5 +759,19 @@
     "import": "Import",
     "page_skip": "Pages with a name that already exists on GROWI are not imported",
     "Directory_hierarchy_tag": "Directory Hierarchy Tag"
+  },
+
+  "export_management": {
+    "export_as_zip": "Export Data as Zip",
+    "check_all": "Check All",
+    "uncheck_all": "Uncheck All",
+    "export": "Export",
+    "file": "File",
+    "growi_version": "Growi Version",
+    "collections": "Collections",
+    "exported_at": "Exported At",
+    "export_menu": "Export Menu",
+    "download": "Download",
+    "delete": "Delete"
   }
 }

+ 14 - 0
resource/locales/ja/translation.json

@@ -742,5 +742,19 @@
     "import": "インポート",
     "page_skip": "既に GROWI 側に同名のページが存在する場合、そのページはスキップされます",
     "Directory_hierarchy_tag": "ディレクトリ階層タグ"
+  },
+
+  "export_management": {
+    "export_as_zip": "Zipファイルでエクスポート",
+    "check_all": "全てにチェックを付ける",
+    "uncheck_all": "全てからチェックを外す",
+    "export": "エクスポート",
+    "file": "ファイル名",
+    "growi_version": "Growi バージョン",
+    "collections": "コレクション",
+    "exported_at": "エクスポートされた時間",
+    "export_menu": "エクスポートメニュー",
+    "download": "ダウンロード",
+    "delete": "削除"
   }
 }

+ 3 - 1
src/client/js/components/Admin/Export/ExportPage.jsx

@@ -45,9 +45,11 @@ class ExportPage extends React.Component {
   }
 
   render() {
+    const { t } = this.props;
+
     return (
       <Fragment>
-        <h2>Export Data as Zip</h2>
+        <h2>{t('export_management.export_as_zip')}</h2>
         <ExportZipForm
           zipFileStats={this.state.zipFileStats}
           addZipFileStat={this.addZipFileStat}

+ 3 - 4
src/client/js/components/Admin/Export/ExportTableMenu.jsx

@@ -23,7 +23,6 @@ class ExportTableMenu extends React.Component {
   }
 
   render() {
-    // eslint-disable-next-line no-unused-vars
     const { t } = this.props;
 
     return (
@@ -32,15 +31,15 @@ class ExportTableMenu extends React.Component {
           <i className="icon-settings"></i> <span className="caret"></span>
         </button>
         <ul className="dropdown-menu" role="menu">
-          <li className="dropdown-header">Export Menu</li>
+          <li className="dropdown-header">{t('export_management.export_menu')}</li>
           <li>
             <a href={`/_api/v3/export/${this.props.fileName}`}>
-              <i className="icon-cloud-download" /> Download
+              <i className="icon-cloud-download" /> {t('export_management.download')}
             </a>
           </li>
           <li onClick={() => this.deleteZipFile(this.props.fileName)}>
             <a>
-              <i className="icon-trash" /> Delete
+              <span className="text-danger"><i className="icon-trash" /> {t('export_management.delete')}</span>
             </a>
           </li>
         </ul>

+ 4 - 4
src/client/js/components/Admin/Export/ExportZipForm.jsx

@@ -63,17 +63,17 @@ class ExportZipForm extends React.Component {
   }
 
   render() {
-    // const { t } = this.props;
+    const { t } = this.props;
 
     return (
       <form className="my-5" onSubmit={this.export}>
         <div className="row">
           <div className="col-sm-12">
             <button type="button" className="btn btn-sm btn-default mr-2" onClick={this.checkAll}>
-              <i className="fa fa-check-square-o"></i> Check All
+              <i className="fa fa-check-square-o"></i> {t('export_management.check_all')}
             </button>
             <button type="button" className="btn btn-sm btn-default mr-2" onClick={this.uncheckAll}>
-              <i className="fa fa-square-o"></i> Uncheck All
+              <i className="fa fa-square-o"></i> {t('export_management.uncheck_all')}
             </button>
           </div>
         </div>
@@ -99,7 +99,7 @@ class ExportZipForm extends React.Component {
         </div>
         <div className="row">
           <div className="col-sm-12 text-center">
-            <button type="submit" className="btn btn-sm btn-primary" disabled={!this.validateForm()}>Export</button>
+            <button type="submit" className="btn btn-sm btn-primary" disabled={!this.validateForm()}>{t('export_management.export')}</button>
           </div>
         </div>
       </form>

+ 4 - 4
src/client/js/components/Admin/Export/ZipFileTable.jsx

@@ -18,10 +18,10 @@ class ZipFileTable extends React.Component {
       <table className="table table-bordered">
         <thead>
           <tr>
-            <th>File</th>
-            <th>Growi Version</th>
-            <th>Collections</th>
-            <th>Exported At</th>
+            <th>{t('export_management.file')}</th>
+            <th>{t('export_management.growi_version')}</th>
+            <th>{t('export_management.collections')}</th>
+            <th>{t('export_management.exported_at')}</th>
             <th></th>
           </tr>
         </thead>