yusuketk 5 лет назад
Родитель
Сommit
ab9b35418f

+ 17 - 0
resource/locales/en_US/translation.json

@@ -13,6 +13,7 @@
   "Unlinked": "Unlinked",
   "Like!": "Like!",
   "Seen by": "Seen by",
+  "Done": "Done",
   "Cancel": "Cancel",
   "Create": "Create",
   "Admin": "Admin",
@@ -396,6 +397,22 @@
       "Post": "Post"
     }
   },
+  "link_edit": {
+    "edit_link": "Edit Link",
+    "set_link_and_label": "Set link and label",
+    "link": "Link",
+    "placeholder_of_link_input": "Input page path or URL",
+    "label": "Label",
+    "path_format": "Path format",
+    "use_relative_path": "Use relative path",
+    "use_permanent_link": "Use permanent link",
+    "notation": "Notation",
+    "markdown": "Markdown",
+    "GROWI_original": "GROWI original",
+    "pukiwiki": "Pukiwiki",
+    "preview": "Preview",
+    "page_not_found_in_preview": "'{{path}}' is not a GROWI page."
+  },
   "toaster": {
     "update_successed": "Succeeded to update {{target}}",
     "initialize_successed": "Succeeded to initialize {{target}}",

+ 17 - 0
resource/locales/ja_JP/translation.json

@@ -13,6 +13,7 @@
   "Unlinked": "リダイレクト削除",
   "Like!": "いいね!",
   "Seen by": "見た人",
+  "Done": "完了",
   "Cancel": "キャンセル",
   "Create": "作成",
   "Admin": "管理",
@@ -398,6 +399,22 @@
       "Post": "投稿"
     }
   },
+  "link_edit": {
+    "edit_link": "リンク編集",
+    "set_link_and_label": "リンク情報",
+    "link": "リンク",
+    "placeholder_of_link_input": "ページパスまたはURLを入力してください",
+    "label": "ラベル",
+    "path_format": "ページパス設定",
+    "use_relative_path": "相対パスを使う",
+    "use_permanent_link": "パーマリンクを使う",
+    "notation": "リンクの形式",
+    "markdown": "マークダウン 記法",
+    "GROWI_original": "GROWI 独自記法",
+    "pukiwiki": "Pukiwiki 記法",
+    "preview": "プレビュー",
+    "page_not_found_in_preview": "'{{path}}' というページはありません。"
+  },
   "toaster": {
     "update_successed": "{{target}}を更新しました",
     "initialize_successed": "{{target}}を初期化しました",

+ 18 - 1
resource/locales/zh_CN/translation.json

@@ -14,7 +14,8 @@
 	"Unlinked": "Unlinked",
 	"Like!": "Like!",
 	"Seen by": "Seen by",
-	"Cancel": "取消",
+  "Done": "Done",
+  "Cancel": "取消",
 	"Create": "创建",
 	"Admin": "管理",
 	"administrator": "管理员",
@@ -376,6 +377,22 @@
 			"Post": "提交"
 		}
 	},
+  "link_edit": {
+    "edit_link": "Edit Link",
+    "set_link_and_label": "Set link and label",
+    "link": "Link",
+    "placeholder_of_link_input": "Input page path or URL",
+    "label": "Label",
+    "path_format": "Path format",
+    "use_relative_path": "Use relative path",
+    "use_permanent_link": "Use permanent link",
+    "notation": "Notation",
+    "markdown": "Markdown",
+    "GROWI_original": "GROWI original",
+    "pukiwiki": "Pukiwiki",
+    "preview": "Preview",
+    "page_not_found_in_preview": "'{{path}}' is not a GROWI page."
+  },
 	"toaster": {
 		"update_successed": "Succeeded to update {{target}}",
     "initialize_successed": "Succeeded to initialize {{target}}",

+ 14 - 14
src/client/js/components/PageEditor/LinkEditModal.jsx

@@ -170,7 +170,7 @@ class LinkEditModal extends React.PureComponent {
       }
     }
     else {
-      previewError = t('link_edit.page_not_found_in_preview', path);
+      previewError = t('link_edit.page_not_found_in_preview', { path });
     }
     this.setState({ markdown, previewError, permalink });
   }
