diff --git a/umap/templates/leaflet_storage/js.html b/umap/templates/leaflet_storage/js.html
new file mode 100644
index 00000000..4d6b6c5f
--- /dev/null
+++ b/umap/templates/leaflet_storage/js.html
@@ -0,0 +1,30 @@
+{% load compress %}
+{% compress js %}
+
+
+
+
+
+
+
+
+
+
+
+
+
+{% endcompress %}
+{% if locale %}
+
+{% endif %}
+{% compress js %}
+
+
+
+
+
+
+
+
+
+{% endcompress %}
diff --git a/umap/templates/leaflet_storage/map_detail.html b/umap/templates/leaflet_storage/map_detail.html
index 57803453..4353e428 100644
--- a/umap/templates/leaflet_storage/map_detail.html
+++ b/umap/templates/leaflet_storage/map_detail.html
@@ -7,12 +7,7 @@
{% compress css %}
{% leaflet_storage_css %}
{% endcompress %}
- {% compress js %}
- {% leaflet_storage_js %}
- {% endcompress %}
- {% if locale %}
-
- {% endif %}
+ {% leaflet_storage_js locale=locale %}
{% endblock %}
{% block content %}