$('#turnbyturn').append(row);
cumulative+=step[3];
}
- $('#sidebar_content').append('<p id="routing_credit">' + r.chosenEngine.creditline + '</p>');
+ $('#sidebar_content').append('<p id="routing_credit">' + I18n.t('javascripts.directions.instructions.courtesy',{link: r.chosenEngine.creditline}) + '</p>');
};
r.clickTurn=function(instruction,latlng) {
GraphHopperEngine = function(vehicleName, vehicleParam, locale) {
this.vehicleName = vehicleName;
this.vehicleParam = vehicleParam;
+ //At this point the local system isn't correctly initialised yet, so we don't have accurate information about current locale
this.locale = locale;
if (!locale)
this.locale = "en";
var that = this;
return {
name: "javascripts.directions.engines.graphhopper_"+this.vehicleName.toLowerCase(),
+ creditline: '<a href="http://graphhopper.com/" target="_blank">Graphhopper</a>',
draggable: false,
_hints: {},
getRoute: function(isFinal, points) {
var url = "http://graphhopper.com/routing/api/route?"
+ that.vehicleParam
- + "&locale=" + that.locale;
+ + "&locale=" + I18n.currentLocale();
for (var i = 0; i < points.length; i++) {
var pair = points[i].join(',');
url += "&point=" + pair;
var that = this;
return {
name: "javascripts.directions.engines.mapquest_"+this.vehicleName.toLowerCase(),
- creditline: 'Directions courtesy of <a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">',
+ creditline: '<a href="http://www.mapquest.com/" target="_blank">MapQuest</a> <img src="http://developer.mapquest.com/content/osm/mq_logo.png">',
draggable: false,
_hints: {},
MQ_SPRITE_MAP: {
url+="&from="+from.join(',');
url+="&to="+to.join(',');
url+="&"+that.vehicleParam;
- //url+="&locale=" + I18n.currentLocale(); //Doesn't actually work. MapQuest requires full locale e.g. "de_DE", but I18n only provides language, e.g. "de"
+ //url+="&locale=" + I18n.currentLocale(); //Doesn't actually work. MapQuest requires full locale e.g. "de_DE", but I18n may only provides language, e.g. "de"
url+="&manMaps=false";
url+="&shapeFormat=raw&generalize=0&unit=k";
this.requestCORS(url);
var that = this;
return {
name: "javascripts.directions.engines.osrm_"+this.vehicleName.toLowerCase(),
- creditline: 'Directions courtesy of <a href="http://project-osrm.org/" target="_blank">OSRM</a>',
+ creditline: '<a href="http://project-osrm.org/" target="_blank">OSRM</a>',
draggable: true,
_hints: {},
getRoute: function(isFinal,points) {
directions:
directions: "Fahranweisungen: "
engines:
- graphhopper_bike: "Fahrrad (GraphHopper)"
- mapquest_bike: "Fahrrad (MapQuest)"
+ graphhopper_bicycle: "Fahrrad (GraphHopper)"
+ graphhopper_foot: "Fuss (GraphHopper)"
+ mapquest_bicycle: "Fahrrad (MapQuest)"
+ mapquest_foot: "Fuss (MapQuest)"
+ mapquest_car: "Auto (MapQuest)"
osrm_car: "Auto (OSRM)"
- cloudmade_foot: "Fuss (Cloudmade)"
+ distance: "Distanz:"
+ time: "Zeit:"
+ errors:
+ no_route: "Wir konnten keine Strecke zwischen diesen beiden Orten berechnen."
+ no_place: "Wir konnten den Ort nicht finden."
instructions:
continue_on: "Weiter auf "
slight_right: "Rechts halten auf "
against_oneway: "Go against one-way on "
end_oneway: "Ende der Einbahnstrasse "
unnamed: "(unbekannt)"
+ courtesy: "Fahranweisungen stammen von %{link}"
key:
title: Legende
tooltip: Legende
against_oneway: "Go against one-way on "
end_oneway: "End of one-way on "
unnamed: "(unnamed)"
+ courtesy: "Directions courtesy of %{link}"
time: "Time"
redaction:
edit: