From: Go MAEDA Date: Fri, 15 Feb 2019 23:44:20 +0000 (+0000) Subject: Translation missing error in "Project's Status" filter options (#30718). X-Git-Tag: 4.1.0~1114 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6a639cdf0fd331c17c63a0e777dea64239e4eb3c;p=redmine.git Translation missing error in "Project's Status" filter options (#30718). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17869 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/project.rb b/app/models/project.rb index 85d9cb43f..6d91d570a 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -24,12 +24,6 @@ class Project < ActiveRecord::Base STATUS_CLOSED = 5 STATUS_ARCHIVED = 9 - LABEL_BY_STATUS = { - 1 => l(:project_status_active), - 5 => l(:project_status_closed), - 9 => l(:project_status_archived), - } - # Maximum length for project identifiers IDENTIFIER_MAX_LENGTH = 100 diff --git a/app/models/query.rb b/app/models/query.rb index bfc6841c2..f6cc3bd2c 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -604,10 +604,10 @@ class Query < ActiveRecord::Base # Returns a scope of project statuses that are available as columns or filters def project_statuses_values - project_statuses = Project::LABEL_BY_STATUS - # Remove archived status from filters - project_statuses.delete(9) - project_statuses.stringify_keys.invert.to_a + [ + [l(:project_status_active), "#{Project::STATUS_ACTIVE}"], + [l(:project_status_closed), "#{Project::STATUS_CLOSED}"] + ] end # Adds available filters