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 3c13c65369e8446d30b09ec0209aaf7fff60348c..cfde880cd522d77326c742ac644cceb44b105f8e 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 17549940a59b0a24cef04964173e4028f2350c9d..5b0807dba314923ac4e5e2f90f78309b79297c58 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