You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

56 lines
2.9 KiB

  1. CONTRIBUTING
  2. ============
  3. There are three ways in which you can contribute to this repository:
  4. 1. By improving the documentation
  5. 2. By working on the back-end application
  6. 3. By working on the front-end application
  7. Choosing what to work on in a large open source project is not easy. The list of [GitHub issues](https://github.com/tootsuite/mastodon/issues) may provide some ideas, but not every feature request has been greenlit. Likewise, not every change or feature that resolves a personal itch will be merged into the main repository. Some communication ahead of time may be wise. If your addition creates a new feature or setting, or otherwise changes how things work in some substantial way, please remember to submit a correlating pull request to document your changes in the [documentation](http://github.com/tootsuite/documentation).
  8. Below are the guidelines for working on pull requests:
  9. ## General
  10. - 2 spaces indentation
  11. ## Documentation
  12. - No spelling mistakes
  13. - No orthographic mistakes
  14. - No Markdown syntax errors
  15. ## Requirements
  16. - Ruby
  17. - Node.js
  18. - PostgreSQL
  19. - Redis
  20. - Nginx (optional)
  21. ## Back-end application
  22. It is expected that you have a working development environment set up. The development environment includes [rubocop](https://github.com/bbatsov/rubocop), which checks your Ruby code for compliance with our style guide and best practices. Sublime Text, likely like other editors, has a [Rubocop plugin](https://github.com/pderichs/sublime_rubocop) that runs checks on files as you edit them. The codebase also has a test suite.
  23. * The codebase is not perfect, at the time of writing, but it is expected that you do not introduce new code style violations
  24. * The rspec test suite must pass
  25. * To the extent that it is possible, verify your changes. In the best case, by adding new tests to the test suite. At the very least, by running the server or console and checking it manually
  26. * If you are introducing new strings to the user interface, they must be using localization methods
  27. If your code has syntax errors that won't let it run, it's a good sign that the pull request isn't ready for submission yet.
  28. ## Front-end application
  29. It is expected that you have a working development environment set up (see back-end application section). This project includes an ESLint configuration file, with which you can lint your changes.
  30. * Avoid grave ESLint violations
  31. * Verify that your changes work
  32. * If you are introducing new strings, they must be using localization methods
  33. If the JavaScript or CSS assets won't compile due to a syntax error, it's a good sign that the pull request isn't ready for submission yet.
  34. ## Translate
  35. You can contribute to translating Mastodon via Weblate at [weblate.joinmastodon.org](https://weblate.joinmastodon.org/).
  36. [![Mastodon translation statistics by language](https://weblate.joinmastodon.org/widgets/mastodon/-/multi-auto.svg)](https://weblate.joinmastodon.org/)