Skip to content

Commit 99b12e3

Browse files
authored
Merge pull request #6
Translation foundation system structure
2 parents 82406ac + c95f447 commit 99b12e3

8 files changed

+537
-19
lines changed

.textlintrc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"rules": {
3+
"preset-jtf-style": {
4+
"1.2.1.句点(。)と読点(、)": false,
5+
"1.2.2.ピリオド(.)とカンマ(,)": false,
6+
"3.1.1.全角文字と半角文字の間": false
7+
}
8+
}
9+
}

content/docs/forms.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ this.setState(partialState);
280280
[制御されたコンポーネント](/docs/forms.html#controlled-components)で value プロパティに値を指定することで、変更させたくない場合にユーザーが値を変更できないようになります。もしも
281281
`value` を指定したのに入力フィールドが依然変更可能であるという場合は、`value` を誤って `undefined` もしくは `null` に設定してしまったのかもしれません。
282282

283-
以下のコードでこれを示しています。(入力フィールドは最初はロックされていますが、短い遅延の後に編集可能になります
283+
以下のコードでこれを示しています。(入力フィールドは最初はロックされていますが、短い遅延の後に編集可能になります)
284284

285285
```javascript
286286
ReactDOM.render(<input value="hi" />, mountNode);

content/docs/hello-world.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ prev: cdn-links.html
66
next: introducing-jsx.html
77
---
88

9-
React のいちばん短い例はこのようになります:
9+
React のいちばん短い例はこのようになります
1010

1111
```js
1212
ReactDOM.render(

content/docs/lists-and-keys.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ key が意味を持つのは、それをとり囲んでいる配列の側の文
139139

140140
例えば、`ListItem` コンポーネントを抽出する際には、key は `ListItem` 自体の `<li>` 要素に書くのではなく、配列内の `<ListItem />` 要素に残しておくべきです。
141141

142-
**: 不適切な key の使用法**
142+
** 不適切な key の使用法**
143143

144144
```javascript{4,5,14,15}
145145
function ListItem(props) {
@@ -172,7 +172,7 @@ ReactDOM.render(
172172
);
173173
```
174174

175-
**: 正しい key の使用法**
175+
** 正しい key の使用法**
176176

177177
```javascript{2,3,9,10}
178178
function ListItem(props) {

content/docs/reference-javascript-environment-requirements.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ category: Reference
66
permalink: docs/javascript-environment-requirements.html
77
---
88

9-
React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). If you support older browsers and devices which may not yet provide these natively (e.g. IE < 11) or which have non-compliant implementations (e.g. IE 11), consider including a global polyfill in your bundled application, such as [core-js](https://github.com/zloirock/core-js) or [babel-polyfill](https://babeljs.io/docs/usage/polyfill/).
9+
React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). If you support older browsers and devices which may not yet provide these natively (e.g. IE &lt; 11) or which have non-compliant implementations (e.g. IE 11), consider including a global polyfill in your bundled application, such as [core-js](https://github.com/zloirock/core-js) or [babel-polyfill](https://babeljs.io/docs/usage/polyfill/).
1010

1111
A polyfilled environment for React 16 using core-js to support older browsers might look like:
1212

content/docs/state-and-lifecycle.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ state は props に似ていますが、コンポーネントによって完全
8080

8181
1. `React.Component` を継承する同名の [ES6 クラス](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Classes)を作成する。
8282

83-
2. `render()` と呼ばれる空のメソッドを1つ追加する
83+
2. `render()` と呼ばれる空のメソッドを1つ追加する
8484

8585
3. 関数の中身を `render()` メソッドに移動する。
8686

@@ -146,7 +146,7 @@ class Clock extends React.Component {
146146
}
147147
```
148148

149-
親クラスのコンストラクタへの `props` の渡し方に注目してください:
149+
親クラスのコンストラクタへの `props` の渡し方に注目してください
150150

151151
```js{2}
152152
constructor(props) {
@@ -355,7 +355,7 @@ this.setState({
355355
});
356356
```
357357

358-
これを修正するために、オブジェクトではなく関数を受け取る `setState()` つ目の形を使用します。その関数は前の state を最初の引数として受け取り、更新が適用される時点での props を第 2 引数として受け取ります:
358+
これを修正するために、オブジェクトではなく関数を受け取る `setState()`2 つ目の形を使用します。その関数は前の state を最初の引数として受け取り、更新が適用される時点での props を第 2 引数として受け取ります:
359359

360360
```js
361361
// Correct
@@ -443,7 +443,7 @@ function FormattedDate(props) {
443443

444444
コンポーネントツリーとは props が流れ落ちる滝なのだと想像すると、各コンポーネントの state とは任意の場所で合流してくる追加の水源であり、それらもまた下に流れ落ちていくものなのです。
445445

446-
全てのコンポーネントが本当に独立していることを示すのに、3つの `<Clock>` をレンダリングする `App` コンポーネントを作成します:
446+
全てのコンポーネントが本当に独立していることを示すのに、3つの `<Clock>` をレンダリングする `App` コンポーネントを作成します:
447447

448448
```js{4-6}
449449
function App() {

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,14 @@
7171
},
7272
"scripts": {
7373
"build": "gatsby build",
74-
"check-all": "npm-run-all prettier --parallel lint flow",
75-
"ci-check": "npm-run-all prettier:diff --parallel lint flow",
74+
"check-all": "npm-run-all prettier --parallel lint flow lint:text",
75+
"ci-check": "npm-run-all prettier:diff --parallel lint flow lint:text",
7676
"dev": "gatsby develop -H 0.0.0.0",
7777
"flow": "flow",
7878
"format:source": "prettier --config .prettierrc --write \"{gatsby-*.js,{flow-typed,plugins,src}/**/*.js}\"",
7979
"format:examples": "prettier --config examples/.prettierrc --write \"examples/**/*.js\"",
8080
"lint": "eslint .",
81+
"lint:text": "textlint content/{docs,home,tutorial,warnings}/*.md",
8182
"netlify": "yarn --version && rimraf node_modules && yarn install --frozen-lockfile --check-files && yarn build",
8283
"nit:source": "prettier --config .prettierrc --list-different \"{gatsby-*.js,{flow-typed,plugins,src}/**/*.js}\"",
8384
"nit:examples": "prettier --config examples/.prettierrc --list-different \"examples/**/*.js\"",
@@ -91,6 +92,8 @@
9192
"lz-string": "^1.4.4",
9293
"npm-run-all": "^4.1.5",
9394
"recursive-readdir": "^2.2.1",
95+
"textlint": "^11.2.1",
96+
"textlint-rule-preset-jtf-style": "^2.3.3",
9497
"unist-util-map": "^1.0.3"
9598
}
9699
}

0 commit comments

Comments
 (0)