]> git.openstreetmap.org Git - rails.git/commitdiff
Rationalize browse translation keys
authorJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 12 Nov 2013 20:51:33 +0000 (12:51 -0800)
committerJohn Firebaugh <john.firebaugh@gmail.com>
Tue, 12 Nov 2013 20:51:33 +0000 (12:51 -0800)
17 files changed:
app/helpers/browse_helper.rb
app/helpers/changeset_helper.rb
app/views/browse/_common_details.html.erb
app/views/browse/_node_details.html.erb
app/views/browse/_relation_details.html.erb
app/views/browse/_way_details.html.erb
app/views/browse/changeset.html.erb
app/views/browse/node.html.erb
app/views/browse/node_history.html.erb
app/views/browse/relation.html.erb
app/views/browse/relation_history.html.erb
app/views/browse/way.html.erb
app/views/browse/way_history.html.erb
app/views/changeset/_changeset.html.erb
app/views/changeset/list.atom.builder
app/views/user/_contact.html.erb
config/locales/en.yml

index b3145ebced39d71799b8435f6998cc51f607dced..cf13c27958943a6438b0fdcf99a947416667709a 100644 (file)
@@ -59,10 +59,10 @@ module BrowseHelper
 
   def type_and_paginated_count(type, pages)
     if pages.page_count == 1
-      t "browse.changeset_details.#{type}",
+      t "browse.changeset.#{type}",
         :count => pages.item_count
     else
-      t "browse.changeset_details.#{type}_paginated",
+      t "browse.changeset.#{type}_paginated",
         :x => pages.current_page.first_item,
         :y => pages.current_page.last_item,
         :count => pages.item_count
index 262500355e3a249caff4aac9c5a6d20d5ddd7346..65391f3fcaba3d7729dc61739a1828fc863fe041 100644 (file)
@@ -5,20 +5,20 @@ module ChangesetHelper
     closed_at = distance_of_time_in_words_to_now(changeset.closed_at)
     date = ''
     if changeset.closed_at > DateTime.now
-      date << t('browse.changeset_details.created_at') + ' '
-      date << content_tag(:abbr, t('browse.changeset_details.ago', :ago => created_at), title: l(changeset.created_at))
+      date << t('browse.created') + ' '
+      date << content_tag(:abbr, t('browse.ago', :ago => created_at), title: l(changeset.created_at))
     else
-      date << t('browse.changeset_details.closed_at') + ' '
-      both_times = t('browse.changeset_details.created_at') + ': ' + l(changeset.created_at)
+      date << t('browse.closed') + ' '
+      both_times = t('browse.created') + ': ' + l(changeset.created_at)
       both_times << '&#10;'
-      both_times << t('browse.changeset_details.closed_at') + ': ' + l(changeset.closed_at)
-      date << content_tag(:abbr, t('browse.changeset_details.ago', :ago => created_at), title: both_times.html_safe)
+      both_times << t('browse.closed') + ': ' + l(changeset.closed_at)
+      date << content_tag(:abbr, t('browse.ago', :ago => created_at), title: both_times.html_safe)
     end
     out << content_tag(:span, date.html_safe, class: 'date')
     unless params.key?(:display_name)
       userspan = ''
       if changeset.user.data_public?
-        userspan << ' ' + t('browse.changeset_details.by') + ' '
+        userspan << ' ' + t('browse.by') + ' '
         if changeset.user.data_public?
           user = link_to changeset.user.display_name, user_path(changeset.user.display_name)
         else
index fe663e53d0f9230e6a0b69a748978f086fa4db60..c1738ed9a478fb51e64dd096a51e8b591d9d1012 100644 (file)
@@ -2,30 +2,30 @@
   <% if common_details.changeset.tags['comment'].present? %>
     <%= linkify(h(common_details.changeset.tags['comment'])) %>
   <% else %>
-    <%= t 'browse.changeset_details.no_comment' %>
+    <%= t 'browse.no_comment' %>
   <% end %>
 </h4>
 
 <div class="details">
   <% if common_details.visible? %>
-    <%= t 'browse.common_details.edited' %>
+    <%= t 'browse.edited' %>
   <% else %>
-    <%= t 'browse.common_details.deleted' %>
+    <%= t 'browse.deleted' %>
   <% end %>
 
   <abbr><%= distance_of_time_in_words_to_now(common_details.timestamp) %> ago</abbr>
 
   <% if common_details.changeset.user.data_public? %>
