]> git.openstreetmap.org Git - rails.git/commitdiff
There is no need to translate the names of layers which are not shown
authorTom Hughes <tom@compton.nu>
Fri, 2 Oct 2009 23:03:42 +0000 (23:03 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 2 Oct 2009 23:03:42 +0000 (23:03 +0000)
in the layer switcher.

app/views/layouts/site.html.erb
config/locales/en.yml
public/javascripts/map.js

index a1d835dc1f0023331fdd7abc34168099ea546965..46a3d9d1143677054d030a848bda66330a7dc078 100644 (file)
@@ -12,9 +12,6 @@
       rails_i18n["site.layers.base.cycle_map"]     = '<%= escape_javascript(t('site.layers.base.cycle_map')) %>';
       rails_i18n["site.layers.base.noname"]        = '<%= escape_javascript(t('site.layers.base.noname')) %>';
       rails_i18n["site.layers.overlays.maplint"]   = '<%= escape_javascript(t('site.layers.overlays.maplint')) %>';
-      rails_i18n["site.layers.overlays.markers"]   = '<%= escape_javascript(t('site.layers.overlays.markers')) %>';
-      rails_i18n["site.layers.overlays.objects"]   = '<%= escape_javascript(t('site.layers.overlays.objects')) %>';
-      rails_i18n["site.layers.overlays.box_layer"] = '<%= escape_javascript(t('site.layers.overlays.box_layer')) %>';
     </script>
     <%= javascript_include_tag 'prototype' %>
     <%= javascript_include_tag 'site' %>
index 0473e771312e73208727cc170dc35fa4ce97cf1f..fb433d8afd166fee68152a846c19c71b1003914e 100644 (file)
@@ -622,9 +622,6 @@ en:
         noname: NoName
       overlays:
         maplint: Maplint
-        markers: Markers
-        objects: Objects
-        box_layer: Box Layer
     index:
       js_1: "You are either using a browser that doesn't support JavaScript, or you have disabled JavaScript."
       js_2: "OpenStreetMap uses JavaScript for its slippy map."
index 2685fc03a5c1712b10483cc0af95a3e26273c9ed..1afd3eef901a6c7e31d06aec248989c49c207dd7 100644 (file)
@@ -74,7 +74,7 @@ function createMap(divName, options) {
 
    var numZoomLevels = Math.max(mapnik.numZoomLevels, osmarender.numZoomLevels);
 
-   markers = new OpenLayers.Layer.Markers(rails_i18n["site.layers.overlays.markers"], {
+   markers = new OpenLayers.Layer.Markers("Markers", {
       displayInLayerSwitcher: false,
       numZoomLevels: numZoomLevels,
       maxExtent: new OpenLayers.Bounds(-20037508,-20037508,20037508,20037508),
@@ -108,7 +108,7 @@ function addMarkerToMap(position, icon, description) {
 }
 
 function addObjectToMap(url, zoom, callback) {
-   var layer = new OpenLayers.Layer.GML(rails_i18n["site.layers.overlays.objects"], url, {
+   var layer = new OpenLayers.Layer.GML("Objects", url, {
       format: OpenLayers.Format.OSM,
       style: {
           strokeColor: "blue",
@@ -152,9 +152,9 @@ function addObjectToMap(url, zoom, callback) {
 }
 
 function addBoxToMap(boxbounds) {
-   if(!vectors) {
+   if (!vectors) {
      // Be aware that IE requires Vector layers be initialised on page load, and not under deferred script conditions
-     vectors = new OpenLayers.Layer.Vector(rails_i18n["site.layers.overlays.box_layer"], {
+     vectors = new OpenLayers.Layer.Vector("Boxes", {
         displayInLayerSwitcher: false
      });
      map.addLayer(vectors);