summaryrefslogtreecommitdiff
path: root/app/controllers/profiles/chat_names_controller.rb
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2019-04-08 13:13:19 +0200
committerMartin Wortschack <mwortschack@gitlab.com>2019-04-08 13:13:29 +0200
commit6a0035d273deffd67506230d3776812e045d59cc (patch)
treef9b9787d3761fc0456b28a4656453c366a610c20 /app/controllers/profiles/chat_names_controller.rb
parent942ce36a72b460f8cac2091008869d845fd365e3 (diff)
downloadgitlab-ce-mw-i18n-flashes.tar.gz
Externalize strings in flash messagesmw-i18n-flashes
- Externalize strings in controllers - Update PO file
Diffstat (limited to 'app/controllers/profiles/chat_names_controller.rb')
-rw-r--r--app/controllers/profiles/chat_names_controller.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/app/controllers/profiles/chat_names_controller.rb b/app/controllers/profiles/chat_names_controller.rb
index 2e78b9e6dc7..80b8279e91e 100644
--- a/app/controllers/profiles/chat_names_controller.rb
+++ b/app/controllers/profiles/chat_names_controller.rb
@@ -15,9 +15,9 @@ class Profiles::ChatNamesController < Profiles::ApplicationController
new_chat_name = current_user.chat_names.new(chat_name_params)
if new_chat_name.save
- flash[:notice] = "Authorized #{new_chat_name.chat_name}"
+ flash[:notice] = _("Authorized %{new_chat_name}") % { new_chat_name: new_chat_name.chat_name }
else
- flash[:alert] = "Could not authorize chat nickname. Try again!"
+ flash[:alert] = _("Could not authorize chat nickname. Try again!")
end
delete_chat_name_token
@@ -27,7 +27,7 @@ class Profiles::ChatNamesController < Profiles::ApplicationController
def deny
delete_chat_name_token
- flash[:notice] = "Denied authorization of chat nickname #{chat_name_params[:user_name]}."
+ flash[:notice] = _("Denied authorization of chat nickname %{user_name}.") % { user_name: chat_name_params[:user_name] }
redirect_to profile_chat_names_path
end
@@ -36,9 +36,9 @@ class Profiles::ChatNamesController < Profiles::ApplicationController
@chat_name = chat_names.find(params[:id])
if @chat_name.destroy
- flash[:notice] = "Deleted chat nickname: #{@chat_name.chat_name}!"
+ flash[:notice] = _("Deleted chat nickname: %{chat_name}!") % { chat_name: @chat_name.chat_name }
else
- flash[:alert] = "Could not delete chat nickname #{@chat_name.chat_name}."
+ flash[:alert] = _("Could not delete chat nickname %{chat_name}.") % { chat_name: @chat_name.chat_name }
end
redirect_to profile_chat_names_path, status: :found