fix: add missing translation functions to controllers
This commit is contained in:
parent
a7c76ad7b8
commit
952e307f46
@ -114,7 +114,7 @@ class AbsenceController extends Controller
|
||||
|
||||
return redirect()
|
||||
->to(route('absences.show', ['absence' => $absence->id]))
|
||||
->with('success', 'Absence request submitted for approval. You will receive email confirmation shortly.');
|
||||
->with('success', __('Absence request submitted for approval. You will receive email confirmation shortly.'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -113,7 +113,7 @@ class AppointmentController extends Controller
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('success', 'Saved notes.');
|
||||
->with('success', __('Saved notes.'));
|
||||
|
||||
} catch (InvalidAppointmentException $ex) {
|
||||
return redirect()
|
||||
|
@ -45,7 +45,7 @@ class BanController extends Controller
|
||||
if (config('demo.is_enabled')) {
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', 'This feature is disabled');
|
||||
->with('error', __('This feature is disabled'));
|
||||
}
|
||||
|
||||
$this->authorize('create', [Ban::class, $user]);
|
||||
@ -69,7 +69,7 @@ class BanController 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->bans);
|
||||
|
@ -86,7 +86,7 @@ class DevToolsController extends Controller
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('success', 'Ran vote evaluation logic, with exit code ' . $code);
|
||||
->with('success', __('Ran vote evaluation logic, with exit code :exitCode ', ['exitCode' => $code]));
|
||||
|
||||
}
|
||||
|
||||
@ -97,12 +97,12 @@ class DevToolsController extends Controller
|
||||
if ($service->purgeExpired()) {
|
||||
return redirect()
|
||||
->back()
|
||||
->with('success', 'Force purged all expired suspensions.');
|
||||
->with('success', __('Force purged all expired suspensions.'));
|
||||
}
|
||||
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', 'There were no expired suspensions (or no suspensions at all) to purge.');
|
||||
->with('error', __('There were no expired suspensions (or no suspensions at all) to purge.'));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class TeamFileController extends Controller
|
||||
|
||||
if (is_null(Auth::user()->currentTeam))
|
||||
{
|
||||
$request->session()->flash('error', 'Please choose a team before viewing it\'s files.');
|
||||
$request->session()->flash('error', __('Please choose a team before viewing it\'s files.'));
|
||||
return redirect()->to(route('teams.index'));
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ class TeamFileController extends Controller
|
||||
{
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', 'This feature is disabled');
|
||||
->with('error', __('This feature is disabled'));
|
||||
}
|
||||
|
||||
try {
|
||||
@ -100,7 +100,7 @@ class TeamFileController extends Controller
|
||||
}
|
||||
catch (FileNotFoundException $ex)
|
||||
{
|
||||
$request->session()->flash('error', 'Sorry, but the requested file could not be found in storage. Sometimes, files may be physically deleted by admins, but not from the app\'s database.');
|
||||
$request->session()->flash('error', __('Sorry, but the requested file could not be found in storage. Sometimes, files may be physically deleted by admins, but not from the app\'s database.'));
|
||||
return redirect()->back();
|
||||
|
||||
}
|
||||
@ -121,7 +121,7 @@ class TeamFileController extends Controller
|
||||
{
|
||||
return redirect()
|
||||
->back()
|
||||
->with('error', 'This feature is disabled');
|
||||
->with('error', __('This feature is disabled'));
|
||||
}
|
||||
|
||||
try
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user