From b4cdbf58e95132294801d072d2810f29bdba9708 Mon Sep 17 00:00:00 2001 From: Lucie Daeye Date: Tue, 30 May 2017 15:28:45 +0200 Subject: [PATCH] small fixes --- CHANGELOG.md | 2 ++ Readme.md | 2 +- index.js | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e40673c5..0d44c487e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ All notable changes to this project will be documented in this file. For change - put future changes here +- Breaking API change: move language selection from module loading to `compile(language, step)` + # 0.2.1 2017-04-05 - Add Spanish translation (thanks @josek5494) diff --git a/Readme.md b/Readme.md index c1754a6be..548dd5493 100644 --- a/Readme.md +++ b/Readme.md @@ -35,7 +35,7 @@ parameter | required? | values | description ---|----|----|--- `version` | required | `v5` | Major OSRM version `options.hooks.tokenizedInstruction` | optional | `function(instruction)` | A function to change the raw instruction string before tokens are replaced. Useful to inject custom markup for tokens -`options.languages` | optional | `en` `de` `zh-Hans` `fr` `nl` `ru` [`etc`](https://github.com/Project-OSRM/osrm-text-instructions/tree/master/languages/translations/) | Array of language identifiers that should be supported. Default is loading all language files, which can be huge on websites +`language` | required | `en` `de` `zh-Hans` `fr` `nl` `ru` [and more](https://github.com/Project-OSRM/osrm-text-instructions/tree/master/languages/translations/) | Compiling instructions for the selected language code. ### Development #### Architecture diff --git a/index.js b/index.js index 18c6d85fe..14bc5744a 100644 --- a/index.js +++ b/index.js @@ -2,7 +2,6 @@ var languages = require('./languages'); var instructions = languages.instructions; module.exports = function(version, _options) { - // load instructions var options = {}; options.hooks = {}; options.hooks.tokenizedInstruction = ((_options || {}).hooks || {}).tokenizedInstruction;