From dc0abb83daaaa11156fb3d6ccaa10ee99b68034d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Cmit=20Tun=C3=A7?= Date: Tue, 30 Sep 2025 01:02:14 -0300 Subject: [PATCH] Update UserActions to enhance localization and tooltips for user management actions. Added labels and tooltips for change password and delete actions, ensuring consistent user experience in both English and Turkish. Updated localization files to include new keys for user actions. --- .../Admin/Resources/Users/Tables/UserActions.php | 13 +++++++++---- lang/en/users.php | 1 + lang/tr/users.php | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/app/Filament/Admin/Resources/Users/Tables/UserActions.php b/app/Filament/Admin/Resources/Users/Tables/UserActions.php index 1b6b343..8d66054 100644 --- a/app/Filament/Admin/Resources/Users/Tables/UserActions.php +++ b/app/Filament/Admin/Resources/Users/Tables/UserActions.php @@ -16,20 +16,23 @@ class UserActions { return [ EditAction::make() + ->label('') + ->tooltip(__('users.edit')) ->visible(fn () => Auth::user()?->can('Update:User')), Action::make('change_password') - ->label(__('filament-users::user.resource.change_password')) + ->label('') + ->tooltip(__('users.change_password')) ->icon('heroicon-o-key') ->color('warning') ->form([ TextInput::make('password') - ->label(__('filament-users::user.resource.password')) + ->label(__('users.password')) ->password() ->required() ->confirmed(), TextInput::make('password_confirmation') - ->label(__('filament-users::user.resource.password_confirmation')) + ->label(__('users.password_confirmation')) ->password() ->required(), ]) @@ -39,13 +42,15 @@ class UserActions ]); Notification::make() - ->title(__('filament-users::user.resource.change_password_success')) + ->title(__('users.password_changed_successfully')) ->success() ->send(); }) ->visible(fn () => Auth::user()?->can('Update:User')), DeleteAction::make() + ->label('') + ->tooltip(__('users.delete')) ->visible(fn () => Auth::user()?->can('Delete:User')), ]; } diff --git a/lang/en/users.php b/lang/en/users.php index bcf6852..ca42c06 100644 --- a/lang/en/users.php +++ b/lang/en/users.php @@ -12,6 +12,7 @@ return [ 'delete' => 'Delete User', 'restore' => 'Restore User', 'force_delete' => 'Force Delete User', + 'change_password' => 'Change Password', // Form fields 'name' => 'Full Name', diff --git a/lang/tr/users.php b/lang/tr/users.php index 7c771fd..e065672 100644 --- a/lang/tr/users.php +++ b/lang/tr/users.php @@ -12,6 +12,7 @@ return [ 'delete' => 'Kullanıcı Sil', 'restore' => 'Kullanıcıyı Geri Yükle', 'force_delete' => 'Kullanıcıyı Kalıcı Olarak Sil', + 'change_password' => 'Şifre Değiştir', // Form fields 'name' => 'Ad Soyad',