Make reportable item titles translatable
authorTom Hughes <tom@compton.nu>
Sun, 10 Jun 2018 16:05:21 +0000 (17:05 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 10 Jun 2018 16:05:21 +0000 (17:05 +0100)
app/helpers/issues_helper.rb
config/locales/en.yml

index 3c13c65..cfde880 100644 (file)
@@ -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
index 1754994..5b0807d 100644 (file)
@@ -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