]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/routing_engines/osrm_car.js
Reformat string to avoid long line
[rails.git] / app / assets / javascripts / routing_engines / osrm_car.js
index cb80c5615ba3d7fd2e23a5f59aba707c11197a5f..da94adf053aa8356c385a1aff8b9ad9562850545 100644 (file)
@@ -3,7 +3,8 @@
 // *** need to clear hints at some point
 
 OSM.RoutingEngines.list.push({
-       name: 'Car (OSRM)',
+       name: "javascripts.directions.engines.osrm_car",
+       creditline: 'Directions courtesy of <a href="http://project-osrm.org/" target="_blank">OSRM</a>',
        draggable: true,
        _hints: {},
        getRoute: function(isFinal,points) {
@@ -34,7 +35,7 @@ OSM.RoutingEngines.list.push({
                        var instText="<b>"+(i+1)+".</b> ";
                        instText+=TURN_INSTRUCTIONS[instCodes[0]];
                        if (instCodes[1]) { instText+="exit "+instCodes[1]+" "; }
-                       if (instCodes[0]!=15) { instText+=s[1] ? "<b>"+s[1]+"</b>" : "(unnamed)"; }
+                       if (instCodes[0]!=15) { instText+=s[1] ? "<b>"+s[1]+"</b>" : I18n.t('javascripts.directions.instructions.unnamed'); }
                        steps.push([line[s[3]], s[0].split('-')[0], instText, s[2]]);
                }
                if (steps.length) router.setItinerary({ steps: steps });