diff --git a/app/controllers/inbox_controller.rb b/app/controllers/inbox_controller.rb index 2b537630..cbb05b95 100644 --- a/app/controllers/inbox_controller.rb +++ b/app/controllers/inbox_controller.rb @@ -20,7 +20,7 @@ class InboxController < ApplicationController if @inbox_author.empty? @empty = true - flash.now[:info] = "No questions from @#{params[:author]} found, showing default entries instead!" + flash.now[:info] = t(".author.info", author: params[:author]) else @inbox = @inbox_author @inbox_count = @inbox_author_count @@ -33,7 +33,7 @@ class InboxController < ApplicationController end rescue => e Sentry.capture_exception(e) - flash.now[:error] = "No user with the name @#{params[:author]} found, showing default entries instead!" + flash.now[:error] = t(".author.error", author: params[:author]) @not_found = true end end diff --git a/config/locales/controllers.en.yml b/config/locales/controllers.en.yml index efed0466..1010678c 100644 --- a/config/locales/controllers.en.yml +++ b/config/locales/controllers.en.yml @@ -23,6 +23,10 @@ en: destroy: success: "Announcement has been deleted successfully." error: "Unable to delete announcement." + inbox: + author: + info: "No questions from @%{author} found, showing default entries instead!" + error: "No user with the name @%{author} found, showing default entries instead!" services: create: success: "Service connected successfully."