Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (46 sloc) 2.06 KB

Install development environment

First, you need nodejs and git installed.

On Ubuntu:

sudo apt-get install node git

Then, clone the repository and install sub modules.

git clone
cd openstreetmap-date-format
npm install
npm install --only=dev # only needed, if your npm is in production mode

You can test, if everything works be running npm run test. You should not get any error messages.

Start developing code for your locale.

You need the ISO 639-1 of your language. In the example below, I used 'xy' as example. Replace this by the language code.

Create files for your language:

cp templates/en.js templates/xy.js
cp locale/template.js locale/xy.js
cp test/en.js test/xy.js


Adapt the files templates/xy.js, locale/xy.js and test/xy.js.

Test if your code works

You can test if the translations works with npm run test.

You should also check, if the translation works in a browser.

On the command line enter: npm run build-test && npm run start.

Then you can enter the addres http://localhost:3000 in your webbrowser. You should see the test-page of one of the locales. In the select box on the left top you can select your locale.

Press Ctrl-C on the command line to stop the webserver.

Commit and publish changes

Before publishing your code, please check your code style with npm run lint. It should follow the recommendations of standard JS.

To commit your changes:

git add templates/xy.js locale/xy.js test/xy.js
git commit

In the repository, run:

git remote add myrepo
git push myrepo -u master

Reload in the browser. A button for creating a pull request should appear. Follow instructions.