From: Tom Hughes Date: Thu, 25 Nov 2021 17:15:10 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/3378' X-Git-Tag: live~1917 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/5dfbf00776d5247a92cb36135d509fa0eb0b2730?hp=b6f0c40a6084f245602393820400193373adf2aa Merge remote-tracking branch 'upstream/pull/3378' --- diff --git a/app/controllers/diary_entries_controller.rb b/app/controllers/diary_entries_controller.rb index 12f31bad2..312e1e54c 100644 --- a/app/controllers/diary_entries_controller.rb +++ b/app/controllers/diary_entries_controller.rb @@ -235,6 +235,8 @@ class DiaryEntriesController < ApplicationController end def comments + @title = t ".title", :user => @user.display_name + conditions = { :user_id => @user } conditions[:visible] = true unless can? :unhidecomment, DiaryEntry diff --git a/app/views/diary_entries/comments.html.erb b/app/views/diary_entries/comments.html.erb index 5f08f8d30..e3a7ff23e 100644 --- a/app/views/diary_entries/comments.html.erb +++ b/app/views/diary_entries/comments.html.erb @@ -1,5 +1,6 @@ <% content_for :heading do %> -

<%= t(".has_commented_on", :display_name => @user.display_name) %>

+

<%= t ".heading", :user => @user.display_name %>

+

<%= t ".subheading_html", :user => link_to(@user.display_name, user_path(@user)) %>

<% end %> <% if @comments.empty? %> diff --git a/config/locales/en.yml b/config/locales/en.yml index caee480d9..25e3b8e1a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -504,7 +504,9 @@ en: title: "OpenStreetMap diary entries" description: "Recent diary entries from users of OpenStreetMap" comments: - has_commented_on: "%{display_name} has commented on the following diary entries" + title: "Diary Comments added by %{user}" + heading: "%{user}'s Diary Comments" + subheading_html: "Diary Comments added by %{user}" no_comments: "No diary comments" post: Post when: When