Add CONTRIBUTING.md
This commit is contained in:
parent
b181649dff
commit
db87c170be
3 changed files with 122 additions and 87 deletions
44
CONTRIBUTING.md
Normal file
44
CONTRIBUTING.md
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# Contributing
|
||||
|
||||
BRouter is heavily based on the following libraries:
|
||||
|
||||
- [Leaflet](leafletjs.com/) maps library, used in conjuction with many plugins.
|
||||
- [Bootstrap](https://getbootstrap.com/) design library.
|
||||
- [JQuery](https://jquery.com) javascript library.
|
||||
- [Node.js](https://nodejs.org/) and [Yarn](https://yarnpkg.com/en/).
|
||||
|
||||
## Install dependencies
|
||||
|
||||
yarn
|
||||
|
||||
## Build
|
||||
|
||||
```sh
|
||||
#for development
|
||||
yarn build debug
|
||||
|
||||
#for release
|
||||
yarn build
|
||||
```
|
||||
|
||||
## Develop
|
||||
|
||||
yarn serve
|
||||
|
||||
## Translations
|
||||
|
||||
`TL;DR` if you contribute to BRouter and add some translatable content, please make sure not to modify anything in `locales` folder, except `locales/en.json`. Full explanation below.
|
||||
|
||||
### How internationalization works
|
||||
|
||||
BRouter is translated using [i18next](https://www.i18next.com/) library, via command `gulp i18next`. It extracts translatable elements into `locales/en.json` file (English version).
|
||||
|
||||
As soon as this file is modified, it must be uploaded to Transifex (manually) with the command `yarn push-transifex`.
|
||||
|
||||
Anyone can then translate BRouter directly on [Transifex](https://www.transifex.com/openstreetmap/brouter-web/) platform.
|
||||
|
||||
From time to time (eg. when preparing releases), we can update translated content with the command `yarn pull-transifex`. **It will overwrite all JSON files in `locales` directory**.
|
||||
|
||||
## License
|
||||
|
||||
BRouter is licensed under [MIT](LICENSE). Please make sure before adding any library that it is compatible with that. (GPL licenses are incompatible for instance).
|
||||
Loading…
Add table
Add a link
Reference in a new issue