Use the friendly_data_ago helper for contacts on the dashboard

Also take the opportunity to fix the translation key.
This commit is contained in:
Andy Allan 2023-11-15 19:21:51 +00:00
parent d8400320a7
commit 026fce06f4
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@
<p class="mb-0">
<% changeset = contact.changesets.first %>
<% if changeset %>
<%= t("users.show.latest edit", :ago => time_ago_in_words(changeset.created_at, :scope => :"datetime.distance_in_words_ago")) %>
<%= t(".latest_edit_html", :ago => friendly_date_ago(changeset.created_at)) %>
<% comment = changeset.tags["comment"].to_s == "" ? t("browse.no_comment") : changeset.tags["comment"] %>
<q><%= link_to(comment,
{ :controller => "browse", :action => "changeset", :id => changeset.id },

View file

@ -465,6 +465,7 @@ en:
contact:
km away: "%{count}km away"
m away: "%{count}m away"
latest_edit_html: "Latest edit (%{ago}):"
popup:
your location: "Your location"
nearby mapper: "Nearby mapper"
@ -2731,7 +2732,6 @@ en:
ct status: "Contributor terms:"
ct undecided: Undecided
ct declined: Declined
latest edit: "Latest edit (%{ago}):"
email address: "Email address:"
created from: "Created from:"
status: "Status:"