Skip to content

Commit 9cb550c

Browse files
authored
Merge pull request emacs-php#768 from emacs-php/update/documentations
Update documentations
2 parents 1565b0d + d3e0467 commit 9cb550c

File tree

3 files changed

+93
-544
lines changed

3 files changed

+93
-544
lines changed

Diff for: CONTRIBUTING.md

+32-17
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,25 @@ This project accepts contributions in various languages. Not only development b
1111

1212
## English
1313

14+
### Setup (en)
15+
16+
[Eask] is required to build the package. You need to install it using node.js and npm, or [download a prebuilt executable][eask-releases]. See [Eask Introduction][eask-introduction] and [Install Eask][eask-install] for more details.
17+
18+
You can run the tests using the following command:
19+
20+
```sh
21+
make test
22+
```
23+
1424
### Guideline (en)
1525

16-
All contributions to PHP Mode are welcome. But please try to do the following when sending improvements or bug fixes:
26+
All contributions to PHP Mode are welcome. But please try to do the following when submitting enhancements or bug fixes:
1727

18-
1. Add your name to the list of ‘Contributors’ in this `README.md` file if it is not there already. If you have a GitHub page and/or personal site then please feel free to link your name to it so people can see your other work.
19-
2. If your contribution addresses an issue on the GitHub project page then include a single line like `GitHub-Issue: #16` with the appropriate issue number.
20-
3. Make sure to update the constant `php-mode-modified` *only if you patch affects `php-mode.el`,* which means this step is unnecessary for patches related to unit tests.
21-
4. However, please do not modify `php-mode-version-number`. The maintainers will decide what constitutes a bump in the version number.
22-
5. Open the `php-mode-test.el` file and [run all of the tests] to ensure they still pass as expected. Sometimes we expect for a test to fail, and those unit tests have the appropriate configuration so their failure will not raise any warnings. You can use `make test` script to run all tests from a terminal, which is also useful in conjunction with [`git bisect run`].
23-
6. Send us a pull request here on GitHub.
24-
7. Please make your commit messages as detailed as possible. It is better to be too verbose than to write too little. Look at the commits of the maintainers to see many examples of the level of detail that we feel is ideal. Please never assume that your patch is so simple that future developers will be able to understand the *reason* for the change without comment. And that is important: your commit message should always strive to answer *"Why"* the patch exists, *"What*" does it accomplish? The maintainers will sometimes write detailed commit messages for pull-requests by other developers, but please do not rely on us to do this consistently.
28+
1. Open `php-mode-test.el` and run all the tests to make sure they pass as expected. You can also check this by running `make test` from the terminal.
29+
2. Please commit with a concise and clear message that effectively achieves a simple purpose.
30+
3. Submit a pull request here on GitHub.
2531

