From f7d0a60fc184bb3549868977c2d8dafde7b10208 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 10 Jun 2018 17:05:21 +0100 Subject: [PATCH 1/1] Make reportable item titles translatable --- app/helpers/issues_helper.rb | 4 ++-- config/locales/en.yml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 3c13c6536..cfde880cd 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -19,9 +19,9 @@ module IssuesHelper when User reportable.display_name when DiaryComment - "#{reportable.diary_entry.title}, Comment id ##{reportable.id}" + I18n.t("issues.helper.reportable_title.diary_comment", :entry_title => reportable.diary_entry.title, :comment_id => reportable.id) when Note - "Note ##{reportable.id}" + I18n.t("issues.helper.reportable_title.note", :note_id => reportable.id) end end end diff --git a/config/locales/en.yml b/config/locales/en.yml index 17549940a..5b0807dba 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -982,6 +982,10 @@ en: reports: updated_at: "On %{datetime}" reported_by_html: "Reported as %{category} by %{user}" + helper: + reportable_title: + diary_comment: "%{entry_title}, comment #%{comment_id}" + note: "Note #{note_id}" issue_comments: create: comment_created: Your comment was successfully created -- 2.43.2