From: Richard Fairhurst Date: Mon, 31 Mar 2014 16:51:37 +0000 (+0100) Subject: Merge pull request #19 from apmon/jsroute2 X-Git-Tag: live~4237^2~15^2~7 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/9126653ffd07e38800986a6410ae1fe0955989fc?hp=-c Merge pull request #19 from apmon/jsroute2 Minor fixes to the I18n code of routing --- 9126653ffd07e38800986a6410ae1fe0955989fc diff --combined app/assets/javascripts/routing.js.erb index 787d31dda,3f38beef4..5ff0656c8 --- a/app/assets/javascripts/routing.js.erb +++ b/app/assets/javascripts/routing.js.erb @@@ -216,7 -216,7 +216,7 @@@ OSM.Routing=function(map,name,jqSearch $('#turnbyturn').append(row); cumulative+=step[3]; } - $('#sidebar_content').append('

' + r.chosenEngine.creditline + '

'); + $('#sidebar_content').append('

' + I18n.t('javascripts.directions.instructions.courtesy',{link: r.chosenEngine.creditline}) + '

'); }; r.clickTurn=function(instruction,latlng) { @@@ -235,9 -235,7 +235,9 @@@ else { return Math.round(m / 1000) + "km"; } }; r.formatTime=function(s) { - var d=new Date(s*1000); var h=d.getHours(); var m=d.getMinutes(); + var m=Math.round(s/60); + var h=Math.floor(m/60); + m -= h*60; return h+":"+(m<10 ? '0' : '')+m; };