翻訳者作業メモ
shinseitaro edited this page Jul 18, 2020
·
8 revisions
(Updated 2020/07/18)
- 翻訳する人の作業メモです。漏れや記入ミスなどありましたら @shinseitaro までご連絡下さい
- 下記の説明は、
tutorial3_alphalens_lesson1_to_5
というブランチを切った時の作業例です。ブランチ名は各々書き換えて下さい。
- 作業ブランチは翻訳者が切ります。
- 新しいブランチ名は、どのドキュメントをどこまで訳するのかわかるようにネーミングしてください。例:
- tutorial の場合: tutorial3_alphalens_lesson1_to_5
- lectures の場合: lecture1_introduction_to_research
- 基本的に1つのブランチで、Tutorialであれば全レッスン、Lecturesであれば1レクチャーを翻訳して下さい。
ブランチは、ローカルでもGithub上でも切ることが出来ます。お好きな方でどうぞ。
-
切り方その1:Local terminalで切る
$ git pull --rebase $ git checkout -b tutorial3_alphalens_lesson1_to_5
-
切り方その2:github上で切る.
- master を選んで▼を押したあと、新 branch 名を入れて create branch を押す
- (ブランチを github で切った人だけ)
# フェッチして切ったブランチを取り込む $ git fetch From github.com:tokyoquantopian/quantopian-doc-ja * [new branch] tutorial3_alphalens_lesson1_to_5 -> origin/tutorial3_alphalens_lesson1_to_5 # 新ブランチに切り替え $ git checkout tutorial3_alphalens_lesson1_to_5 # 切り替わった事を確認 $ git status ブランチ tutorial3_alphalens_lesson1_to_5 Your branch is up to date with 'origin/tutorial3_alphalens_lesson1_to_5'.
- 翻訳する原作を作業ディレクトリにコピーする。具体的には、
./source_rst/翻訳するレッスンのディレクトリ/
下にあるnotebook.rst
をコピーして、./source
にうつしてリネームする。ディレクトリは複数ある場合があるのでこれを繰り返す。- 例:
-
source_rst/tutorial/3_alphalens_lesson_2/notebook.rst
コピー -
source/tutorials
にペースト - ペーストした、
notebook.rst
を3_alphalens_lesson_2.rst
にリネーム
# つまりこういうことです $ cp source_rst/tutorial/3_alphalens_lesson_2/notebook.rst source/tutorial/ $ mv source/tutorial/notebook.rst source/tutorial/3_alphalens_lesson_2.rst
-
- 注意: リネームはコピーもとのディレクトリ名にしてください
- 例:
- 時々翻訳するべき rst ファイルが無い場合があります。その時は、直接
source
配下に、rst ファイルを作成して、https://www.quantopian.com/ のドキュメントをコピーペーストして翻訳して下さい。- 例:
source_rst/tutorial/3_alphalens_lesson_1
がなかった-
source/tutorial/3_alphalens_lesson_1.rst
を作成 - https://www.quantopian.com/tutorials/alphalens#lesson1 の内容をコピペして翻訳を作成
-
- 例:
- index.rst に 追記する。
- tutorialであれば
./source/tutorial/index.rst
、lectures であれば、source/lectures/index.rst
にこれから翻訳する.rst
ファイル名を追記する - 例:3_alphalens_lesson の 1〜5 の rst ファイルを追記
.. _tutorial: =============== Getting Started =============== .. toctree:: :maxdepth: 2 :caption: Contents: 1_getting_started_lesson1 1_getting_started_lesson2 1_getting_started_lesson3 1_getting_started_lesson4 1_getting_started_lesson5 1_getting_started_lesson6 1_getting_started_lesson7 1_getting_started_lesson8 ========== Alphalens ========== .. toctree:: :maxdepth: 2 :caption: Contents: 3_alphalens_lesson_1.rst 3_alphalens_lesson_2.rst 3_alphalens_lesson_3.rst 3_alphalens_lesson_4.rst 3_alphalens_lesson_5.rst
- tutorialであれば
- 一度ビルドする(sphinx がインストールされていると仮定しています。インストールはこちら)
# 仮想環境にはいる $ source .venv/bin/activate # ビルド $ make html
- add / commit / push する
$ git add source/ $ git commit -m "Got all the rst files to tranlate" $ git status ブランチ tutorial3_alphalens_lesson1_to_5 このブランチは 'origin/tutorial3_alphalens_lesson1_to_5' よりも1コミット進んでいます。 (use "git push" to publish your local commits) $ git push
(参照:WIPの代わりにDraft Pull Requestを利用する (GitHub) - Qiita)
- https://github.com/tokyoquantopian/quantopian-doc-ja > 自分のブランチに切り替える
- Compare & pull request 押す
- 緑のボタンを押して、Create Draft pull request を選ぶ。
- Titleは、翻訳するところ全体を表す表現にしてください。
- メモ欄に下記をコピペ
- [ ] 翻訳 - [ ] 査読 - [ ] 日本語警察 - [ ] ユーザレビュー
-
Create Draft Pull Request
押下 - Draft Pull Request したらDraftタグがつきます。作業が完了したら [Ready for review] を押せば普通のPull Requestにりますが、PR→Draftには戻せないらしいので注意して下さい。
翻訳途中のブランチをドラフトドキュメント に反映させるための設定。 github のUIから直接Updateして構いません。
https://github.com/tokyoquantopian/quantopian-doc-ja-draft/blob/master/.github/workflows/draft.yml
にbranches["新ブランチ名"]="source/tutorial"
もしくは branches["新ブランチ名"]="source/lessons"
を追加。
例
# keyにブランチ名, valueに対象のファイル/ディレクトリのpath
#
# 例: issue_8ブランチでsource/tutorialディレクトリの作業をしている場合
# branches["issue_8"]="source/tutorial"
#
branches["issue_8"]="source/tutorial"
branches["issue_14"]="source/tutorial"
branches["tutorial3_alphalens_lesson1_to_5"]="source/tutorial" # ←追加
翻訳中の注意事項などを書きます
#16を参照して下さい