-    <%= t 'browse.common_details.by' %>
+    <%= t 'browse.by' %>
     <%= link_to h(common_details.changeset.user.display_name), :controller => "user", :action => "view", :display_name => common_details.changeset.user.display_name %>
   <% end %>
 </div>
 
 <div class="details">
-  <%= t 'browse.common_details.version' %>
+  <%= t 'browse.version' %>
   #<%= h(common_details.version) %>
   &middot;
-  <%= t 'browse.common_details.in_changeset' %>
+  <%= t 'browse.in_changeset' %>
   #<%= link_to common_details.changeset_id, :action => :changeset, :id => common_details.changeset_id %>
 </div>
 
index 2300e75ccee449808ad1c16710d43b3fee0d5915..d169f22ac589d086d2e3f25a0d598abae50e0bad 100644 (file)
@@ -9,7 +9,7 @@
     <%= render :partial => "common_details", :object => node_details %>
 
     <% unless node_details.ways.empty? and node_details.containing_relation_members.empty? %>
-      <h4><%= t 'browse.node_details.part_of' %></h4>
+      <h4><%= t 'browse.part_of' %></h4>
       <ul>
         <% node_details.ways.each do |way| %>
           <li><%= link_to h(printable_name(way)), { :action => "way", :id => way.id.to_s }, :class => link_class('way', way), :title => link_title(way) %></li>
index dcc694c1886fa82aaebb144ba400da5a98e1f6f7..41b9be4320854879ba1f53c4c3e69e8968290a66 100644 (file)
@@ -9,12 +9,12 @@
     <%= render :partial => "common_details", :object => relation_details %>
 
     <% unless relation_details.relation_members.empty? %>
-      <h4><%= t'browse.relation_details.members' %></h4>
+      <h4><%= t'browse.relation.members' %></h4>
       <ul><%= render :partial => "relation_member", :collection => relation_details.relation_members %></ul>
     <% end %>
 
     <% unless relation_details.containing_relation_members.empty? %>
-      <h4><%= t'browse.relation_details.part_of' %></h4>
+      <h4><%= t'browse.part_of' %></h4>
       <ul><%= render :partial => "containing_relation", :collection => relation_details.containing_relation_members %></ul>
     <% end %>
   <% end %>
index 30e29d989d2c79a66a5269ed8a683f3cd7aa8cee..dbb0030bfd236a2a31fb52a718cdd4b813e724f5 100644 (file)
@@ -9,14 +9,14 @@
     <%= render :partial => "common_details", :object => way_details %>
 
     <% unless way_details.way_nodes.empty? %>
-      <h4><%= t'browse.way_details.nodes' %></h4>
+      <h4><%= t'browse.way.nodes' %></h4>
       <ul>
         <% way_details.way_nodes.each do |wn| %>
           <li>
             <%= link_to h(printable_name(wn.node)), { :action => "node", :id => wn.node_id.to_s }, :class => link_class('node', wn.node), :title => link_title(wn.node) %>
             <% related_ways = wn.node.ways.reject { |w| w.id == wn.way_id } %>
             <% if related_ways.size > 0 then %>
-              (<%= raw t 'browse.way_details.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>)
+              (<%= raw t 'browse.way.also_part_of', :count => related_ways.size, :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), { :action => "way", :id => w.id.to_s }, :class => link_class('way', w), :title => link_title(w) ) }.to_sentence %>)
             <% end %>
           </li>
         <% end %>
@@ -24,7 +24,7 @@
     <% end %>
 
     <% unless way_details.containing_relation_members.empty? %>
-      <h4><%= t'browse.way_details.part_of' %></h4>
+      <h4><%= t'browse.part_of' %></h4>
       <ul>
         <%= render :partial => "containing_relation", :collection => way_details.containing_relation_members %>
       </ul>
index eaa02af58ca534da94b3c737c67a93938fc89fbc..8d4aa8afa9a263efa753de545e5f2d1577035e68 100644 (file)
@@ -6,7 +6,7 @@
 </h2>
 
 <div class="browse-section">
-  <h4><%= @changeset.tags['comment'].to_s.presence || t('browse.changeset_details.no_comment') %></h4>
+  <h4><%= @changeset.tags['comment'].to_s.presence || t('browse.no_comment') %></h4>
   <div class="details"><%= changeset_details(@changeset) %></div>
 
   <%= render :partial => "tag_details", :object => @changeset.tags.except('comment') %>
