From: Andy Allan Date: Wed, 19 Jun 2019 09:23:43 +0000 (+0200) Subject: Use the distance_in_words_ago scope for trace display X-Git-Tag: live~2546^2~13 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/1298d80549e428d4907a474a176805a11c969714 Use the distance_in_words_ago scope for trace display Refs #2255 --- diff --git a/app/views/traces/_trace.html.erb b/app/views/traces/_trace.html.erb index 34f661500..ceeb4d88d 100644 --- a/app/views/traces/_trace.html.erb +++ b/app/views/traces/_trace.html.erb @@ -14,7 +14,7 @@ <% if trace.inserted %> (<%= t ".count_points", :count => trace.size.to_s.gsub(/(\d)(?=(\d{3})+$)/, '\1,') %>) <% end %> - ... <%= t ".ago", :time_in_words_ago => time_ago_in_words(trace.timestamp) %> + ... <%= time_ago_in_words(trace.timestamp, :scope => :'datetime.distance_in_words_ago') %> <%= link_to_if trace.inserted?, t(".map"), { :controller => "site", :action => "index", :mlat => trace.latitude, :mlon => trace.longitude, :anchor => "map=14/#{trace.latitude}/#{trace.longitude}" }, { :title => t(".view_map") } %> / <%= link_to t(".edit"), { :controller => "site", :action => "edit", :gpx => trace.id }, { :title => t(".edit_map") } %> <%= t("." + trace.visibility) %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 0281703ab..83aadc92c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1857,7 +1857,6 @@ en: trace: pending: "PENDING" count_points: "%{count} points" - ago: "%{time_in_words_ago} ago" more: "more" trace_details: "View Trace Details" view_map: "View Map"