26-
If you are fixing a bug related to a GitHub issue, then first of all, thank you for the help improving PHP Mode. Second, there is a `tests/` directory which contains PHP scripts for issues (although not all of them). Please consider adding a test script to that directory that documents the expected behavior and provides code that allows others to see if said behavior works properly. Then create a unit test within `php-mode-test.el` using [ERT]. Please try to follow the format of the existing tests.
32+
If you are fixing a bug related to a GitHub issue, then first of all, thank you for helping to improve PHP Mode. Second, there is a `tests/` directory that contains PHP scripts for issues (though not all). Please consider adding a test script to that directory that documents the expected behavior and provides code that allows others to see if that behavior works properly. Then create a unit test within `php-mode-test.el' using [ERT]. Try to follow the format of the existing tests.
2733

2834
### Regression test for Face (en)
2935

@@ -55,17 +61,23 @@ Please contribute.
5561

5662
## Japanese
5763

64+
### Setup (ja)
65+
66+
パッケージをビルドするにはEaskが必要です。node.jsとnpmからインストールするか、ビルド済み実行ファイルをダウンロードする必要があります。Easkの詳細は[Eask Introduction][eask-introduction][Install Eask][eask-install]をお読みください。
67+
68+
以下のコマンドでテストを実行できます。
69+
70+
```sh
71+
make test
72+
```
73+
5874
### Guideline (ja)
5975

6076
**Emacs PHP Mode**はどなたからの貢献も歓迎です。改善やバグ修正を行う前に以下の手順を行ってください。
6177

62-
1. あなたの名前が`README.md`の“Contributors”のリストになければ追加してください。あなたの名前とGitHubアカウントや個人サイトをリンクして構いません。
63-
2. もし既にissueとして提起された問題に対処するならば、コミットメッセージに`GitHub-Issue: #16`のような行を含めてください。
64-
3. `php-mode.el`に影響する変更をした場合、`php-mode-modified`定数を更新してください。テストやドキュメントのみの修正の場合は不要です。
65-
4. しかし、 `php-mode-version-number` は変更しないでください。メンテナがバージョンを決定します。
66-
5. `php-mode-test.el`を開いて[すべてのテストを実行][run all of the tests]し、期待通りにテストを通過することを確認します。端末から`make test`で確認することもでき、[`git bisect run`]と併用すると便利です。
67-
6. GitHubからプルリクエストを送信します
68-
7. 可能な限り詳細なコミットメッセージを作成してください。不足するよりも冗長すぎる方が良いです。メンテナーのコミットを参照して、私たちが理想的だと期待するコミットメッセージの詳細度として参考にしてください。シンプルすぎるパッチだからと決めつけずにコミットメッセージを書けば、コード中にコメントを書かなくても将来の開発者がコミットの「理由」「経緯」を理解できるようになります。コミットメッセージには「なぜ」コミットを作成したか、「何を」解決するものなのかを記述することが重要です。メンテナーはほかの開発者のプルリクエストに詳細なコミットメッセージを書き込むことがありますが、常に一貫して行われるとは期待しないでください。
78+
1. `php-mode-test.el`を開いて[すべてのテストを実行][run all of the tests]し、期待通りにテストを通過することを確認します。端末から`make test`で確認することもできます。
79+
2. 簡潔でシンプルな目的を達成するための、明示的なメッセージでコミットしてください。
80+
3. GitHubからプルリクエストを送信してください。
6981

7082
**GitHubのissueに関連するバグを修正する場合**: PHPモードの改善に協力いただきありがとうございます! `tests/`ディレクトリには(すべてではありませんが)issueに関連のあるPHPスクリプトが配置されています。そこに予期される挙動と他のひとが動作を適切に確認できるテストコードを追加することを検討してください。そして`php-mode-test.el`に既存のテストと同じように[ERT]を使ったテストコードを追加してください。
7183

@@ -76,7 +88,10 @@ Please contribute.
7688
このテストに必要な`.face`ファイルの生成方法は[How to generate face file]を参考にしてください。
7789

7890
[run all of the tests]: http://www.gnu.org/software/emacs/manual/html_node/ert/Running-Tests-Interactively.html#Running-Tests-Interactively
79-
[`git bisect run`]: http://git-scm.com/book/en/Git-Tools-Debugging-with-Git
91+
[Eask]: https://emacs-eask.github.io/
92+
[eask-introduction]: https://emacs-eask.github.io/Getting-Started/Introduction/
93+
[eask-install]: https://emacs-eask.github.io/Getting-Started/Install-Eask/
94+
[eask-releases]: https://github.com/emacs-eask/cli/releases
8095
[ERT]: http://www.gnu.org/software/emacs/manual/html_node/ert/index.html
8196
[Font Lock]: https://www.gnu.org/software/emacs/manual/html_node/elisp/Font-Lock-Mode.html
8297
[How to generate face file]: https://github.com/emacs-php/php-mode/issues/509#issuecomment-491528968

0 commit comments

Comments
 (0)