]> git.openstreetmap.org Git - rails.git/commitdiff
Use the friendly_data_ago helper for contacts on the dashboard
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 15 Nov 2023 19:21:51 +0000 (19:21 +0000)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 15 Nov 2023 19:21:51 +0000 (19:21 +0000)
Also take the opportunity to fix the translation key.

app/views/dashboards/_contact.html.erb
config/locales/en.yml

index 0c012cec90040c9921abb64cb9805ea990c12dae..7e78a6895a59ddc0da7dedb136da0fa3157a8476 100644 (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 },
index 158f19ac4dc5f9834ea74a0ccb9f5a6be2f0c71a..379e02f66be1208cc720c6a0a27f3963b465ea13 100644 (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:"