From be7e9d44edb3b7dfb566f3bfb1c074bbc6e68737 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 15 Jun 2025 21:46:00 +0100 Subject: [PATCH] Make ARIA labels on diary cards translatable --- app/views/diary_entries/_profile_diaries.html.erb | 6 +++--- config/locales/en.yml | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/views/diary_entries/_profile_diaries.html.erb b/app/views/diary_entries/_profile_diaries.html.erb index a8f97e6c8..43359e43d 100644 --- a/app/views/diary_entries/_profile_diaries.html.erb +++ b/app/views/diary_entries/_profile_diaries.html.erb @@ -6,20 +6,20 @@

- + "> <%= link_to entry.title, diary_entry_path(@user, entry) %>

<%= truncate(strip_tags(entry.body.to_html), :length => 150) %>

- + "> <%= link_to diary_entry_path(@user, entry, :anchor => "comments"), :class => "text-body-secondary" do %> <%= t(".comments", :count => entry.comments.size) %> <% end %> - + "> <%= l(entry.created_at.to_date, :format => :long) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 70b5f317e..dc3e83b6a 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -658,6 +658,9 @@ en: comments: one: "%{count} comment" other: "%{count} comments" + title_label: Diary Entry + comments_label: Comments + date_label: Date diary_comments: new: heading: Add a comment to the following diary entry discussion? -- 2.39.5