Skip to content

Commit

Permalink
Resolve conflicts of yarn.lock, merging all other conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
smikitky committed Jun 13, 2021
2 parents 68e4efc + d692a70 commit e618804
Show file tree
Hide file tree
Showing 134 changed files with 6,173 additions and 4,874 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Thank you for the PR! Contributors like you keep React awesome!
Please see the Contribution Guide for guidelines:
https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md
https://github.com/reactjs/ja.reactjs.org/blob/master/CONTRIBUTING.md
If your PR references an existing issue, please add the issue number below
Expand Down
19 changes: 19 additions & 0 deletions .textlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"rules": {
"preset-jtf-style": {
"1.1.3.箇条書き": false,
"1.2.1.句点(。)と読点(、)": false,
"1.2.2.ピリオド(.)とカンマ(,)": false,
"3.1.1.全角文字と半角文字の間": false,
"4.2.1.感嘆符(!)": false,
"4.2.2.疑問符(?)": false
},
"@textlint-rule/no-invalid-control-character": {
"checkCode": true
},
"prh": {
"severity" : "warning",
"rulePaths" :["./prh.yml"]
}
}
}
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# reactjs.org
# ja.reactjs.org

This repo contains the source code and documentation powering [reactjs.org](https://reactjs.org/).
This repo contains the source code and documentation powering [ja.reactjs.org](https://ja.reactjs.org/).

> 以下はオリジナル(英語版)リポジトリの README です。日本語版 React ドキュメントへの貢献(翻訳・修正など)に興味がある方は [TRANSLATION.md](TRANSLATION.md) を参照してください。
## Getting started

Expand All @@ -10,11 +12,11 @@ This repo contains the source code and documentation powering [reactjs.org](http
1. Node: any 12.x version starting with v12.0.0 or greater
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1. A fork of the repo (for any contributions)
1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine
1. A clone of the [ja.reactjs.org repo](https://github.com/reactjs/ja.reactjs.org) on your local machine

### Installation

1. `cd reactjs.org` to go into the project root
1. `cd ja.reactjs.org` to go into the project root
1. `yarn` to install the website's npm dependencies

### Running locally
Expand All @@ -26,11 +28,11 @@ This repo contains the source code and documentation powering [reactjs.org](http

### Guidelines

The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the [contributing guidelines](https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-text) for the appropriate sections.
The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the [contributing guidelines](https://github.com/reactjs/ja.reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-text) for the appropriate sections.

### Create a branch

1. `git checkout master` from any folder in your local `reactjs.org` repository
1. `git checkout master` from any folder in your local `ja.reactjs.org` repository
1. `git pull origin master` to ensure you have the latest main code
1. `git checkout -b the-name-of-my-branch` (replacing `the-name-of-my-branch` with a suitable name) to create a branch

Expand All @@ -51,7 +53,7 @@ The documentation is divided into several sections with a different tone and pur

1. `git add -A && git commit -m "My message"` (replacing `My message` with a commit message, such as `Fix header logo on Android`) to stage and commit your changes
1. `git push my-fork-name the-name-of-my-branch`
1. Go to the [reactjs.org repo](https://github.com/reactjs/reactjs.org) and you should see recently pushed branches.
1. Go to the [ja.reactjs.org repo](https://github.com/reactjs/ja.reactjs.org) and you should see recently pushed branches.
1. Follow GitHub's instructions.
1. If possible, include screenshots of visual changes. A [Netlify](https://www.netlify.com/) build will also be automatically created once you make your PR so other people can see your change.

Expand Down
66 changes: 66 additions & 0 deletions TRANSLATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# reactjs.org 日本語翻訳プロジェクト

このリポジトリでは React 公式ドキュメント日本語版に関する作業を行っています。経緯については以下のブログ記事をご覧ください。

- [Is React Translated Yet? ¡Sí! Sim! はい!](https://reactjs.org/blog/2019/02/23/is-react-translated-yet.html)

オリジナル reactjs.org は Gatsby によって生成される静的サイトであり、英語ドキュメントおよびブログ記事が含まれています。本リポジトリはそのフォークです。`content` 内にあるドキュメントが日本語化されているほか(一部除く)、一部のレイアウト要素に対する JavaScript レベルでのいくつかのパッチ、日本語版でのみ使う textlint などが含まれています。現時点では大部分のドキュメントの翻訳が完了しているため、最新版ドキュメントへの追随を主に行っています。日本語訳や日本語版特有の問題を見つけた場合はこのリポジトリの Issue / Pull Request を使って報告ないし改善を提案してください。

メンテナ(3 名)

- @potato4d
- @koba04
- @smikitky

## ドキュメント翻訳者向けガイド

### 環境のセットアップ

README.md にある通りですが、さらなる簡略版は以下の通りです。

1. Git, Node, Yarn をそれぞれ準備して ja.reactjs.org(のフォーク)をクローン
2. `yarn` で依存物をインストール(`yarn.lock` が更新された場合は適宜これをくり返す)
3. `yarn dev` でローカルウェブサーバーが立ち上がるのを確認
4. `content` の中身の Markdown ファイルをテキストエディタで編集
5. ブラウザで確認

### 作業の重複を防ぐための宣言

未翻訳記事の翻訳を行いたい場合は、他の人との作業の重複を防ぐため、https://github.com/reactjs/ja.reactjs.org/issues/4 での宣言をお願いします。

### スタイルの自動チェック

日本語翻訳プロジェクト内では textlint というスタイルチェッカを利用しており、基本的なスタイルに関する問題(全角英数を使わない、句読点の統一など)の検出が行われます。コミットの際に自動で走りますが、`yarn lint:text` で手動で行うことも可能です。PR の作成の前には必ずエラーが出ないようにしてください。

### 全般的なこと

- 見出しの行末にある `{#try-react}` のようなものは見出しアンカーなので、翻訳しない([参考](https://github.com/reactjs/reactjs.org/issues/1608))。
- 「です」「ます」調で書く(箇条書きの中など特殊な文脈を除く)。
- 原文と改行のしかた、空行の入れかたを厳密に一致させる。GitHub の差分表示画面で見て**行番号レベルで**左右が対応しているようにする。これは将来原文が更新された場合に Git が修正箇所を正しく対応づけるために重要(ただし極一部の記事では、原文に文の途中で改行が何度も含まれているものがあり、その場合はしかたがない)。
- カッコは内部に和文を含む場合は全角、英数字のみ含む場合(特に原文の単語を示す場合など)は半角とする。
- 半角開きカッコの前と半角閉じカッコの後には半角スペースを入れる。ただし別の約物と直接隣接している場合は不要。
> ```
> 避難ハッチ␣(escape hatch)␣を(必要に応じて)利用します。
> ```
- 英数字と和文との間には半角スペースを入れる。ただし他の約物(特に句読点 。, 、)と直接隣接している場合は不要。
> ```
> React␣の␣API␣で、`fooBar`␣を␣1␣回実行。
> ```
- 和文内で文の一部として使う記号・約物類は原則全角とする。`「`, `」`, `、`, `。`, `:`, `!`, `?`, `/` などが該当する。
- 用例の直前の行で行末に現れるコロンについても全角とする。ただしこれは毎回使うべきというわけではない。文が途切れる場合は `:` が必要だが、不自然にならないのであれば、句点(マル)で終えても構わない。
- 英文から飛躍した意訳や表現の追加・改変を行わない。一方で分かりづらくなるような逐語訳もしない。
- リンク先の URL は変えない(MDN などについては後でまとめて日本語版へのリンクに置換するかもしれませんが、まとめてやる方が間違いも少ないと思われるので、気にしないでいいです)。
- コードサンプルについては原則翻訳しなくてよい。特に例の中の `banana` とか `Canada` のようなものまで翻訳する必要はない。ただしコード中のコメントに、(本来は本文に書いたほうがいいレベルの)大量の説明があり、翻訳しないと理解を妨げる危険性が高い場合は翻訳してもよい。
- `*強調*` や `**強調**`(それぞれ `em` と `strong` に変換される)は、極力原文での使い方と同じにする(環境によって日本語フォントは斜体で表示できないため、`em` に日本語が含まれる場合は自動的に太字に変換されるようになっています:[参考](https://github.com/reactjs/ja.reactjs.org/issues/22))。
- ごく一般的な日本語表記に関して困ったら概ね公用文作成の要領などに準ずるが、カタカナ語の末尾の長音符については JIS Z 8301 の推奨に従う。そこまで目くじらを立てなくてよいが、基本は要するに以下の通り。
- 3 音以上の場合のみ、片仮名語の末尾の長音符を原則省略。「エコー」「マナー」「ハンドラ」「プロパティ」など。
- ただし「レンダー」だけは例外で、常に「レンダー」と伸ばす。
- 補助動詞(~てください・~てみる・~ておく・~てくる・~てしまう、など)はかな書き。
- 語彙化した副詞はなるべくかな書き。「ついに」「まれに」「ときに」「ようやく」「おそらく」など。
### 用語の統一
Wiki の[訳語の統一](https://github.com/reactjs/ja.reactjs.org/wiki/%E8%A8%B3%E8%AA%9E%E3%81%AE%E7%B5%B1%E4%B8%80)を参照。
Loading

0 comments on commit e618804

Please sign in to comment.