index b5f65339d0cab5dd0c60a4df8eb4944950ff6531..95c5c252ec80a1126ebb0d1bcc578e76229e6d3a 100644 (file)
@@ -11,7 +11,7 @@
 <%= render :partial => "node_details", :object => @node %>
 
 <div class='secondary-actions'>
-  <%= link_to(t('browse.node.download_xml'), :controller => "node", :action => "read") %>
+  <%= link_to(t('browse.download_xml'), :controller => "node", :action => "read") %>
   &middot;
-  <%= link_to(t('browse.node.view_history'), :action => "node_history") %>
+  <%= link_to(t('browse.view_history'), :action => "node_history") %>
 </div>
index ed75695610e810b9bff1ce37941fccf48e5a404e..569b02891582b5cb29491301258cc0ddebb377ea 100644 (file)
@@ -1,11 +1,11 @@
 <%
   @name = printable_name @node
-  set_title(t('browse.node_history.node_history') + ' | ' + @name)
+  set_title(t('browse.node.node_history') + ' | ' + @name)
 %>
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
-  <%= raw t'browse.node_history.node_history_title', :node_name => link_to(h(@name), :action => "node", :id => @node.id) %>
+  <%= raw t'browse.node.node_history_title', :node_name => link_to(h(@name), :action => "node", :id => @node.id) %>
 </h2>
 
 <% @node.old_nodes.reverse.each do |node| %>
@@ -13,7 +13,7 @@
 <% end %>
 
 <div class='secondary-actions'>
-  <%= link_to(t('browse.node_history.download_xml'), :controller => "old_node", :action => "history") %>
+  <%= link_to(t('browse.download_xml'), :controller => "old_node", :action => "history") %>
   &middot;
-  <%= link_to(t('browse.node_history.view_details'), :action => "node") %>
+  <%= link_to(t('browse.view_details'), :action => "node") %>
 </div>
index 2587fe01b615aa4a29bfe15dc9d15318e4fb15c6..39f642417ca5cae5bbefe794e5205e82a7bc6439 100644 (file)
@@ -11,7 +11,7 @@
 <%= render :partial => "relation_details", :object => @relation %>
 
 <div class='secondary-actions'>
-  <%= link_to(t('browse.relation.download_xml'), :controller => "relation", :action => "read") %>
+  <%= link_to(t('browse.download_xml'), :controller => "relation", :action => "read") %>
   &middot;
-  <%= link_to(t('browse.relation.view_history'), :action => "relation_history") %>
+  <%= link_to(t('browse.view_history'), :action => "relation_history") %>
 </div>
index 6481d490a1e27bd9cff709fadee3e3ba1c8d261e..1656b36b90056597e89f69d93ebc3d8ddacdc61d 100644 (file)
@@ -1,11 +1,11 @@
 <%
   @name = printable_name @relation
-  set_title(t('browse.relation_history.relation_history') + ' | ' + @name)
+  set_title(t('browse.relation.relation_history') + ' | ' + @name)
 %>
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
-  <%= raw t'browse.relation_history.relation_history_title', :relation_name => link_to(h(@name), :action => "relation", :id => @relation.id) %>
+  <%= raw t'browse.relation.relation_history_title', :relation_name => link_to(h(@name), :action => "relation", :id => @relation.id) %>
 </h2>
 
 <% @relation.old_relations.reverse.each do |relation| %>
@@ -13,7 +13,7 @@
 <% end %>
 
 <div class='secondary-actions'>
-  <%= link_to(t('browse.relation_history.download_xml'), :controller => "old_relation", :action => "history") %>
+  <%= link_to(t('browse.download_xml'), :controller => "old_relation", :action => "history") %>
   &middot;
-  <%= link_to(t('browse.relation_history.view_details'), :action => "relation") %>
+  <%= link_to(t('browse.view_details'), :action => "relation") %>
 </div>
index bd7b4d07acc27187c6b9b3a4e3678602d1c1c9ad..56c57b210420db737e71069e4de0e62d12d9a6d5 100644 (file)
@@ -11,7 +11,7 @@
 <%= render :partial => "way_details", :object => @way %>
 
 <div class='secondary-actions'>
-  <%= link_to(t('browse.way.download_xml'), :controller => "way", :action => "read") %>
+  <%= link_to(t('browse.download_xml'), :controller => "way", :action => "read") %>
   &middot;
-  <%= link_to(t('browse.way.view_history'), :action => "way_history") %>
+  <%= link_to(t('browse.view_history'), :action => "way_history") %>
 </div>
