Skip to content

Latest commit

 

History

History
90 lines (55 loc) · 4.51 KB

CONTRIBUTING.md

File metadata and controls

90 lines (55 loc) · 4.51 KB

vue-i18n Contributing Guide

General Guidelines

Thanks for understanding that English is used as a shared language in this repository. Maintainers do not use machine translation to avoid miscommunication due to error in translation. If description of issue / PR are written in non-English languages, those may be closed.

It is ofcourse fine to use non-English language, when you open a PR to translate documents and communicates with other users in same language.

Issue Reporting Guidelines

  • The issue list of this repo is exclusively for bug reports and feature requests. Non-conforming issues will be closed immediately.

    • For simple beginner questions, you can get quick answers from #vue-i18n channel of Discord

    • For more complicated questions, you can use the official forum or StackOverflow. Make sure to provide enough information when asking your questions - this makes it easier for others to help you!

  • Try to search for your issue, it may have already been answered or even fixed in the development branch.

  • Check if the issue is reproducible with the latest stable version of Vue. If you are using a pre-release, please indicate the specific version you are using.

  • It is required that you clearly describe the steps necessary to reproduce the issue you are running into. Issues with no clear repro steps will not be triaged. If an issue labeled "need repro" receives no further input from the issue author for more than 5 days, it will be closed.

  • It is recommended that you make a JSFiddle/JSBin/Codepen/CodeSandbox to demonstrate your issue. You could start based with this template that already includes the latest version.

  • For bugs that involves build setups, you can create a reproduction repository with steps in the README.

  • If your issue is resolved but still open, don’t hesitate to close it. In case you found a solution by yourself, it could be helpful to explain how you fixed it.

Pull Request Guidelines

  • The master branch is basically just a snapshot of the latest stable release. All development should be done in dedicated branches. Do not submit PRs against the master branch.

  • Checkout a topic branch from the relevant branch, e.g. v8.x, and merge back against that branch.

  • Work in the src folder and DO NOT checkin dist in the commits.

  • It's OK to have multiple small commits as you work on the PR - we will let GitHub automatically squash it before merging.

  • Make sure npm test passes. (see development setup)

  • If adding new feature:

    • Add accompanying test case.
    • Provide convincing reason to add this feature. Ideally you should open a suggestion issue first and have it greenlighted before working on it.
  • If fixing a bug:

    • Provide detailed description of the bug in the PR. Live demo preferred.
    • Add appropriate test coverage if applicable.

Work Step Example

  • Fork the repository from kazupon/vue-i18n !
  • Create your topic branch from v8.x: git branch my-new-topic origin/v8.x
  • Add codes and pass tests !
  • Commit your changes: git commit -am 'Add some topic'
  • Push to the branch: git push origin my-new-topic
  • Submit a pull request to v8.x branch of kazupon/vue-i18n repository !

Development Setup

You will need Node.js and Java Runtime Environment (needed for running Selenium server during e2e tests).

After cloning the repo, run:

$ npm install

Commonly used NPM scripts

# watch and serve with hot reload unit test at localhost:8080
$ npm run dev

# lint source codes
$ npm run lint

# run unit tests in browser (firefox/safari/chrome)
$ npm run test:unit

# build all dist files, including npm packages
$ npm run build

# run the full test suite, include linting / type checking
$ npm test

There are some other scripts available in the scripts section of the package.json file.

The default test script will do the following: lint with ESLint -> type check with Flow -> unit tests with coverage -> e2e tests. Please make sure to have this pass successfully before submitting a PR. Although the same tests will be run against your PR on the CI server, it is better to have it working locally beforehand.