Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

kwargs for i18n calls

ulferts08d0ab78d8b5
diff --git a/app/controllers/types_controller.rb b/app/controllers/types_controller.rb
index db0090f90d2..6426a406274 100644
--- a/app/controllers/types_controller.rb
+++ b/app/controllers/types_controller.rb
@@ -168,7 +168,7 @@ class TypesController < ApplicationController
else
error_message = [
ApplicationController.helpers.sanitize(
- t(:'error_can_not_delete_type.explanation', { url: belonging_wps_url(@type.id) }),
+ t(:'error_can_not_delete_type.explanation', url: belonging_wps_url(@type.id)),
attributes: %w(href target)
)
]
@@ -177,7 +177,7 @@ class TypesController < ApplicationController
if !archived_projects.empty?
error_message.push(
t(:'error_can_not_delete_type.archived_projects',
- { archived_projects: archived_projects.map(&:name).join(', ') })
+ archived_projects: archived_projects.map(&:name).join(', '))
)
end
diff --git a/spec/controllers/types_controller_spec.rb b/spec/controllers/types_controller_spec.rb
index 1f6e152c4e2..5964a77d016 100644
--- a/spec/controllers/types_controller_spec.rb
+++ b/spec/controllers/types_controller_spec.rb
@@ -350,7 +350,7 @@ describe TypesController, type: :controller do
it 'should show an error message' do
error_message = [I18n.t(:'error_can_not_delete_type.explanation')]
error_message.push(I18n.t(:'error_can_not_delete_type.archived_projects',
- { archived_projects: project2.name }))
+ archived_projects: project2.name))
expect(sanitize_string(flash[:error])).to eq(sanitize_string(error_message))
end