From: Andy Allan Date: Sun, 31 May 2009 10:40:13 +0000 (+0000) Subject: i18n of the changeset views X-Git-Tag: live~7883^2~32 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/fddda4e i18n of the changeset views --- diff --git a/app/views/changeset/_changeset.rhtml b/app/views/changeset/_changeset.rhtml index 2a5356450..ae7a495c2 100644 --- a/app/views/changeset/_changeset.rhtml +++ b/app/views/changeset/_changeset.rhtml @@ -6,7 +6,7 @@ - <% if changeset.closed_at > DateTime.now %> (still editing) + <% if changeset.closed_at > DateTime.now %> <%= t'changeset.changeset.still_editing' %> <% else %><%= changeset.closed_at.strftime("%d %b %Y %H:%M") %><% end %> @@ -16,7 +16,7 @@ <% if changeset.user.data_public? %> <%= link_to h(changeset.user.display_name), :controller => "changeset", :action => "list_user", :display_name => changeset.user.display_name %> <% else %> - Anonymous + <%= t'changeset.changeset.anonymous' %> <% end %> <% end %> @@ -25,23 +25,23 @@ <% if changeset.tags['comment'] %> <%= h(changeset.tags['comment']) %> <% else %> - (none) + <%= t'changeset.changeset.no_comment' %> <% end %> <% if changeset.min_lat.nil? %> - (no edits) + <%= t'changeset.changeset.no_edits' %> <% else minlon = changeset.min_lon/GeoRecord::SCALE.to_f minlat = changeset.min_lat/GeoRecord::SCALE.to_f maxlon = changeset.max_lon/GeoRecord::SCALE.to_f maxlat = changeset.max_lat/GeoRecord::SCALE.to_f %> - <%= format("%0.3f",minlon) -%>,<%= format("%0.3f",minlat) -%>,<%= format("%0.3f",maxlon) -%>,<%= format("%0.3f",maxlat) -%> + '><%= format("%0.3f",minlon) -%>,<%= format("%0.3f",minlat) -%>,<%= format("%0.3f",maxlon) -%>,<%= format("%0.3f",maxlat) -%> <% if changeset.area > 1500000000000 %> - (big) + <% t'changeset.changeset.big_area' %> <% end end @@ -49,7 +49,7 @@ - <%= link_to 'more', {:controller => 'browse', :action => 'changeset', :id => changeset.id}, {:title => 'View changeset details'} %> + <%= link_to t('changeset.changeset.more'), {:controller => 'browse', :action => 'changeset', :id => changeset.id}, {:title => t('changeset.changeset.view_changeset_details')} %> diff --git a/app/views/changeset/_changeset_paging_nav.rhtml b/app/views/changeset/_changeset_paging_nav.rhtml index 7be15305d..b8ac1a65f 100644 --- a/app/views/changeset/_changeset_paging_nav.rhtml +++ b/app/views/changeset/_changeset_paging_nav.rhtml @@ -1,11 +1,11 @@ <% current_page = @edit_pages.current_page %> -Showing page +<%= t'changeset.changeset_paging_nav.showing_page' %> <%= current_page.number %> (<%= current_page.first_item %><% if (current_page.first_item < current_page.last_item) # if more than 1 changeset on page %>-<%= current_page.last_item %><% end %> -of <%= @edit_pages.item_count %>) +<%= t'changeset.changeset_paging_nav.of'%> <%= @edit_pages.item_count %>) <% if @edit_pages.page_count > 1 diff --git a/app/views/changeset/_changesets.rhtml b/app/views/changeset/_changesets.rhtml index 67e09045d..d9e01235c 100644 --- a/app/views/changeset/_changesets.rhtml +++ b/app/views/changeset/_changesets.rhtml @@ -1,14 +1,14 @@ <% showusername = true if showusername.nil? %> - - + + <% if showusername %> - + <% end %> - - + + <%= render :partial => 'changeset', :locals => {:showusername => showusername}, :collection => @edits unless @edits.nil? %> -
IDSaved at<%= t'changeset.changesets.id' %><%= t'changeset.changesets.saved_at' %>User<%= t'changeset.changesets.user' %>CommentArea<%= t'changeset.changesets.comment' %><%= t'changeset.changesets.area' %>
\ No newline at end of file + diff --git a/app/views/changeset/list.rhtml b/app/views/changeset/list.rhtml index b78469ddf..cfe4afd3f 100644 --- a/app/views/changeset/list.rhtml +++ b/app/views/changeset/list.rhtml @@ -1,9 +1,7 @@ -

Recent Changes

-

Recently edited changesets:

+

