]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.rhtml
Should have been part of [15755]: Cursed vc-dir interface
[rails.git] / app / views / site / index.rhtml
index 54f28172739f2521a33a6dfd4bddc098eb3b4230..de1de19f4a3c505519b006bc9a6eb7e871d8428f 100644 (file)
@@ -1,6 +1,6 @@
 <% content_for :greeting do %>
 <% if @user and !@user.home_lon.nil? and !@user.home_lat.nil? %>
-<%= link_to_function 'home', "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> |
+  <%= link_to_function t('layouts.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)", { :title => t('layouts.home_tooltip') } %> |
 <% end %>
 <% end %>
 
 
 <noscript>
   <div id="noscript">
-    <p>You are either using a browser that doesn't support javascript, or you have disabled javascript.</p>
-    <p>OpenStreetMap uses javascript for its slippy map.</p>
-    <p>You may want to try the <a href="http://tah.openstreetmap.org/Browse/">Tiles@Home static tile browser</a> if you are unable to enable javascript.</p>
+    <p><%= t 'site.index.js_1' %></p>
+    <p><%= t 'site.index.js_2' %></p>
+    <p><%= t 'site.index.js_3' %></p>
   </div>
 </noscript>
 
 <div id="map">
-<div id="permalink"><a href="/" id="permalinkanchor">Permalink</a></div>
+<div id="permalink"><a href="/" id="permalinkanchor"><%= t 'site.index.permalink' %></a></div>
 </div> 
 
 <div id="attribution">
   <table width="100%">
     <tr>
-      <td align="left">http://creativecommons.org/licenses/by-sa/2.0/</td>
-      <td align="right">http://openstreetmap.org/</td>
-    </tr>
-    <tr>
-      <td colspan="2" align="center">Licensed under the Creative Commons Attribution-Share Alike 2.0 license by the OpenStreetMap project and its contributors.</td>
+      <td align="center"><%=
+        I18n.t('site.index.license.notice',
+          :license_name => ('<a href="' + t('site.index.license.license_url') + '">' + t('site.index.license.license_name') + '</a>'),
+          :project_name => ('<a href="' + t('site.index.license.project_url') + '">' + t('site.index.license.project_name') + '</a>'))
+        %></td>
     </tr>
   </table>
 </div>
@@ -97,6 +97,8 @@ end
   var marker;
   var map;
 
+  OpenLayers.Lang.setCode("<%= I18n.locale.to_s %>");
+
   function mapInit(){
     map = createMap("map");
 
@@ -170,10 +172,12 @@ end
     var zoom = map.getZoom();
     var layers = getMapLayers();
     var extents = getMapExtent();
+    var expiry = new Date();
 
-    updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents);
+    updatelinks(lonlat.lon, lonlat.lat, zoom, layers, extents.left, extents.bottom, extents.right, extents.top);
 
-    document.cookie = "_osm_location=" + lonlat.lon + "|" + lonlat.lat + "|" + zoom + "|" + layers;
+    expiry.setYear(expiry.getFullYear() + 10); 
+    document.cookie = "_osm_location=" + lonlat.lon + "|" + lonlat.lat + "|" + zoom + "|" + layers + "; expires=" + expiry.toGMTString();
   }
 
   function resizeContent() {