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 ".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