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

Merge pull request #947 from weseek/i18n-data-import-page

i18n
Yuki Takei 6 лет назад
Родитель
Сommit
2bde667f47

+ 10 - 1
resource/locales/en-US/translation.json

@@ -13,11 +13,17 @@
   "Cancel": "Cancel",
   "Create": "Create",
   "Admin": "Admin",
+  "Tag": "Tag",
   "Tags": "Tags",
   "New": "New",
   "Shortcuts": "Shortcuts",
   "eg": "e.g.",
   "Undo": "Undo",
+  "Article": "Article",
+  "Page": "Page",
+  "Page Path": "Page Path",
+  "Category": "Category",
+  "User": "User",
 
   "Update": "Update",
   "Update Page": "Update Page",
@@ -81,6 +87,7 @@
   "Disclose E-mail": "Disclose E-mail",
 
   "page exists": "this page already exists",
+  "Error occurred": "Error occurred",
 
   "Create today's": "Create today's ...",
   "Memo": "memo",
@@ -675,6 +682,8 @@
       "access_token": "Access token",
       "test_connection": "Test connection to qiita:team"
     },
-    "import": "Import"
+    "import": "Import",
+    "page_skip": "Pages with a name that already exists on GROWI are not imported",
+    "Directory_hierarchy_tag": "Directory Hierarchy Tag"
   }
 }

+ 10 - 1
resource/locales/ja/translation.json

@@ -13,11 +13,17 @@
   "Cancel": "キャンセル",
   "Create": "作成",
   "Admin": "管理",
+  "Tag": "タグ",
   "Tags": "タグ",
   "New": "作成",
   "Shortcuts": "ショートカット",
   "eg": "例:",
   "Undo": "元に戻す",
+  "Article": "記事",
+  "Page": "ページ",
+  "Page Path": "ページパス",
+  "Category": "カテゴリー",
+  "User": "ユーザー",
 
   "Update": "更新",
   "Update Page": "ページを更新",
@@ -79,6 +85,7 @@
   "Disclose E-mail": "メールアドレスの公開",
 
   "page exists": "このページはすでに存在しています",
+  "Error occurred":"エラーが発生しました",
 
   "Create today's": "今日の◯◯を作成",
   "Memo": "メモ",
@@ -704,6 +711,8 @@
       "access_token": "アクセストークン",
       "test_connection": "接続テスト"
     },
-    "import": "インポート"
+    "import": "インポート",
+    "page_skip": "既に GROWI 側に同名のページが存在する場合、そのページはスキップされます",
+    "Directory_hierarchy_tag": "ディレクトリ階層タグ"
   }
 }

+ 16 - 16
src/server/views/admin/importer.html

@@ -41,7 +41,7 @@
 
       <!-- esa Importer management forms -->
       <form action="/_api/admin/settings/importerEsa" method="post" class="form-horizontal" id="importerSettingFormEsa" role="form"
-          data-success-messaage="更新しました">
+          data-success-messaage="{{ ('Updated') }}">
         <fieldset>
           <legend>{{ t('importer_management.import_from', 'esa.io') }}</legend>
           <table class="table table-bordered table-mapping">
@@ -54,17 +54,17 @@
             </thead>
             <tbody>
               <tr>
-                <th>記事</th>
+                <th>{{ t('Article') }}</th>
                 <th><i class="icon-arrow-right-circle text-success"></i></th>
-                <th>ページ</th>
+                <th>{{ t('Page') }}</th>
               </tr>
               <tr>
-                <th>カテゴリー</th>
+                <th>{{ t('Category') }}</th>
                 <th><i class="icon-arrow-right-circle text-success"></i></th>
-                <th>ページパス</th>
+                <th>{{ t('Page Path') }}</th>
               </tr>
               <tr>
-                <th>ユーザー</th>
+                <th>{{ t('User') }}</th>
                 <th></th>
                 <th>(TBD)</th>
               </tr>
@@ -72,7 +72,7 @@
           </table>
           <div class="well well-sm mb-0 small">
             <ul>
-              <li>既に GROWI 側に同名のページが存在する場合、そのページはスキップされます</li>
+              <li>{{ t("importer_management.page_skip") }}</li>
             </ul>
           </div>
           <div class="form-group">
@@ -114,7 +114,7 @@
 
       <!-- qiita:team Importer management forms -->
       <form action="/_api/admin/settings/importerQiita" method="post" class="form-horizontal mt-5" id="importerSettingFormQiita" role="form"
-          data-success-messaage="更新しました">
+          data-success-messaage="Updated">
         <fieldset>
           <legend>{{ t('importer_management.import_from', 'Qiita:Team') }}</legend>
           <table class="table table-bordered table-mapping">
@@ -127,22 +127,22 @@
             </thead>
             <tbody>
               <tr>
-                <th>記事</th>
+                <th>{{ t('Article') }}</th>
                 <th><i class="icon-arrow-right-circle text-success"></i></th>
-                <th>ページ</th>
+                <th>{{ t('Page') }}</th>
               </tr>
               <tr>
-                <th>タグ</th>
+                <th>{{ t('Tag')}}</th>
                 <th></th>
                 <th>-</th>
               </tr>
               <tr>
-                <th>ディレクトリ階層タグ</th>
+                <th>{{ t("importer_management.Directory_hierarchy_tag") }}</th>
                 <th></th>
                 <th>(TBD)</th>
               </tr>
               <tr>
-                <th>ユーザー</th>
+                <th>{{ t('User') }}</th>
                 <th></th>
                 <th>(TBD)</th>
               </tr>
@@ -150,7 +150,7 @@
           </table>
           <div class="well well-sm mb-0 small">
             <ul>
-              <li>既に GROWI 側に同名のページが存在する場合、そのページはスキップされます</li>
+              <li>{{ t("importer_management.page_skip") }}</li>
             </ul>
           </div>
           <div class="form-group">
@@ -223,7 +223,7 @@
   /**
    * Post form data and process UI
    */
-  function postData(form, button, action, success_msg = "成功しました", error_msg = "エラーが発生しました") {
+  function postData(form, button, action, success_msg = "Success", error_msg = " {{ t('Error occurred') }} " ) {
     var id = form.attr('id');
     button.attr('disabled', 'disabled');
     var jqxhr = $.post(action, form.serialize(), function(data)
@@ -236,7 +236,7 @@
         }
       })
       .fail(function() {
-        showMessage(id, "エラーが発生しました", 'danger');
+        showMessage(id, "{{ t('Error occurred') }}", 'danger');
       })
       .always(function() {
         button.prop('disabled', false);