fix: add missing translation functions to controllers

This commit is contained in:
2022-03-31 16:54:39 +01:00
committed by Miguel Nogueira
parent a7c76ad7b8
commit 952e307f46
6 changed files with 17 additions and 17 deletions

View File

@@ -132,7 +132,7 @@ class UserController extends Controller
if (config('demo.is_enabled')) {
return redirect()
->back()
->with('error', 'This feature is disabled');
->with('error', __('This feature is disabled'));
}
$user = User::find(Auth::user()->id);
@@ -160,7 +160,7 @@ class UserController extends Controller
if (config('demo.is_enabled')) {
return redirect()
->back()
->with('error', 'This feature is disabled');
->with('error', __('This feature is disabled'));
}
$user = User::find(Auth::user()->id);
@@ -189,7 +189,7 @@ class UserController extends Controller
if (config('demo.is_enabled')) {
return redirect()
->back()
->with('error', 'This feature is disabled');
->with('error', _('This feature is disabled'));
}
$this->authorize('delete', $user);
@@ -209,7 +209,7 @@ class UserController extends Controller
if (config('demo.is_enabled')) {
return redirect()
->back()
->with('error', 'This feature is disabled');
->with('error', __('This feature is disabled'));
}
$this->authorize('adminEdit', $user);
@@ -248,7 +248,7 @@ class UserController extends Controller
if (config('demo.is_enabled')) {
return redirect()
->back()
->with('error', 'This feature is disabled');
->with('error', __('This feature is disabled'));
}
$currentSecret = $request->session()->get('current2FA');
@@ -306,7 +306,7 @@ class UserController extends Controller
if (config('demo.is_enabled')) {
return redirect()
->back()
->with('error', 'This feature is disabled');
->with('error', __('This feature is disabled'));
}
// TODO: move logic to policy