index 307608e460ee381add0659c1cf384bc3d01848ef..fcc82547338019661f7535f522e40da4dde9b87c 100644 (file)
@@ -1,11 +1,11 @@
 <%
   @name = printable_name @way
-  set_title(t('browse.way_history.way_history') + ' | ' + @name)
+  set_title(t('browse.way.way_history') + ' | ' + @name)
 %>
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
-  <%= raw t'browse.way_history.way_history_title', :way_name => link_to(h(@name), :action => "way", :id => @way.id) %>
+  <%= raw t'browse.way.way_history_title', :way_name => link_to(h(@name), :action => "way", :id => @way.id) %>
 </h2>
 
 <% @way.old_ways.reverse.each do |way| %>
@@ -13,7 +13,7 @@
 <% end %>
 
 <div class='secondary-actions'>
-  <%= link_to(t('browse.way_history.download_xml'), :controller => "old_way", :action => "history") %>
+  <%= link_to(t('browse.download_xml'), :controller => "old_way", :action => "history") %>
   &middot;
-  <%= link_to(t('browse.way_history.view_details'), :action => "way") %>
+  <%= link_to(t('browse.view_details'), :action => "way") %>
 </div>
index 52bc3be0d95930a0d363093de3df7590777ffe97..07afd36bfcbe4963abed4273cb14956a60f40e13 100644 (file)
@@ -18,7 +18,7 @@
       <% if changeset.tags['comment'].to_s != '' %>
         <%= linkify(h(changeset.tags['comment'])) %>
       <% else %>
-        <%= t 'changeset.changeset.no_comment' %>
+        <%= t 'browse.no_comment' %>
       <% end %>
     </a>
   </h4>
index 9ee13a829e72a0bb1128a2c264ac45b4161db28e..619dc4a082d2009d3bc1fc3534a29da0913d0e95 100644 (file)
@@ -40,16 +40,16 @@ atom_feed(:language => I18n.locale, :schema_date => 2009,
         xhtml.style "th { text-align: left } tr { vertical-align: top }"
         xhtml.table do |table|
           table.tr do |tr|
-            tr.th t("browse.changeset_details.created_at")
+            tr.th t("browse.created")
             tr.td l(changeset.created_at)
           end
           table.tr do |tr|
-            tr.th t("browse.changeset_details.closed_at")
+            tr.th t("browse.closed")
             tr.td l(changeset.closed_at)
           end
           if changeset.user.data_public?
             table.tr do |tr|
-              tr.th t("browse.changeset_details.belongs_to")
+              tr.th t("browse.changeset.belongs_to")
               tr.td do |td|
                 td.a h(changeset.user.display_name), :href => url_for(:controller => "user", :action => "view", :display_name => changeset.user.display_name, :only_path => false)
               end
index 9d719b52f5c1db00795916ef21dc5f86c2a99cd3..4811389f12f61b22368b8b84a7c178b142b4f77a 100644 (file)
@@ -24,7 +24,7 @@
       <% changeset = contact.changesets.first %>
       <% if changeset %>
         <%= t('user.view.latest edit', :ago => t('user.view.ago', :time_in_words_ago => time_ago_in_words(changeset.created_at))) %>
-        <% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('changeset.changeset.no_comment') %>
+        <% comment = changeset.tags['comment'].to_s != '' ? changeset.tags['comment'] : t('browse.no_comment') %>
         "<%= link_to(comment,
                             {:controller => 'browse', :action => 'changeset', :id => changeset.id},
                             {:title => t('changeset.changeset.view_changeset_details')})
index 8e30d947721885d92506754e859649a6f22ebe0c..6c147dbcb6e38cc7a0c5f8795300643aae3399e7 100644 (file)
@@ -95,17 +95,22 @@ en:
       name: "Remote Control"
       description: "Remote Control (JOSM or Merkaartor)"
   browse:
+    created: "Created"
+    edited: "Edited"
+    closed: "Closed"
+    deleted: "Deleted"
+    by: "by"
+    ago: "%{ago} ago"
+    version: "Version"
+    in_changeset: "Changeset"
+    no_comment: "(no comment)"
+    part_of: "Part of"
+    download_xml: "Download XML"
+    view_history: "View history"
+    view_details: "View details"
     changeset:
       title: "Changeset"
       changeset: "Changeset %{id}"
