From 0f72554a9f526abbf7160346f7b81ea1dc145f35 Mon Sep 17 00:00:00 2001 From: slong753 Date: Thu, 30 Mar 2023 13:57:18 -0500 Subject: [PATCH] translations for messages --- app/Http/Controllers/Assets/BulkAssetsController.php | 4 ++-- resources/lang/en/admin/hardware/message.php | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Assets/BulkAssetsController.php b/app/Http/Controllers/Assets/BulkAssetsController.php index 63472ee94b..8cfbec849f 100644 --- a/app/Http/Controllers/Assets/BulkAssetsController.php +++ b/app/Http/Controllers/Assets/BulkAssetsController.php @@ -335,13 +335,13 @@ class BulkAssetsController extends Controller public function restore(Request $request) { $assetIds = $request->get('ids'); if (empty($assetIds)) { - return redirect()->route('hardware.index')->with('error', 'No Assets Selected'); + return redirect()->route('hardware.index')->with('error', trans('admin/hardware/message.restore.nothing_updated')); } else { foreach ($assetIds as $key => $assetId) { $asset = Asset::withTrashed()->find($assetId); $asset->restore(); } - return redirect()->route('hardware.index')->with('success', 'Assets Restored'); + return redirect()->route('hardware.index')->with('success', trans('admin/hardware/message.restore.success')); } } } diff --git a/resources/lang/en/admin/hardware/message.php b/resources/lang/en/admin/hardware/message.php index fabbb63243..18f3b3fa24 100644 --- a/resources/lang/en/admin/hardware/message.php +++ b/resources/lang/en/admin/hardware/message.php @@ -23,6 +23,8 @@ return [ 'restore' => [ 'error' => 'Asset was not restored, please try again', 'success' => 'Asset restored successfully.', + 'bulk_success' => 'Asset restored successfully.', + 'nothing_updated' => 'No assets were selected, so nothing was restored.', ], 'audit' => [