From: John Firebaugh Date: Sat, 25 Aug 2012 02:00:59 +0000 (-0700) Subject: Set OpenLayers lang unobtrusively X-Git-Tag: live~5448 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/dcb25f0c07ef0252fb411be35030ead67f5da5d1 Set OpenLayers lang unobtrusively We output the locale code as the lang attribute, so use that rather than interpolating into embedded JS. --- diff --git a/app/assets/javascripts/openlayers.js.erb b/app/assets/javascripts/openlayers.js.erb index ebb9578a3..66d991f82 100644 --- a/app/assets/javascripts/openlayers.js.erb +++ b/app/assets/javascripts/openlayers.js.erb @@ -35,3 +35,5 @@ OpenLayers.Util.origGetImageLocation = OpenLayers.Util.getImageLocation; OpenLayers.Util.getImageLocation = function(image) { return OpenLayers.Util.imageURLs[image] || OpenLayers.Util.origGetImageLocation(image); }; + +OpenLayers.Lang.setCode($('html').attr('lang')); diff --git a/app/views/browse/_map.html.erb b/app/views/browse/_map.html.erb index 2c29a0d00..b8077e682 100644 --- a/app/views/browse/_map.html.erb +++ b/app/views/browse/_map.html.erb @@ -41,8 +41,6 @@ <% if map.instance_of? Changeset or (map.instance_of? Node and map.version > 1) or map.visible %>