@@ -288,18 +288,18 @@ class LinkEditModal extends React.PureComponent {
     const { t } = this.props;
     return (
       <>
-        <h3 className="grw-modal-head">{t('Set link and label')}</h3>
+        <h3 className="grw-modal-head">{t('link_edit.set_link_and_label')}</h3>
         <form className="form-group">
           <div className="form-gorup my-3">
             <div className="input-group flex-nowrap">
               <div className="input-group-prepend">
-                <span className="input-group-text">{t('link')}</span>
+                <span className="input-group-text">{t('link_edit.link')}</span>
               </div>
               <SearchTypeahead
                 onChange={this.handleChangeTypeahead}
                 onInputChange={this.handleChangeLinkInput}
                 inputName="link"
-                placeholder={t('Input page path or URL')}
+                placeholder={t('link_edit.placeholder_of_link_input')}
                 keywordOnInit={this.state.linkInputValue}
                 behaviorOfResetBtn="clear"
                 autoFocus
@@ -319,7 +319,7 @@ class LinkEditModal extends React.PureComponent {
           <div className="form-gorup my-3">
             <div className="input-group flex-nowrap">
               <div className="input-group-prepend">
-                <span className="input-group-text">label</span>
+                <span className="input-group-text">{t('link_edit.label')}</span>
               </div>
               <input
                 type="text"
@@ -343,7 +343,7 @@ class LinkEditModal extends React.PureComponent {
       <div className="card well pt-3">
         <form className="form-group mb-0">
           <div className="form-group row">
-            <label className="col-sm-3">{t('Path format')}</label>
+            <label className="col-sm-3">{t('link_edit.path_format')}</label>
             <div className="col-sm-9">
               <div className="custom-control custom-checkbox custom-checkbox-info custom-control-inline">
                 <input
@@ -355,7 +355,7 @@ class LinkEditModal extends React.PureComponent {
                   disabled={!this.state.linkInputValue.startsWith('/') || this.state.linkerType === Linker.types.growiLink}
                 />
                 <label className="custom-control-label" htmlFor="relativePath">
-                  {t('Use relative path')}
+                  {t('link_edit.use_relative_path')}
                 </label>
               </div>
               <div className="custom-control custom-checkbox custom-checkbox-info custom-control-inline">
@@ -368,13 +368,13 @@ class LinkEditModal extends React.PureComponent {
                   disabled={this.state.permalink === '' || this.state.linkerType === Linker.types.growiLink}
                 />
                 <label className="custom-control-label" htmlFor="permanentLink">
-                  {t('Use permanent link')}
+                  {t('link_edit.use_permanent_link')}
                 </label>
               </div>
             </div>
           </div>
           <div className="form-group row mb-0">
-            <label className="col-sm-3">Notation</label>
+            <label className="col-sm-3">{t('link_edit.notation')}</label>
             <div className="col-sm-9">
               <div className="custom-control custom-radio custom-control-inline">
                 <input
@@ -386,7 +386,7 @@ class LinkEditModal extends React.PureComponent {
                   onChange={e => this.handleSelecteLinkerType(e.target.value)}
                 />
                 <label className="custom-control-label" htmlFor="markdownType">
-                  Markdown
+                  {t('link_edit.markdown')}
                 </label>
               </div>
               <div className="custom-control custom-radio custom-control-inline">
@@ -399,7 +399,7 @@ class LinkEditModal extends React.PureComponent {
                   onChange={e => this.handleSelecteLinkerType(e.target.value)}
                 />
                 <label className="custom-control-label" htmlFor="growiType">
-                  {t('Growi original')}
+                  {t('link_edit.GROWI_original')}
                 </label>
               </div>
               {this.isApplyPukiwikiLikeLinkerPlugin && (
@@ -413,7 +413,7 @@ class LinkEditModal extends React.PureComponent {
                     onChange={e => this.handleSelecteLinkerType(e.target.value)}
                   />
                   <label className="custom-control-label" htmlFor="pukiwikiType">
-                    Pukiwiki
+                    {t('link_edit.pukiwiki')}
                   </label>
                 </div>
               )}
@@ -429,7 +429,7 @@ class LinkEditModal extends React.PureComponent {
     return (
       <Modal className="link-edit-modal" isOpen={this.state.show} toggle={this.cancel} size="lg" autoFocus={false}>
         <ModalHeader tag="h4" toggle={this.cancel} className="bg-primary text-light">
-          {t('Edit Links')}
+          {t('link_edit.edit_link')}
         </ModalHeader>
 
         <ModalBody className="container">
@@ -441,7 +441,7 @@ class LinkEditModal extends React.PureComponent {
           </div>
           <div className="row">
             <div className="col-12">
-              <h3 className="grw-modal-head">{t('Preview')}</h3>
+              <h3 className="grw-modal-head">{t('link_edit.preview')}</h3>
               {this.renderLinkPreview()}
             </div>
           </div>