summaryrefslogtreecommitdiff
path: root/app/controllers/admin/topics_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/admin/topics_controller.rb')
-rw-r--r--app/controllers/admin/topics_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/admin/topics_controller.rb b/app/controllers/admin/topics_controller.rb
index e97ead12f71..345a778772d 100644
--- a/app/controllers/admin/topics_controller.rb
+++ b/app/controllers/admin/topics_controller.rb
@@ -23,7 +23,7 @@ class Admin::TopicsController < Admin::ApplicationController
@topic = Projects::Topic.new(topic_params)
if @topic.save
- redirect_to edit_admin_topic_path(@topic), notice: _('Topic %{topic_name} was successfully created.') % { topic_name: @topic.name }
+ redirect_to edit_admin_topic_path(@topic), notice: format(_('Topic %{topic_name} was successfully created.'), topic_name: @topic.name)
else
render "new"
end
@@ -42,7 +42,7 @@ class Admin::TopicsController < Admin::ApplicationController
redirect_to admin_topics_path,
status: :found,
- notice: _('Topic %{topic_name} was successfully removed.') % { topic_name: @topic.title_or_name }
+ notice: format(_('Topic %{topic_name} was successfully removed.'), topic_name: @topic.title_or_name)
end
def merge
@@ -53,7 +53,7 @@ class Admin::TopicsController < Admin::ApplicationController
return render status: :bad_request, json: { type: :alert, message: response.message } if response.error?
message = _('Topic %{source_topic} was successfully merged into topic %{target_topic}.')
- flash[:toast] = message % { source_topic: source_topic.name, target_topic: target_topic.name }
+ flash[:toast] = format(message, source_topic: source_topic.name, target_topic: target_topic.name)
redirect_to admin_topics_path, status: :found
end