어떻게 Elasticsearch6.x Reference 중국어 버전 공헌 번역/검토
번역 절차는 아래와 같습니다, 구체적으로 보십시오.https://github.com/elasticsearch-cn/elasticsearch/wiki.
Prerequisites
Prepare translation
Fork
and choose your own personal account git clone [email protected]:${USER_NAME}/elasticsearch.git
git remote add upstream https://github.com/elasticsearch-cn/elasticsearch.git
.git/config
and add the following lines: 방법 1:
git config --global alias.pr '!f() { git fetch upstream pull/$1/head:pr/$1; }; f'
git config --global alias.review '!f() { git checkout cn && git pr $1 && git checkout cn && git pull --rebase upstream cn && git checkout pr/$1 && git rebase cn;}; f'
방법 2:
[alias]
pr = "!f() { git fetch upstream pull/$1/head:pr/$1; }; f"
[alias]
review = "!f() { git checkout cn && git pr $1 && git checkout cn && git pull --rebase upstream cn && git checkout pr/$1 && git rebase cn;}; f"
* git checkout cn
* git pull --rebase upstream cn # upstream should point to elasticsearch-cn/elasticsearch.git.git
Create a chapter branch -- Rule #1: Never work on master or cn!
*
git checkout -b chapter/chapter1/getting-started.asciidoc
for chapter #1 branch and the first doc in this chapter git clone [email protected]:elastic/docs.git
./docs/build_docs.pl --doc getting-started.asciidoc --out es-book-output/--open --chunk=1
Note about squashing commits
You should also **never squash commits during the review** process at Github, since that forces the reviewer to evaluate
hundreds of lines of code in a new, squashed commits, instead of just the changes in specific commits. In other words, during the review process, keep adding and pushing commits, and after the review is done, perform a final rebase/squash/reword/etc on the branch, before merging it.
```
git checkout your-chapter/chapters git merge-base your-chapter/chapters cn git rebase -i sha1 git rebase cn ```
Prepare push to your repo
* `git checkout cn` # Go back to cn to get latest commits
* `git pull --rebase upstream cn` # Rebase the cn
* `git checkout chapter/chapter1` # Go back to the translation branch
* `git rebase cn` # Rebase feature branch using cn
* `git push origin chapter/chapter1` # Push to your remote
If you already pushed to your remote, and make changes to the history (like with rebase / squash), your push will be denied. In that case, you need to use the `--force` switch to overwrite the remote history:
```
git push origin chapter/chapter1 -f # Force push to your remote
```
Remember that it’s perfectly fine to overwrite your own history (ie. your fork, or private branch), but you must not (infact never!) overwrite shared history (ie. master, the cn branch, etc). In other words, force push to your fork or branch, but never to branches which you share with other developers and the world.
Prepare a pull-request for your fix
* Go to your Github account and open a pull request for the the branch you just committed and pushed.
* , , pr,( + + ) :`chapter1_part1: /getting-started.asciidoc`
* ( ) PR:`chapter2_part1: /setup/install.asciidoc`
* The pull-request will get an ID, which is the last number in the github URL:
* https://github.com/elasticsearch-cn/elasticsearch/pull/2985
Fetch a PR and review locally
* If you are a reviewer you can pull the pull-request by running (2985 is your pr id):
* `git review 2985`
* or manually fetch PR
* `git pr 2985` # Create a branch named “pr/2985” in your working copy (local)
* `git checkout cn && git pull --rebase upstream cn` # Get latest changes
* `git checkout pr/2985 && git rebase cn` # Rebase to latest cn
* Do your checking and review, please use web browser to view the final result
`./docs/build_docs.pl --doc getting-started.asciidoc --out es-book-output/ --open --chunk=1`
* Go to pull thread and comment "LGTM"
* [DONT! do this now]`git checkout cn && git merge pr/2895` # Merge the commits into cn * [DONT! do this now]`git push upstream cn` # Push cn to the main repo
* Make sure to add the proper labels to the github issue/PR: see following section * Clean local branch `git branch -D pr/2985` * Done
Labelling pull requests & issues
* `to be review` `review` `to be merge` `done`
Translation Reviews
* Everybody does translation reviews.
* Everybody's translation gets reviewed before being merged.
* You should find a reviewer for your PR.
* You have to satisfy your reviewer.
As the reviewee:
When your translation is ready for review (which includes updating the documentation and modify), create a pull request on GitHub and add the `to be review` label.
Then find somebody to review your translation and assign the PR to that person. You can find people who are interested in your PR touches in the [spreadsheet] or from QQ group: 109764489 .
Generally, most PRs should be reviewed by at least two other people:
* For the first review, try to choose a less experienced person so that they have a chance to learn.
* Once you have satisfied the first reviewer, find somebody with more experience in the area to give the final LGTM (looks good to me).
* Try not to choose the same people all the time - spread the load.
* If a reviewer takes too long, feel free to bug them or to choose a different reviewer, but it is up to you to get your PR reviewed.
Once you have two LGTM, go ahead and label your PR:
Label your PR with `to be merged`, and with the chapter number (eg `chapter1`, `chaper2`, `chapter1_part1`)
For smaller PRs, a single review may be sufficient, but if you are not 100% sure, then make sure you get a second review.
As the reviewer:
If you have any questions, or suggestions, leave comments on the PR, remove the `review` label and unassign yourself. It is up to the reviewee to make the appropriate corrections or to explain their choices to your satisfaction.
As part of the review, make sure that the PR is properly labelled according to the labelling section above.
Once you are satisfied, leave a LGTM (looks good to me) comment and, again, remove the `review` label and unassign your
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.