Explorar el Código

Merge pull request #4219 from weseek/imprv/gw7267-apply-i18n

Imprv/gw7267 apply i18n
Yuki Takei hace 4 años
padre
commit
4ef28a7b38

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

@@ -255,6 +255,31 @@
       "This tree": "Only children of this tree"
     }
   },
+  "editor_settings": {
+    "editor_settings": "Editor Settings",
+    "common_settings": {
+      "common_settings": "Common Settings",
+      "common_misspellings": "Textlint rules to find common misspellings from Wikipedia.",
+      "max_comma": "Textlint rule is that limit maximum ten(、) count of sentence. Default: 4",
+      "sentence_length": "Textlint rules that limit Maximum Length of Sentence. Default: 100"
+      },
+    "japanese_settings": {
+      "japanese_settings": "Japanese Settings",
+      "ja_no_abusage": "Textlint rules to check for common misuse.",
+      "ja_hiragana_keishikimeishi": "Textlint rules to check easy-to-read Keishikimeishi(pronouns) written in Hiragana than Kanji.",
+      "ja_no_inappropriate_words": "Textlint rules to check for inappropriate expressions",
+      "ja_no_mixed_period": "Textlint rules to check that a paragraph always has a punctuation mark at the end.",
+      "ja_no_redundant_expression": "Textlint rules that prohibits redundant expressions. Redundant expressions are expressions that make sense even if they are omitted from the sentence.",
+      "max_kanji_continuous_len": "Textlint rules that limits the maximum number of consecutive Kanji. Default: 5",
+      "max_ten": "Textlint rule is that limit maximum ten(、) count of sentence.",
+      "no_double_negative_ja": "Textlint rules that detects double negation.",
+      "no_doubled_conjunction": "Textlint rules to check duplicated same conjunctions.",
+      "no_doubled_joshi": "Textlint rules that checks that the same particle appears consecutively in one sentence.",
+      "no_dropping_the_ra": "Textlint rules that detects the word dropping the ra.",
+      "no_hankaku_kana": "Textlint rules that disallow to use Half-width kana.",
+      "prefer_tari_tari": "Textlint rules that checks tari tari."
+    }
+  },
   "copy_to_clipboard": {
     "Copy to clipboard": "Copy to clipboard",
     "Page path": "Page path",

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

@@ -258,6 +258,31 @@
       "This tree": "この階層下の子ページのみ"
     }
   },
+  "editor_settings": {
+    "editor_settings": "エディター設定",
+    "common_settings": {
+      "common_settings": "共通設定",
+      "common_misspellings": "ウィキペディアから一般的なスペルミスを見つけます。",
+      "max_comma": "文の読点(、)を最大10個に制限します。初期値: 4。",
+      "sentence_length": "文の最大文字数を制限します。初期値: 100。"
+      },
+    "japanese_settings": {
+      "japanese_settings": "日本語設定",
+      "ja_hiragana_keishikimeishi": "漢字よりひらがなで書かれた読みやすい形式名詞をチェックします。",
+      "ja_no_abusage": "よくある誤用をチェックします。",
+      "ja_no_inappropriate_words": "不適切表現をチェックします。",
+      "ja_no_mixed_period": "パラグラフの末尾に必ず句点記号を付けていることをチェックします。",
+      "ja_no_redundant_expression": "冗長な表現を禁止します。冗長な表現とは、その文から省いても意味が通じるような表現を示しています。",
+      "max_kanji_continuous_len": "漢字が連続する最大文字数を制限します。初期値: 5。",
+      "max_ten": "一文に利用できる、の数を制限します。一文の読点の数が多いと冗長で読みにくい文章となるため、読点の数を一定数以下にするルールです。 読点の数を減らすためには、句点(。)で文を区切る必要があります。",
+      "no_double_negative_ja": "二重否定を検出します。",
+      "no_doubled_conjunction": "同じ接続詞が連続して出現していないかどうかをチェックします。",
+      "no_doubled_joshi": "1つの文中に同じ助詞が連続して出てくるのをチェックします。",
+      "no_dropping_the_ra": "ら抜き言葉を検出します。",
+      "no_hankaku_kana": "半角カナの利用を禁止します。",
+      "prefer_tari_tari": "「〜たり〜たりする」をチェックします。"
+    }
+  },
   "copy_to_clipboard": {
     "Copy to clipboard": "クリップボードにコピー",
     "Page path": "ページ名",

+ 26 - 1
packages/app/resource/locales/zh_CN/translation.json

@@ -236,7 +236,32 @@
 			"All pages": "所有页面",
 			"This tree": "当前分支以下内容"
 		}
