X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/3a51160a5b1c06126597cfaff31503839919c136..86a0ba0172e8744a58edae7399a05f8412fa14aa:/app/views/site/index.rhtml diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 53a4c9a07..f816dddd2 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -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('site.index.home'), "setPosition(#{@user.home_lat}, #{@user.home_lon}, 10)" %> | <% end %> <% end %> @@ -23,11 +23,11 @@
- - - - - +
http://creativecommons.org/licenses/by-sa/2.0/http://openstreetmap.org/
<%= t 'site.index.license' %><%= + I18n.t('site.index.license.notice', + :license_name => ('' + t('site.index.license.license_name') + ''), + :project_name => ('' + t('site.index.license.project_name') + '')) + %>
@@ -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.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() {