From: Tom Hughes Date: Sun, 5 Jul 2009 23:47:40 +0000 (+0000) Subject: Merge 16216:16355 from trunk. X-Git-Tag: live~7852^2~4 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/9a32033209545a69d60cbd551e6bd975cda64341?ds=inline;hp=-c Merge 16216:16355 from trunk. --- 9a32033209545a69d60cbd551e6bd975cda64341 diff --combined app/views/layouts/site.html.erb index 241bf1817,7728809bf..320161fa0 --- a/app/views/layouts/site.html.erb +++ b/app/views/layouts/site.html.erb @@@ -1,5 -1,5 +1,5 @@@ - + <%= javascript_include_tag 'prototype' %> <%= javascript_include_tag 'site' %> @@@ -47,14 -47,14 +47,14 @@@ traceclass = '' viewclass = 'active' if params['controller'] == 'site' and params['action'] == 'index' editclass = 'active' if params['controller'] == 'site' and params['action'] == 'edit' - historyclass = 'active' if params['controller'] == 'changeset' and params['action'] == 'list_bbox' + historyclass = 'active' if params['controller'] == 'changeset' and params['action'] == 'list' exportclass = 'active' if params['controller'] == 'site' and params['action'] == 'export' traceclass = 'active' if params['controller'] == 'trace' diaryclass = 'active' if params['controller'] == 'diary_entry' %>
  • <%= link_to t('layouts.view'), {:controller => 'site', :action => 'index'}, {:id => 'viewanchor', :title => t('layouts.view_tooltip'), :class => viewclass} %>
  • <%= link_to t('layouts.edit'), {:controller => 'site', :action => 'edit'}, {:id => 'editanchor', :title => t('layouts.edit_tooltip'), :class => editclass} %>
  • -
  • <%= link_to t('layouts.history'), {:controller => 'changeset', :action => 'list_bbox' }, {:id => 'historyanchor', :title => t('layouts.history_tooltip'), :class => historyclass} %>
  • +
  • <%= link_to t('layouts.history'), {:controller => 'changeset', :action => 'list' }, {:id => 'historyanchor', :title => t('layouts.history_tooltip'), :class => historyclass} %>
  • <% if params['controller'] == 'site' and (params['action'] == 'index' or params['action'] == 'export') %>
  • <%= link_to_remote t('layouts.export'), {:url => {:controller => 'export', :action => 'start'}}, {:id => 'exportanchor', :title => t('layouts.export_tooltip'), :class => exportclass, :href => url_for(:controller => 'site', :action => 'export')} %>
  • <% else %> diff --combined app/views/user/view.html.erb index 0dbc09dd3,1b582c0b9..e50610037 --- a/app/views/user/view.html.erb +++ b/app/views/user/view.html.erb @@@ -4,14 -4,14 +4,14 @@@ <%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %> | <%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %> -| <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list_user', :display_name => @user.display_name %> +| <%= link_to t('user.view.my edits'), :controller => 'changeset', :action => 'list', :display_name => @user.display_name %> | <%= link_to t('user.view.my traces'), :controller => 'trace', :action=>'mine' %> | <%= link_to t('user.view.my settings'), :controller => 'user', :action => 'account', :display_name => @user.display_name %> <% else %> <%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :display_name => @this_user.display_name %> | <%= link_to t('user.view.diary'), :controller => 'diary_entry', :action => 'list', :display_name => @this_user.display_name %> -| <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list_user', :display_name => @this_user.display_name %> +| <%= link_to t('user.view.edits'), :controller => 'changeset', :action => 'list', :display_name => @this_user.display_name %> | <%= link_to t('user.view.traces'), :controller => 'trace', :action => 'view', :display_name => @this_user.display_name %> | <% if @user and @user.is_friends_with?(@this_user) %> <%= link_to t('user.view.remove as friend'), :controller => 'user', :action => 'remove_friend', :display_name => @this_user.display_name %> @@@ -71,7 -71,16 +71,16 @@@ <% end %> <%= link_to h(@friend.display_name), :controller => 'user', :action => 'view', :display_name => @friend.display_name %> - <% if @friend.home_lon and @friend.home_lat %><%= t 'user.view.km away', :count => @this_user.distance(@friend).round %><% end %> + + <% if @friend.home_lon and @friend.home_lat %> + <% distance = @this_user.distance(@friend) %> + <% if distance < 1 %> + <%= t 'user.view.m away', :count => (distance * 1000).round %> + <% else %> + <%= t 'user.view.km away', :count => distance.round %> + <% end %> + <% end %> + (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => @friend.id %>) <%end%> @@@ -93,7 -102,14 +102,14 @@@ <% @this_user.nearby.each do |nearby| %> <%= link_to h(nearby.display_name), :controller => 'user', :action => 'view', :display_name => nearby.display_name %> - <%= t 'user.view.km away', :count => @this_user.distance(nearby).round %> + + <% distance = @this_user.distance(nearby) %> + <% if distance < 1 %> + <%= t 'user.view.m away', :count => (distance * 1000).round %> + <% else %> + <%= t 'user.view.km away', :count => distance.round %> + <% end %> + (<%= link_to t('user.view.send message'), :controller => 'message', :action => 'new', :user_id => nearby.id %>) <% end %> diff --combined config/locales/en.yml index c52e9b474,c1a0d17f5..e11cda46a --- a/config/locales/en.yml +++ b/config/locales/en.yml @@@ -83,18 -83,10 +83,18 @@@ en browse: changeset: title: "Changeset" - changeset: "Changeset:" + changeset: "Changeset: {{id}}" download: "Download {{changeset_xml_link}} or {{osmchange_xml_link}}" changesetxml: "Changeset XML" osmchangexml: "osmChange XML" + changeset_navigation: + user: + name_tooltip: "View edits by {{user}}" + prev_tooltip: "Previous edit by {{user}}" + next_tooltip: "Next edit by {{user}}" + all: + prev_tooltip: "Previous changeset" + next_tooltip: "Next changeset" changeset_details: created_at: "Created at:" closed_at: "Closed at:" @@@ -244,12 -236,27 +244,12 @@@ user: "User" comment: "Comment" area: "Area" - list_bbox: - history: "History" - changesets_within_the_area: "Changesets within the area:" - show_area_box: "show area box" - no_changesets: "No changesets" - all_changes_everywhere: "For all changes everywhere see {{recent_changes_link}}" - recent_changes: "Recent Changes" - no_area_specified: "No area specified" - first_use_view: "First use the {{view_tab_link}} to pan and zoom to an area of interest, then click the history tab." - view_the_map: "view the map" - view_tab: "view tab" - alternatively_view: "Alternatively, view all {{recent_changes_link}}" list: - recent_changes: "Recent Changes" - recently_edited_changesets: "Recently edited changesets:" - for_more_changesets: "For more changesets, select a user and view their edits, or see the editing 'history' of a specific area." - list_user: - edits_by_username: "Edits by {{username_link}}" - no_visible_edits_by: "No visible edits by {{name}}." - for_all_changes: "For changes by all users see {{recent_changes_link}}" - recent_changes: "Recent Changes" + title: "Changesets" + description: "Recent edits" + description_user: "Recent edits by {{user}}" + description_bbox: "Recent edits within {{bbox}}" + description_user_bbox: "Recent edits by {{user}} within {{bbox}}" diary_entry: new: title: New Diary Entry @@@ -331,10 -338,44 +331,44 @@@ add_marker: "Add a marker to the map" view_larger_map: "View Larger Map" geocoder: + search: + title: + latlon: 'Results from Internal' + us_postcode: 'Results from Geocoder.us' + uk_postcode: 'Results from NPEMap / FreeThe Postcode' + ca_postcode: 'Results from Geocoder.CA' + osm_namefinder: 'Results from OpenStreetMap Namefinder' + geonames: 'Results from GeoNames' + search_osm_namefinder: + prefix: "{{type}} " + suffix_place: ", {{distance}} {{direction}} of {{placename}}" + suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} of {{parentname}})" + suffix_suburb: "{{suffix}}, {{parentname}}" + description: + title: + osm_namefinder: '{{types}} from OpenStreetMap Namefinder' + geonames: 'Location from GeoNames' + types: + cities: Cities + towns: Towns + places: Places + description_osm_namefinder: + prefix: "{{distance}} {{direction}} of {{type}} " results: - results: "Results" - type_from_source: "{{type}} from {{source_link}}" no_results: "No results found" + distance: + zero: "less than 1km" + one: "about 1km" + other: "about {{count}}km" + direction: + south_west: "south-west" + south: "south" + south_east: "south-east" + east: "east" + north_east: "north-east" + north: "north" + north_west: "north-west" + west: "west" layouts: project_name: # in @@@ -571,7 -612,6 +605,6 @@@ search: Search where_am_i: "Where am I?" submit_text: "Go" - searching: "Searching..." search_help: "examples: 'Alkmaar', 'Regent Street, Cambridge', 'CB2 5AQ', or 'post offices near Lünen' <a href='http://wiki.openstreetmap.org/wiki/Search'>more examples...</a>" key: map_key: "Map key" @@@ -793,6 -833,7 +826,7 @@@ your friends: Your friends no friends: You have not added any friends yet. km away: "{{count}}km away" + m away: "{{count}}m away" nearby users: "Nearby users: " no nearby users: "There are no users who admit to mapping nearby yet." change your settings: change your settings diff --combined config/locales/is.yml index 3f4e68fe2,3860c5b01..c6484ad8d --- a/config/locales/is.yml +++ b/config/locales/is.yml @@@ -87,14 -87,6 +87,14 @@@ is download: "Niðurhala breytingunni á {{changeset_xml_link}} eða á {{osmchange_xml_link}}" changesetxml: "Breytingarsetts XML sniði" osmchangexml: "osmChange XML sniði" + changeset_navigation: + user: + name_tooltip: "Skoða breytingarsett eftir {{user}}" + prev_tooltip: "Fyrri breytingarsett eftir {{user}}" + next_tooltip: "Næsta breytingarsett eftir {{user}}" + all: + prev_tooltip: "Fyrra breytingarsett" + next_tooltip: "Næsta breytingarsett" changeset_details: created_at: "Búið til:" closed_at: "Lokað:" @@@ -349,10 -341,34 +349,34 @@@ add_marker: "Bæta við punkt á kortið" view_larger_map: "Skoða á stærra korti" geocoder: + search: + title: + latlon: 'Niðurstöður frá <a href="http://openstreetmap.org/">Internal</a>' + us_postcode: 'Niðurstöður frá <a href="http://geocoder.us/">Geocoder.us</a>' + uk_postcode: 'Niðurstöður frá <a href="http://www.npemap.org.uk/">NPEMap / FreeThe Postcode</a>' + ca_postcode: 'Niðurstöður frá <a href="http://geocoder.ca/">Geocoder.CA</a>' + osm_namefinder: 'Niðurstöður frá <a href="http://gazetteer.openstreetmap.org/namefinder/">OpenStreetMap Namefinder</a>' + geonames: 'Niðurstöður frá <a href="http://www.geonames.org/">GeoNames</a>' results: - results: "Niðurstöður" - type_from_source: "{{type}} frá {{source_link}}" no_results: "Ekkert fannst" + namefinder: + prefix: "{{type}} " + suffix_place: ", {{distance}} {{direction}} af {{placename}}" + suffix_parent: "{{suffix}} ({{parentdistance}} {{parentdirection}} af {{parentname}})" + suffix_suburb: "{{suffix}}, {{parentname}}" + distance: + zero: "minna en 1km" + one: "u.þ.b. 1km" + other: "u.þ.b. {{count}}km" + direction: + south_west: "suðvestur" + south: "suður" + south_east: "suðaustur" + east: "austur" + north_east: "norðaustur" + north: "norður" + north_west: "norðvestur" + west: "vestur" layouts: project_name: # in <title> @@@ -587,7 -603,6 +611,6 @@@ search: "Leita" where_am_i: "Hvar er ég?" submit_text: "Ok" - searching: "Leita..." search_help: "dæmi: „Akureyri“, „Laugavegur, Reykjavík“ eða „post offices near Lünen“. Sjá einnig <a href='http://wiki.openstreetmap.org/index.php?uselang=is&title=Search'>leitarhjálpina</a>." key: map_key: "Kortaskýringar" @@@ -812,6 -827,7 +835,7 @@@ your friends: Vinir þínir no friends: Þú átt enga vini km away: "í {{count}} km fjarlægð" + m away: "í {{count}} m fjarlægð" nearby users: "Nálægir notendur:" no nearby users: "Engir notendur hafa stillt staðsetningu sína nálægt þér." change your settings: "breyttu stillingunum þínum" diff --combined config/routes.rb index b19003343,d60b52b0b..845c1277c --- a/config/routes.rb +++ b/config/routes.rb @@@ -6,9 -6,9 +6,9 @@@ ActionController::Routing::Routes.draw map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create' map.connect "api/#{API_VERSION}/changeset/:id/upload", :controller => 'changeset', :action => 'upload', :id => /\d+/ - map.connect "api/#{API_VERSION}/changeset/:id/download", :controller => 'changeset', :action => 'download', :id => /\d+/ + map.changeset_download "api/#{API_VERSION}/changeset/:id/download", :controller => 'changeset', :action => 'download', :id => /\d+/ map.connect "api/#{API_VERSION}/changeset/:id/expand_bbox", :controller => 'changeset', :action => 'expand_bbox', :id => /\d+/ - map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read', :id => /\d+/, :conditions => { :method => :get } + map.changeset_read "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read', :id => /\d+/, :conditions => { :method => :get } map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'update', :id => /\d+/, :conditions => { :method => :put } map.connect "api/#{API_VERSION}/changeset/:id/close", :controller => 'changeset', :action => 'close', :id =>/\d+/ map.connect "api/#{API_VERSION}/changesets", :controller => 'changeset', :action => 'query' @@@ -81,16 -81,14 +81,16 @@@ map.connect '/browse/node/:id/history', :controller => 'browse', :action => 'node_history', :id => /\d+/ map.connect '/browse/relation/:id', :controller => 'browse', :action => 'relation', :id => /\d+/ map.connect '/browse/relation/:id/history', :controller => 'browse', :action => 'relation_history', :id => /\d+/ - map.connect '/browse/changeset/:id', :controller => 'browse', :action => 'changeset', :id => /\d+/ + map.changeset '/browse/changeset/:id', :controller => 'browse', :action => 'changeset', :id => /\d+/ map.connect '/browse/changesets', :controller => 'changeset', :action => 'list' + map.connect '/browse/changesets/feed', :controller => 'changeset', :action => 'list', :format => :atom # web site map.root :controller => 'site', :action => 'index' map.connect '/', :controller => 'site', :action => 'index' map.connect '/edit', :controller => 'site', :action => 'edit' - map.connect '/history', :controller => 'changeset', :action => 'list_bbox' + map.connect '/history', :controller => 'changeset', :action => 'list' + map.connect '/history/feed', :controller => 'changeset', :action => 'list', :format => :atom map.connect '/export', :controller => 'site', :action => 'export' map.connect '/login', :controller => 'user', :action => 'login' map.connect '/logout', :controller => 'user', :action => 'logout' @@@ -117,7 -115,7 +117,7 @@@ map.connect '/forgot-password.html', :controller => 'user', :action => 'lost_password' # permalink - map.connect '/go/:code', :controller => 'site', :action => 'permalink', :code => /[a-zA-Z0-9_@]+=*/ + map.connect '/go/:code', :controller => 'site', :action => 'permalink', :code => /[a-zA-Z0-9_@]+[=-]*/ # traces map.connect '/traces', :controller => 'trace', :action => 'list' @@@ -148,8 -146,7 +148,8 @@@ # user pages map.connect '/user/:display_name', :controller => 'user', :action => 'view' - map.connect '/user/:display_name/edits', :controller => 'changeset', :action => 'list_user' + map.connect '/user/:display_name/edits', :controller => 'changeset', :action => 'list' + map.connect '/user/:display_name/edits/feed', :controller => 'changeset', :action => 'list', :format =>:atom map.connect '/user/:display_name/make_friend', :controller => 'user', :action => 'make_friend' map.connect '/user/:display_name/remove_friend', :controller => 'user', :action => 'remove_friend' map.connect '/user/:display_name/diary', :controller => 'diary_entry', :action => 'list' @@@ -172,7 -169,15 +172,15 @@@ # geocoder map.connect '/geocoder/search', :controller => 'geocoder', :action => 'search' + map.connect '/geocoder/search_latlon', :controller => 'geocoder', :action => 'search_latlon' + map.connect '/geocoder/search_us_postcode', :controller => 'geocoder', :action => 'search_uk_postcode' + map.connect '/geocoder/search_uk_postcode', :controller => 'geocoder', :action => 'search_us_postcode' + map.connect '/geocoder/search_ca_postcode', :controller => 'geocoder', :action => 'search_ca_postcode' + map.connect '/geocoder/search_osm_namefinder', :controller => 'geocoder', :action => 'search_osm_namefinder' + map.connect '/geocoder/search_geonames', :controller => 'geocoder', :action => 'search_geonames' map.connect '/geocoder/description', :controller => 'geocoder', :action => 'description' + map.connect '/geocoder/description_osm_namefinder', :controller => 'geocoder', :action => 'description_osm_namefinder' + map.connect '/geocoder/description_geonames', :controller => 'geocoder', :action => 'description_geonames' # export map.connect '/export/start', :controller => 'export', :action => 'start'