]> git.openstreetmap.org Git - rails.git/commitdiff
Split engine translations
authorMarwin Hochfelsner <50826859+hlfan@users.noreply.github.com>
Thu, 20 Feb 2025 11:47:06 +0000 (12:47 +0100)
committerMarwin Hochfelsner <50826859+hlfan@users.noreply.github.com>
Fri, 21 Feb 2025 11:00:43 +0000 (12:00 +0100)
app/assets/javascripts/index/directions.js
config/locales/en.yml

index 240d987ba20f7602be5795715e3e277475ce5a45..6dbdedabcc24da07fcefc0a03c200e608c43a014 100644 (file)
@@ -310,7 +310,11 @@ OSM.Directions.engines = [];
 OSM.Directions.addEngine = function (engine, supportsHTTPS) {
   if (document.location.protocol === "http:" || supportsHTTPS) {
     engine.id = engine.provider + "_" + engine.mode;
-    engine.localeId = I18n.t("javascripts.directions.engines." + engine.id);
+    engine.localeId = `${
+      I18n.t("site.search.modes." + engine.mode)
+    } (${
+      I18n.t("site.search.providers." + engine.provider)
+    })`;
     OSM.Directions.engines.push(engine);
   }
 };
index dd7ae4033841195b001ab689f0757bdc5d50bd32..3a82aab3909b280ce105f7bf34ec78862d6d4500 100644 (file)
@@ -2382,6 +2382,14 @@ en:
       where_am_i_title: Describe the current location using the search engine
       submit_text: "Go"
       reverse_directions_text: "Reverse Directions"
+      modes:
+        bicycle: "Bicycle"
+        car: "Car"
+        foot: "Foot"
+      providers:
+        fossgis_osrm: "OSRM"
+        graphhopper: "GraphHopper"
+        fossgis_valhalla: "Valhalla"
     key:
       table:
         entry:
@@ -3227,16 +3235,6 @@ en:
     edit_help: Move the map and zoom in on a location you want to edit, then click here.
     directions:
       ascend: "Ascend"
-      engines:
-        fossgis_osrm_bike: "Bicycle (OSRM)"
-        fossgis_osrm_car: "Car (OSRM)"
-        fossgis_osrm_foot: "Foot (OSRM)"
-        graphhopper_bicycle: "Bicycle (GraphHopper)"
-        graphhopper_car: "Car (GraphHopper)"
-        graphhopper_foot: "Foot (GraphHopper)"
-        fossgis_valhalla_bicycle: "Bicycle (Valhalla)"
-        fossgis_valhalla_car: "Car (Valhalla)"
-        fossgis_valhalla_foot: "Foot (Valhalla)"
       descend: "Descend"
       directions: "Directions"
       distance: "Distance"