From ba87362e7fe237c00df01967e02d182c15039f5d Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Fri, 6 Dec 2024 11:15:34 +0300 Subject: [PATCH] Don't interpolate type in issue title --- app/controllers/issues_controller.rb | 2 +- app/views/issues/show.html.erb | 2 +- config/locales/en.yml | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 516fb68ce..5cedb3c70 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -48,7 +48,7 @@ class IssuesController < ApplicationController end def show - @title = t ".title", :status => @issue.status.humanize, :issue_id => @issue.id + @title = t ".title.#{@issue.status}", :issue_id => @issue.id @read_reports = @issue.read_reports @unread_reports = @issue.unread_reports @comments = @issue.comments diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index a58b8c5cb..74e7c0a4c 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -1,5 +1,5 @@ <% content_for :heading do %> -

<%= t ".title", :status => @issue.status.humanize, :issue_id => @issue.id %>

+

<%= @title %>

<%= @issue.reportable.model_name.human %> : <%= link_to reportable_title(@issue.reportable), reportable_url(@issue.reportable) %>

diff --git a/config/locales/en.yml b/config/locales/en.yml index 29c416c76..c423de766 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1477,7 +1477,10 @@ en: open: Open resolved: Resolved show: - title: "%{status} Issue #%{issue_id}" + title: + open: "Open Issue #%{issue_id}" + ignored: "Ignored Issue #%{issue_id}" + resolved: "Resolved Issue #%{issue_id}" reports: one: "%{count} report" other: "%{count} reports" -- 2.39.5