From 698a49077c67297cd8ea7b370d1ac2298ee5d9f6 Mon Sep 17 00:00:00 2001 From: Shaun McDonald Date: Tue, 2 Jun 2009 16:07:52 +0000 Subject: [PATCH 1/1] Add some more missing translations. Use .to_sentence instead of .join(', ') so that it is localisable and is more readable. --- app/views/browse/_way_details.rhtml | 2 +- app/views/trace/_trace.rhtml | 4 ++-- config/locales/en.yml | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/browse/_way_details.rhtml b/app/views/browse/_way_details.rhtml index a11f06aad..cd912984c 100644 --- a/app/views/browse/_way_details.rhtml +++ b/app/views/browse/_way_details.rhtml @@ -11,7 +11,7 @@ <%= link_to h(printable_name(wn.node)), :action => "node", :id => wn.node_id.to_s %> <% related_ways = wn.node.ways.reject { |w| w.id == way_details.id } %> <% if related_ways.size > 0 then %> - (<%= t 'browse.way_details.also_part_of', :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.join(", ") %>) + (<%= t 'browse.way_details.also_part_of', :related_ways => related_ways.map { |w| link_to(h(printable_name(w)), :action => "way", :id => w.id.to_s) }.to_sentence %>) <% end %> <% end %> diff --git a/app/views/trace/_trace.rhtml b/app/views/trace/_trace.rhtml index 7c52e79ce..4e1733148 100644 --- a/app/views/trace/_trace.rhtml +++ b/app/views/trace/_trace.rhtml @@ -10,9 +10,9 @@ <%= link_to trace.name, {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id} %> ... <% if trace.inserted %> - (<%= trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %> points) + (<%= t'trace.trace.count_points', :count => trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/,'\1,') %>) <% end %> - ... <%= time_ago_in_words( trace.timestamp ) %> ago + ... <%= t'trace.trace.ago', :time_in_words_ago => time_ago_in_words(trace.timestamp) %> <%= link_to t('trace.trace.more'), {:controller => 'trace', :action => 'view', :display_name => trace.user.display_name, :id => trace.id}, {:title => t('trace.trace.trace_details')} %> / <%= link_to_if trace.inserted?, t('trace.trace.map'), {:controller => 'site', :action => 'index', :lat => trace.latitude, :lon => trace.longitude, :zoom => 14}, {:title => t('trace.trace.view_map')} %> / <%= link_to t('trace.trace.edit'), {:controller => 'site', :action => 'edit', :gpx => trace.id }, {:title => t('trace.trace.edit_map')} %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 75a10defd..c285f2524 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -163,7 +163,7 @@ en: way_details: nodes: "Nodes:" part_of: "Part of:" - also_part_of: "also part of {{related_ways}}" + also_part_of: "also part of the ways {{related_ways}}" way_history: way_history: "Way History" way_history_title: "Way History: {{way_name}}" @@ -482,6 +482,8 @@ en: of: "of" trace: pending: "PENDING" + count_points: "{{count}} points" + ago: "{{time_in_words_ago}} ago" more: "more" trace_details: "View Trace Details" view_map: "View Map" -- 2.39.5