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!
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 thelanguages
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