pelias / labels

Pelias Label generation
https://pelias.io
MIT License
4 stars 9 forks source link

Language specific labels #51

Closed orangejulius closed 2 years ago

orangejulius commented 2 years ago

This PR sets up a system that allows label formats to vary depending on the display language for a given request. It will therefore require some changes to pass that language into the label generator when it's called in the Pelias API.

Label formats for different languages can be configured by adding a new labelSchema element under the languages property.

Along with this functionality comes some significantly enhanced testing for the logic that decides which label format to use. It was already a bit messy and completely untested. With some new functionality it was definitely time for some tests!

diff for just this PR