Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #16387 -- Disabled localization in openlayers template. Thanks,…

… claudep.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit cb1d660962ac89eda7956b70566ae2324b11ae9e 1 parent d686667
Jannis Leidel authored August 12, 2011
6  django/contrib/gis/templates/gis/admin/openlayers.js
... ...
@@ -1,4 +1,4 @@
1  
-{# Author: Justin Bronn, Travis Pinney & Dane Springmeyer #}
  1
+{% load l10n %}{# Author: Justin Bronn, Travis Pinney & Dane Springmeyer #}
2 2
 OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857", OpenLayers.Layer.SphericalMercator.projectForward);
3 3
 {% block vars %}var {{ module }} = {};
4 4
 {{ module }}.map = null; {{ module }}.controls = null; {{ module }}.panel = null; {{ module }}.re = new RegExp("^SRID=\d+;(.+)", "i"); {{ module }}.layers = {};
@@ -68,7 +68,9 @@ OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857", OpenLayers.Layer.Sp
68 68
 {{ module }}.clearFeatures = function (){
69 69
   {{ module }}.deleteFeatures();
70 70
   document.getElementById('{{ id }}').value = '';
  71
+  {% localize off %}
71 72
   {{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }});
  73
+  {% endlocalize %}
72 74
 }
73 75
 // Add Select control
74 76
 {{ module }}.addSelectControl = function(){
@@ -137,7 +139,9 @@ OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857", OpenLayers.Layer.Sp
137 139
           {{ module }}.map.zoomTo({{ point_zoom }});
138 140
       }
139 141
     } else {
  142
+      {% localize off %}
140 143
       {{ module }}.map.setCenter(new OpenLayers.LonLat({{ default_lon }}, {{ default_lat }}), {{ default_zoom }});
  144
+      {% endlocalize %}
141 145
     }
142 146
     // This allows editing of the geographic fields -- the modified WKT is
143 147
     // written back to the content field (as EWKT, so that the ORM will know

0 notes on commit cb1d660

Please sign in to comment.
Something went wrong with that request. Please try again.