-      changesetxml: "Changeset XML"
-      osmchangexml: "osmChange XML"
-      feed:
-        title: "Changeset %{id}"
-        title_comment: "Changeset %{id} - %{comment}"
-    changeset_details:
-      created_at: "Created"
-      closed_at: "Closed"
       belongs_to: "Author"
       node: "Nodes (%{count})"
       node_paginated: "Nodes (%{x}-%{y} of %{count})"
@@ -113,32 +118,41 @@ en:
       way_paginated: "Ways (%{x}-%{y} of %{count})"
       relation: "Relations (%{count})"
       relation_paginated: "Relations (%{x}-%{y} of %{count})"
-      no_comment: "(no comment)"
-      ago: "%{ago} ago"
-      by: "by"
-    common_details:
-      edited: "Edited"
-      deleted: "Deleted"
-      by: "by"
-      version: "Version"
-      in_changeset: "Changeset"
-      changeset_comment: "Comment"
-    containing_relation:
-      entry: "Relation %{relation_name}"
-      entry_role: "Relation %{relation_name} (as %{relation_role})"
-    node_details:
-      part_of: "Part of"
-    node_history:
-      node_history: "Node History"
-      node_history_title: "Node History: %{node_name}"
-      download_xml: "Download XML"
-      view_details: "View details"
+      changesetxml: "Changeset XML"
+      osmchangexml: "osmChange XML"
+      feed:
+        title: "Changeset %{id}"
+        title_comment: "Changeset %{id} - %{comment}"
     node:
       node: "Node"
       node_title: "Node: %{node_name}"
-      download_xml: "Download XML"
-      view_history: "View history"
-      edit: "Edit node"
+      node_history: "Node History"
+      node_history_title: "Node History: %{node_name}"
+    way:
+      way: "Way"
+      way_title: "Way: %{way_name}"
+      way_history: "Way History"
+      way_history_title: "Way History: %{way_name}"
+      nodes: "Nodes"
+      also_part_of:
+        one: "part of way %{related_ways}"
+        other: "part of ways %{related_ways}"
+    relation:
+      relation: "Relation"
+      relation_title: "Relation: %{relation_name}"
+      relation_history: "Relation History"
+      relation_history_title: "Relation History: %{relation_name}"
+      members: "Members"
+    relation_member:
+      entry: "%{type} %{name}"
+      entry_role: "%{type} %{name} as %{role}"
+      type:
+        node: "Node"
+        way: "Way"
+        relation: "Relation"
+    containing_relation:
+      entry: "Relation %{relation_name}"
+      entry_role: "Relation %{relation_name} (as %{relation_role})"
     not_found:
       sorry: "Sorry, %{type} #%{id} could not be found."
       type:
@@ -160,26 +174,6 @@ en:
         node: "node"
         way: "way"
         relation: "relation"
-    relation_details:
-      members: "Members"
-      part_of: "Part of"
-    relation_history:
-      relation_history: "Relation History"
-      relation_history_title: "Relation History: %{relation_name}"
-      download_xml: "Download XML"
-      view_details: "View details"
-    relation_member:
-      entry: "%{type} %{name}"
-      entry_role: "%{type} %{name} as %{role}"
-      type:
-        node: "Node"
-        way: "Way"
-        relation: "Relation"
-    relation:
-      relation: "Relation"
-      relation_title: "Relation: %{relation_name}"
-      download_xml: "Download XML"
-      view_history: "View history"
     start_rjs:
       loaded_an_area_with_num_features: "Loading %{num_features} features, which may make your browser slow or unresponsive. Are sure you want to display this data?"
       load_data: "Load Data"
@@ -191,23 +185,6 @@ en:
         key: "The wiki description page for the %{key} tag"
         tag: "The wiki description page for the %{key}=%{value} tag"
       wikipedia_link: "The %{page} article on Wikipedia"
-    way_details:
-      nodes: "Nodes"
-      part_of: "Part of"
-      also_part_of:
-        one: "part of way %{related_ways}"
-        other: "part of ways %{related_ways}"
-    way_history:
-      way_history: "Way History"
-      way_history_title: "Way History: %{way_name}"
-      download_xml: "Download XML"
-      view_details: "View details"
-    way:
-      way: "Way"
-      way_title: "Way: %{way_name}"
-      download_xml: "Download XML"
-      view_history: "View history"
-      edit: "Edit way"
     note:
       title: "Note"
       new_note: "New Note"
@@ -236,7 +213,6 @@ en:
       previous: "« Previous"
     changeset:
       anonymous: "Anonymous"
-      no_comment: "(no comment)"
       no_edits: "(no edits)"
       view_changeset_details: "View changeset details"
     changesets: