From: Andy Allan Date: Wed, 15 Nov 2023 19:21:51 +0000 (+0000) Subject: Use the friendly_data_ago helper for contacts on the dashboard X-Git-Tag: live~955^2~5 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/026fce06f412dec949d6faceb35b784c7b93a83e Use the friendly_data_ago helper for contacts on the dashboard Also take the opportunity to fix the translation key. --- diff --git a/app/views/dashboards/_contact.html.erb b/app/views/dashboards/_contact.html.erb index 0c012cec9..7e78a6895 100644 --- a/app/views/dashboards/_contact.html.erb +++ b/app/views/dashboards/_contact.html.erb @@ -23,7 +23,7 @@

<% 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"] %> <%= link_to(comment, { :controller => "browse", :action => "changeset", :id => changeset.id }, diff --git a/config/locales/en.yml b/config/locales/en.yml index 158f19ac4..379e02f66 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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:"