Add translations for privacy settings flashes

This commit is contained in:
Andreas Nedbal 2022-02-19 17:45:34 +01:00 committed by Andreas Nedbal
parent 2fc4b8f4a4
commit 6541442098
2 changed files with 5 additions and 2 deletions

View File

@ -63,9 +63,9 @@ class UserController < ApplicationController
:privacy_allow_stranger_answers, :privacy_allow_stranger_answers,
:privacy_show_in_search) :privacy_show_in_search)
if current_user.update(user_attributes) if current_user.update(user_attributes)
flash[:success] = t('flash.user.update_privacy.success') flash[:success] = t(".success")
else else
flash[:error] = t('flash.user.update_privacy.error') flash[:error] = t(".error")
end end
redirect_to edit_user_privacy_path redirect_to edit_user_privacy_path
end end

View File

@ -51,6 +51,9 @@ en:
error: :errors.invalid_otp error: :errors.invalid_otp
destroy_2fa: destroy_2fa:
success: "Two factor authentication has been disabled for your account." success: "Two factor authentication has been disabled for your account."
update_privacy:
success: :user.update.success
error: :user.update.error
update_profile: update_profile:
success: :user.update.success success: :user.update.success
error: :user.update.error error: :user.update.error