diff --git a/WebContent/localization/OSRM.Locale.de.js b/WebContent/localization/OSRM.Locale.de.js index f17b01e92..86c555fb6 100644 --- a/WebContent/localization/OSRM.Locale.de.js +++ b/WebContent/localization/OSRM.Locale.de.js @@ -63,6 +63,7 @@ OSRM.Localization["de"] = { "NW": "Nordwest", // driving directions // %s: road name +// %d: direction // [*]: will only be printed when there actually is a road name "DIRECTION_0":"Unbekannte Anweisung[ auf %s]", "DIRECTION_1":"Geradeaus weiterfahren[ auf %s]", @@ -73,7 +74,7 @@ OSRM.Localization["de"] = { "DIRECTION_6":"Leicht links abbiegen[ auf %s]", "DIRECTION_7":"Links abbiegen[ auf %s]", "DIRECTION_8":"Scharf links abbiegen[ auf %s]", -"DIRECTION_10":"Fahren Sie Richtung %s", +"DIRECTION_10":"Fahren Sie Richtung %d[ auf %s]", "DIRECTION_11-1":"In den Kreisverkehr einfahren und bei erster Möglichkeit[ in Richtung %s] verlassen", "DIRECTION_11-2":"In den Kreisverkehr einfahren und bei zweiter Möglichkeit[ in Richtung %s] verlassen", "DIRECTION_11-3":"In den Kreisverkehr einfahren und bei dritter Möglichkeit[ in Richtung %s] verlassen", diff --git a/WebContent/localization/OSRM.Locale.en.js b/WebContent/localization/OSRM.Locale.en.js index d8b3beedc..1210ce2e7 100644 --- a/WebContent/localization/OSRM.Locale.en.js +++ b/WebContent/localization/OSRM.Locale.en.js @@ -63,6 +63,7 @@ OSRM.Localization["en"] = { "NW": "northwest", // driving directions // %s: road name +// %d: direction // [*]: will only be printed when there actually is a road name "DIRECTION_0":"Unknown instruction[ on %s]", "DIRECTION_1":"Continue[ on %s]", @@ -73,7 +74,7 @@ OSRM.Localization["en"] = { "DIRECTION_6":"Turn slight left[ on %s]", "DIRECTION_7":"Turn left[ on %s]", "DIRECTION_8":"Turn sharp left[ on %s]", -"DIRECTION_10":"Head %s", +"DIRECTION_10":"Head %d[ on %s]", "DIRECTION_11-1":"Enter roundabout and leave at first exit[ on %s]", "DIRECTION_11-2":"Enter roundabout and leave at second exit[ on %s]", "DIRECTION_11-3":"Enter roundabout and leave at third exit[ on %s]", diff --git a/WebContent/localization/OSRM.Locale.fi.js b/WebContent/localization/OSRM.Locale.fi.js index f98f1bfd4..a650fadab 100644 --- a/WebContent/localization/OSRM.Locale.fi.js +++ b/WebContent/localization/OSRM.Locale.fi.js @@ -63,6 +63,7 @@ OSRM.Localization["fi"] = { "NW": "luoteeseen", // driving directions // %s: road name +// %d: direction // [*]: will only be printed when there actually is a road name "DIRECTION_0":"Tuntematon ohje[ tielle %s]", "DIRECTION_1":"Jatka[ tielle %s]", @@ -73,7 +74,7 @@ OSRM.Localization["fi"] = { "DIRECTION_6":"Käänny loivasti vasemmalle[ tielle %s]", "DIRECTION_7":"Käänny vasemmalle[ tielle %s]", "DIRECTION_8":"Käänny jyrkästi vasemmalle [ tielle %s]", -"DIRECTION_10":"Aja %s", +"DIRECTION_10":"Aja %d [ tielle %s]", "DIRECTION_11-1":"Aja liikenneympyrään ja poistu ensimmäisestä haarasta[ tielle %s]", "DIRECTION_11-2":"Aja liikenneympyrään ja poistu toisesta haarasta[ tielle %s]", "DIRECTION_11-3":"Aja liikenneympyrään ja poistu kolmannesta haarasta[ tielle %s]", diff --git a/WebContent/routing/OSRM.RoutingDescription.js b/WebContent/routing/OSRM.RoutingDescription.js index 0d5d39831..45d28158a 100644 --- a/WebContent/routing/OSRM.RoutingDescription.js +++ b/WebContent/routing/OSRM.RoutingDescription.js @@ -73,12 +73,10 @@ show: function(response) { route_desc += '
'; // build route description - if( i == 0 ) - route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"$1").replace(/%s/, OSRM.loc(response.route_instructions[i][6]) ); - else if( response.route_instructions[i][1] != "" ) - route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"$1").replace(/%s/, response.route_instructions[i][1]); + if( response.route_instructions[i][1] != "" ) + route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"$1").replace(/%s/, response.route_instructions[i][1]).replace(/%d/, OSRM.loc(response.route_instructions[i][6])); else - route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,""); + route_desc += OSRM.loc(OSRM.RoutingDescription.getDrivingInstruction(response.route_instructions[i][0])).replace(/\[(.*)\]/,"").replace(/%d/, OSRM.loc(response.route_instructions[i][6])); route_desc += '
'; route_desc += "";