From: Andy Allan Date: Thu, 21 Mar 2024 14:01:13 +0000 (+0000) Subject: Merge pull request #4602 from AntonKhorev/no-lego-trace-details X-Git-Tag: live~641 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/0dc86d6cd47faa42ff6b538bd0342a1486e313b2?hp=f472e432e0e0afccd34dfcbbda3919a8254ed833 Merge pull request #4602 from AntonKhorev/no-lego-trace-details Avoid lego translation in trace time/user/tags string --- diff --git a/app/views/traces/_trace.html.erb b/app/views/traces/_trace.html.erb index f72671e37..184570499 100644 --- a/app/views/traces/_trace.html.erb +++ b/app/views/traces/_trace.html.erb @@ -29,11 +29,13 @@

- <%= friendly_date_ago(trace.timestamp) %> - <%= t ".by" %> <%= link_to trace.user.display_name, trace.user %> - <% if !trace.tags.empty? %> - <%= t ".in" %> - <%= safe_join(trace.tags.collect { |tag| link_to_tag tag.tag }, ", ") %> + <% if trace.tags.empty? %> + <%= t ".details_without_tags_html", :time_ago => friendly_date_ago(trace.timestamp), + :user => link_to(trace.user.display_name, trace.user) %> + <% else %> + <%= t ".details_with_tags_html", :time_ago => friendly_date_ago(trace.timestamp), + :user => link_to(trace.user.display_name, trace.user), + :tags => safe_join(trace.tags.collect { |tag| link_to_tag tag.tag }, ", ") %> <% end %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 9af2dd566..9af89978e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2541,8 +2541,8 @@ en: identifiable: "IDENTIFIABLE" private: "PRIVATE" trackable: "TRACKABLE" - by: "by" - in: "in" + details_with_tags_html: "%{time_ago} by %{user} in %{tags}" + details_without_tags_html: "%{time_ago} by %{user}" index: public_traces: "Public GPS Traces" my_gps_traces: "My GPS Traces"