]> git.openstreetmap.org Git - rails.git/commitdiff
Update note comments to use friendly_date_ago helper
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 19 Jun 2019 10:16:04 +0000 (12:16 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 19 Jun 2019 16:04:08 +0000 (18:04 +0200)
Refs #2255

app/views/api/notes/_comment.html.erb
config/locales/en.yml

index d9c17848b26995f00abbd91f9e4fca25b943db84..f599eec1417366d78f0cb6f8d173e6798789d998 100644 (file)
@@ -1,8 +1,8 @@
 <div class="note-comment" style="margin-top: 5px">
   <% if comment.author.nil? -%>
 <div class="note-comment" style="margin-top: 5px">
   <% if comment.author.nil? -%>
-  <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_html", :when => friendly_date(comment.created_at) %></div>
+  <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_html", :when => friendly_date_ago(comment.created_at) %></div>
   <% else -%>
   <% else -%>
-  <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_by_html", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
+  <div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t ".#{comment.event}_at_by_html", :when => friendly_date_ago(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
   <% end -%>
   <div class="note-comment-text"><%= comment.body %></div>
 </div>
   <% end -%>
   <div class="note-comment-text"><%= comment.body %></div>
 </div>
index 8a6a97dc86751ddbc2768f026b104cf52c41d756..1de83f9d66c0fd0446ef1c1c80362b7d5c3000cf 100644 (file)
@@ -163,14 +163,14 @@ en:
   api:
     notes:
       comment:
   api:
     notes:
       comment:
-        opened_at_html: "Created %{when} ago"
-        opened_at_by_html: "Created %{when} ago by %{user}"
-        commented_at_html: "Updated %{when} ago"
-        commented_at_by_html: "Updated %{when} ago by %{user}"
-        closed_at_html: "Resolved %{when} ago"
-        closed_at_by_html: "Resolved %{when} ago by %{user}"
-        reopened_at_html: "Reactivated %{when} ago"
-        reopened_at_by_html: "Reactivated %{when} ago by %{user}"
+        opened_at_html: "Created %{when}"
+        opened_at_by_html: "Created %{when} by %{user}"
+        commented_at_html: "Updated %{when}"
+        commented_at_by_html: "Updated %{when}by %{user}"
+        closed_at_html: "Resolved %{when}"
+        closed_at_by_html: "Resolved %{when} by %{user}"
+        reopened_at_html: "Reactivated %{when}"
+        reopened_at_by_html: "Reactivated %{when} by %{user}"
       rss:
         title: "OpenStreetMap Notes"
         description_area: "A list of notes, reported, commented on or closed in your area [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})]"
       rss:
         title: "OpenStreetMap Notes"
         description_area: "A list of notes, reported, commented on or closed in your area [(%{min_lat}|%{min_lon}) -- (%{max_lat}|%{max_lon})]"