-	},
+  },
+  "editor_settings": {
+    "editor_settings": "编辑器设置",
+    "common_settings": {
+      "common_settings": "常用设置",
+      "common_misspellings": "从 Wikipedia 中查找常见拼写错误的 Textlint。",
+      "max_comma": "Textlint 规则是限制句子的最大十(、)个计数。默认:4。",
+      "sentence_length": "限制最大句子长度的 Textlint 默认: 100。"
+      },
+    "japanese_settings": {
+      "japanese_settings": "日语设置",
+      "ja_no_abusage": "用于检查常见误用的 Textlint 规则。",
+      "ja_hiragana_keishikimeishi": "Textlint 规则检查易于阅读的 Keishikimeishi(代词)用平假名而不是汉字编写。",
+      "ja_no_inappropriate_words": "Textlint 规则来检查不适当的表达",
+      "ja_no_mixed_period": "Textlint 规则用于检查段落末尾是否总是有标点符号。",
+      "ja_no_redundant_expression": "禁止冗余表达式的 Textlint 规则。冗余表达式是即使从句子中省略也有意义的表达式。",
+      "max_kanji_continuous_len": "限制连续汉字的最大数量的 Textlint 规则。默认:5。",
+      "max_ten": "Textlint 规则是限制句子的最大十(、)个计数。",
+      "no_double_negative_ja": "检测双重否定的 Textlint 规则。",
+      "no_doubled_conjunction": "Textlint 规则来检查重复的相同连词。",
+      "no_doubled_joshi": "Textlint 规则,用于检查同一个粒子是否连续出现在一个句子中。",
+      "no_dropping_the_ra": "检测丢弃 ra 的单词的 Textlint 规则。",
+      "no_hankaku_kana": "不允许使用半角假名的 Textlint 规则。",
+      "prefer_tari_tari": "检查 tari tari 的 Textlint 规则。"
+    }
+  },
 	"copy_to_clipboard": {
 		"Copy to clipboard": "复制到剪贴板",
 		"Page path": "页面路径",

+ 18 - 20
packages/app/src/components/Me/EditorSettings.tsx

@@ -24,7 +24,7 @@ export const EditorSettings: FC<Props> = () => {
 
   return (
     <>
-      <h2 className="border-bottom my-4">Common Settings</h2>
+      <h2 className="border-bottom my-4">{t('editor_settings.common_settings.common_settings')}</h2>
 
       <div className="form-group row">
         <div className="offset-md-3 col-md-6 text-left">
@@ -41,7 +41,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>common-misspellings</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules to find common misspellings from Wikipedia: Lists of common misspellings.
+              {t('editor_settings.common_settings.common_misspellings')}
             </p>
           </div>
 
@@ -57,8 +57,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>max-comma</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rule is that limit maximum ten(、) count of sentence. <br />
-              Default: 4
+              {t('editor_settings.common_settings.max_comma')}
             </p>
           </div>
 
@@ -74,7 +73,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>sentence-length</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules that limit Maximum Length of Sentence.
+              {t('editor_settings.common_settings.sentence_length')}
             </p>
           </div>
 
@@ -90,7 +89,7 @@ export const EditorSettings: FC<Props> = () => {
       </div>
 
 
-      <h2 className="border-bottom my-4">Japanese Settings</h2>
+      <h2 className="border-bottom my-4">{t('editor_settings.japanese_settings.japanese_settings')}</h2>
 
       <div className="form-group row">
         <div className="offset-md-3 col-md-6 text-left">
@@ -107,7 +106,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>ja-hiragana-keishikimeishi</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules to check easy-to-read Keishikimeishi(pronouns) written in Hiragana than Kanji.
+              {t('editor_settings.japanese_settings.ja_hiragana_keishikimeishi')}
             </p>
           </div>
 
@@ -123,7 +122,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>ja-no-abusage</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules to check for common misuse
+              {t('editor_settings.japanese_settings.ja_no_abusage')}
             </p>
           </div>
 
@@ -139,7 +138,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>ja-no-inappropriate-words</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules to check for inappropriate expressions
+              {t('editor_settings.japanese_settings.ja_no_inappropriate_words')}
             </p>
           </div>
 
@@ -155,7 +154,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>ja-no-mixed-period</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules to check that a paragraph always has a punctuation mark at the end
+              {t('editor_settings.japanese_settings.ja_no_mixed_period')}
             </p>
           </div>
 
@@ -171,8 +170,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>ja-no-redundant-expression</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules that prohibits redundant expressions.
-              Redundant expressions are expressions that make sense even if they are omitted from the sentence.
+              {t('editor_settings.japanese_settings.ja_no_redundant_expression')}
             </p>
           </div>
 
@@ -188,7 +186,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>max-kanji-continuous-len</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules that limits the maximum number of consecutive Kanji.
+              {t('editor_settings.japanese_settings.max_kanji_continuous_len')}
             </p>
           </div>
 
@@ -204,7 +202,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>max-ten</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rule is that limit maximum ten(、) count of sentence.
+              {t('editor_settings.japanese_settings.max_ten')}
             </p>
           </div>
 
@@ -220,7 +218,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>no-double-negative-ja</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules that detects double negation.
+              {t('editor_settings.japanese_settings.no_double_negative_ja')}
             </p>
           </div>
 
@@ -236,7 +234,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>no-doubled-conjunction</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules to check duplicated same conjunctions.
+              {t('editor_settings.japanese_settings.no_doubled_conjunction')}
             </p>
           </div>
 
@@ -252,7 +250,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>no-doubled-joshi</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules that checks that the same particle appears consecutively in one sentence.
+              {t('editor_settings.japanese_settings.no_doubled_joshi')}
             </p>
           </div>
 
@@ -268,7 +266,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>no-dropping-the-ra</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules that detects the word dropping the ra.
+              {t('editor_settings.japanese_settings.no_dropping_the_ra')}
             </p>
           </div>
 
@@ -284,7 +282,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>no-hankaku-kana</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules that disallow to use Half-width kana.
+              {t('editor_settings.japanese_settings.no_hankaku_kana')}
             </p>
           </div>
 
@@ -300,7 +298,7 @@ export const EditorSettings: FC<Props> = () => {
               <strong>prefer-tari-tari</strong>
             </label>
             <p className="form-text text-muted small">
-              Textlint rules that checks tari tari.
+              {t('editor_settings.japanese_settings.prefer_tari_tari')}
             </p>
           </div>
 

+ 1 - 1
packages/app/src/components/Me/PersonalSettings.jsx

@@ -43,7 +43,7 @@ const PersonalSettings = (props) => {
       editor_settings: {
         Icon: () => <i className="icon-fw icon-pencil"></i>,
         Content: EditorSettings,
-        i18n: t('Editor Settings'),
+        i18n: t('editor_settings.editor_settings'),
         index: 4,
       },
     };