]> git.openstreetmap.org Git - rails.git/commitdiff
Note events use "opened" not "open" as the status
authorTom Hughes <tom@compton.nu>
Mon, 16 Dec 2019 22:26:33 +0000 (22:26 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 16 Dec 2019 22:26:33 +0000 (22:26 +0000)
app/views/browse/note.html.erb
config/locales/en.yml
test/helpers/note_helper_test.rb

index f68dfbe2eae5bfc2a8bd1cbb5778214604075d0f..2389598bcb61b3612984d26d98d66908de9a3430 100644 (file)
@@ -12,7 +12,7 @@
   </div>
 
   <div class="details" data-coordinates="<%= @note.lat %>,<%= @note.lon %>" data-status="<%= @note.status %>">
   </div>
 
   <div class="details" data-coordinates="<%= @note.lat %>,<%= @note.lon %>" data-status="<%= @note.status %>">
-    <%= note_event("open", @note.created_at, @note.author) %>
+    <%= note_event("opened", @note.created_at, @note.author) %>
     <% if @note.status == "closed" %>
       <br />
       <%= note_event(@note.status, @note.closed_at, @note_comments.last.author) %>
     <% if @note.status == "closed" %>
       <br />
       <%= note_event(@note.status, @note.closed_at, @note_comments.last.author) %>
index c634c30afb00cc5ec42abeac57949ef5001843a5..b99e068b879bfea7f615a9cc9a8548594f8afd76 100644 (file)
@@ -288,8 +288,8 @@ en:
       open_title: "Unresolved note #%{note_name}"
       closed_title: "Resolved note #%{note_name}"
       hidden_title: "Hidden note #%{note_name}"
       open_title: "Unresolved note #%{note_name}"
       closed_title: "Resolved note #%{note_name}"
       hidden_title: "Hidden note #%{note_name}"
-      open_by: "Created by %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
-      open_by_anonymous: "Created by anonymous <abbr title='%{exact_time}'>%{when}</abbr>"
+      opened_by: "Created by %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
+      opened_by_anonymous: "Created by anonymous <abbr title='%{exact_time}'>%{when}</abbr>"
       commented_by: "Comment from %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
       commented_by_anonymous: "Comment from anonymous <abbr title='%{exact_time}'>%{when}</abbr>"
       closed_by: "Resolved by %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
       commented_by: "Comment from %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
       commented_by_anonymous: "Comment from anonymous <abbr title='%{exact_time}'>%{when}</abbr>"
       closed_by: "Resolved by %{user} <abbr title='%{exact_time}'>%{when}</abbr>"
index ce82f3ab5b9df6c9daabe78a28e656cae17a2408..838217e405afd05c297c66bee32046158df8d46a 100644 (file)
@@ -8,7 +8,7 @@ class NoteHelperTest < ActionView::TestCase
     date = Time.new(2014, 3, 5, 21, 37, 45, "+00:00")
     user = create(:user)
 
     date = Time.new(2014, 3, 5, 21, 37, 45, "+00:00")
     user = create(:user)
 
-    assert_match %r{^Created by anonymous <abbr title='Wed, 05 Mar 2014 21:37:45 \+0000'><span title=" 5 March 2014 at 21:37">.* ago</span></abbr>$}, note_event("open", date, nil)
+    assert_match %r{^Created by anonymous <abbr title='Wed, 05 Mar 2014 21:37:45 \+0000'><span title=" 5 March 2014 at 21:37">.* ago</span></abbr>$}, note_event("opened", date, nil)
     assert_match %r{^Resolved by <a href="/user/#{ERB::Util.u(user.display_name)}">#{user.display_name}</a> <abbr title='Wed, 05 Mar 2014 21:37:45 \+0000'><span title=" 5 March 2014 at 21:37">.* ago</span></abbr>$}, note_event("closed", date, user)
   end
 
     assert_match %r{^Resolved by <a href="/user/#{ERB::Util.u(user.display_name)}">#{user.display_name}</a> <abbr title='Wed, 05 Mar 2014 21:37:45 \+0000'><span title=" 5 March 2014 at 21:37">.* ago</span></abbr>$}, note_event("closed", date, user)
   end