From: Tom Hughes Date: Wed, 19 Mar 2025 17:36:59 +0000 (+0000) Subject: Get current locale correctly in routing engines X-Git-Tag: live~67 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/949c5276091f35e77796d39a4ed024dd2ea9f7da?hp=-c Get current locale correctly in routing engines Fixes #5821. --- 949c5276091f35e77796d39a4ed024dd2ea9f7da diff --git a/app/assets/javascripts/index/directions/fossgis_valhalla.js b/app/assets/javascripts/index/directions/fossgis_valhalla.js index 13fc020c2..d5e781e4a 100644 --- a/app/assets/javascripts/index/directions/fossgis_valhalla.js +++ b/app/assets/javascripts/index/directions/fossgis_valhalla.js @@ -97,7 +97,7 @@ costing: costing, directions_options: { units: "km", - language: OSM.i18n.currentLocale() + language: OSM.i18n.locale } }) }); diff --git a/app/assets/javascripts/index/directions/graphhopper.js b/app/assets/javascripts/index/directions/graphhopper.js index 6a1043fbf..b11c49472 100644 --- a/app/assets/javascripts/index/directions/graphhopper.js +++ b/app/assets/javascripts/index/directions/graphhopper.js @@ -57,7 +57,7 @@ // https://graphhopper.com/api/1/docs/routing/ const query = new URLSearchParams({ vehicle: vehicleType, - locale: OSM.i18n.currentLocale(), + locale: OSM.i18n.locale, key: "LijBPDQGfu7Iiq80w3HzwB4RUDJbMbhs6BU0dEnn", elevation: false, instructions: true,