From 1298d80549e428d4907a474a176805a11c969714 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 19 Jun 2019 11:23:43 +0200 Subject: [PATCH] Use the distance_in_words_ago scope for trace display Refs #2255 --- app/views/traces/_trace.html.erb | 2 +- config/locales/en.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) 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" -- 2.45.1