<%= t'changeset.list.recent_changes' %>

+

<%= t'changeset.list.recently_edited_changesets' %>

<%= render :partial => 'changesets' %> -

-For more changesets, select a user and view their edits, or see the editing 'history' of a specific area. -

+

<%= t'changeset.list.for_more_changesets' %>


diff --git a/app/views/changeset/list_bbox.rhtml b/app/views/changeset/list_bbox.rhtml index 34644e960..530b5a296 100644 --- a/app/views/changeset/list_bbox.rhtml +++ b/app/views/changeset/list_bbox.rhtml @@ -1,4 +1,4 @@ -

History

+

<%= t'changeset.list_bbox.history' %>

<% if @bbox!=nil minlon = @bbox[0] @@ -8,20 +8,20 @@ if @bbox!=nil %>

-Changesets within the area: - (<%= format("%0.3f",minlon) -%>,<%= format("%0.3f",minlat) -%>,<%= format("%0.3f",maxlon) -%>,<%= format("%0.3f",maxlat) -%>) +<%= t'changeset.list_bbox.changesets.within_the_area' %> + ('><%= format("%0.3f",minlon) -%>,<%= format("%0.3f",minlat) -%>,<%= format("%0.3f",maxlon) -%>,<%= format("%0.3f",maxlat) -%>)

<% if @edits.nil? or @edits.empty? %> -

No changesets

+

<%= t'changeset.list_bbox.no_changesets' %>

<% else %> <%= render :partial => 'changeset_paging_nav' %> <%= render :partial => 'changesets' %> <%= render :partial => 'changeset_paging_nav' %> -

For all changes everywhere see <%= link_to("Recent Changes", :controller => "browse", :action => "changesets") %>

+

<%= t'changeset.list_bbox.all_changes_everywhere' , :recent_changes_link => link_to(t('changest.list_bbox.recent_changes'), :controller => "browse", :action => "changesets") %>

<% end @@ -30,9 +30,9 @@ else #bbox is nil. happens if the user surfs to this page directly. %> -

No area specified

-

First use the view tab to pan and zoom to an area of interest, then click the history tab.

-

Alternatively view all <%= link_to("recent changes", :controller => "browse", :action => "changesets") %>

+

<%= t'changeset.list_bbox.no_area_specified' %>

+

<%= t'changeset.list_bbox.first_use_view', :view_tab_link => '' + t('changeset.list_bbox.view_tab') + '' %>

+

<%= t'changeset.list_bbox.alternatively_view', :recent_changes_link => link_to(t('changeset.list_bbox.recent_changes'), :controller => "browse", :action => "changesets") %>

<% end diff --git a/app/views/changeset/list_user.rhtml b/app/views/changeset/list_user.rhtml index cf99d7a48..7240e6027 100644 --- a/app/views/changeset/list_user.rhtml +++ b/app/views/changeset/list_user.rhtml @@ -1,13 +1,13 @@ -

Edits by <%= link_to(h(@display_name), {:controller=>'user', :action=>'view', :display_name=>@display_name}) %>

+

<%= t'changeset.list_user.edits_by_username', :username_link => link_to(h(@display_name), {:controller=>'user', :action=>'view', :display_name=>@display_name}) %>

<% if not @edits or @edits.empty? %> -

No visible edits by <%= h(@display_name) %>.

+

<%= t'changeset.list_user.no_visible_edits_by', :name => h(@display_name) %>.

<% else %> <%= render :partial => 'changeset_paging_nav' %> <%= render :partial => 'changesets', :locals => {:showusername => false} %> <%= render :partial => 'changeset_paging_nav' %> <% end %> -

For changes by all users see <%= link_to("Recent Changes", :controller => "browse", :action => "changesets") %>

+

<%= t'changeset.list_user.for_all_changes', :recent_changes_link => link_to(t('changeset.list_user.recent_changes'), :controller => "browse", :action => "changesets") %>


diff --git a/config/locales/en.yml b/config/locales/en.yml index ab290327c..5380f3fdc 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -102,6 +102,46 @@ en: download: "{{download_xml_link}} or {{view_history_link}}" download_xml: "Download XML" view_history: "view history" + changeset: + changeset_paging_nav: + showing_page: "Showing page" + of: "of" + changeset: + still_editing: "(still editing)" + anonymous: "Anonymous" + no_comment: "(none)" + no_edits: "(no edits)" + show_area_box: "show area box" + big_area: "(big)" + view_changeset_details: "View changeset details" + more: "more" + changesets: + id: "ID" + saved_at: "Saved at" + 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" diary_entry: list: new: New Diary Entry