From: Tom Hughes Date: Sun, 10 Jun 2018 16:05:21 +0000 (+0100) Subject: Make reportable item titles translatable X-Git-Tag: live~3010^2~5 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/f7d0a60fc184bb3549868977c2d8dafde7b10208?hp=d3700e6201b4b78a70bbb2941572edc985b63c2c Make reportable item titles translatable --- 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