diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1ef80ca..bec8064 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,9 +48,9 @@ docker-compose up serve ### 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). +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). (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 to Transifex (manually) with the command `yarn push-transifex`. +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](https://www.transifex.com/openstreetmap/brouter-web/) platform. diff --git a/index.html b/index.html index f5df4de..96d26d7 100644 --- a/index.html +++ b/index.html @@ -61,7 +61,8 @@ role="button" aria-haspopup="true" aria-expanded="false" - data-i18n="[title]navbar.export-tooltip" + data-i18n="[title]keyboard.generic-shortcut" + data-i18n-options='{ "action": "$t(navbar.export-tooltip)", "key": "X" }' title="Export route" > @@ -79,6 +80,12 @@ aria-haspopup="true" aria-expanded="false" data-i18n="[title]navbar.load.tooltip" + data-i18n-options='{ + "tracksAction": "$t(navbar.load.tracks)", + "tracksKey": "O", + "nogosAction": "$t(navbar.load.nogos)", + "nogosKey": "$t(keyboard.shift)+O" + }' title="Load route" > @@ -113,7 +120,8 @@