Add translations for inbox controller

This commit is contained in:
Andreas Nedbal 2022-04-19 22:31:08 +02:00 committed by Andreas Nedbal
parent 6b1be53827
commit bf0ac3c4e3
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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."