brouter-web/CONTRIBUTING.md
Henrik Fehlauer f2dd3b95a4 Add warning regarding yarn build i18next / gulp i18next
Also mention what is done by maintainers.
2020-06-19 18:00:00 +00:00

1.9 KiB

Contributing

BRouter is heavily based on the following libraries:

Install dependencies

yarn

Build

#for development
yarn build debug

#for release
yarn build

Develop

yarn serve

Develop with Docker

#to install dependencies
docker-compose run --rm install

#to serve for development
docker-compose run --rm -p 3000:3000 serve

#or
docker-compose up 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 library, via command gulp i18next. It extracts translatable elements into locales/en.json file (English version). (Note that unused translation keys or keys not referenced in keys.js might get removed automatically. Make sure to commit any changes first before running this, and only amend the previous commit after checking the diff carefully.)

As soon as this file is modified, it must be uploaded by the maintainers to Transifex (manually) with the command yarn push-transifex.

Anyone can then translate BRouter directly on Transifex 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. Please make sure before adding any library that it is compatible with that. (GPL licenses are incompatible for instance).