From b5ebd544f4b35d5eae897eec877d92785f34f226 Mon Sep 17 00:00:00 2001 From: Boy132 Date: Fri, 15 Aug 2025 14:06:53 +0200 Subject: [PATCH] Improve translation for "link" and "unlink" (oauth) (#1612) --- app/Filament/Pages/Auth/EditProfile.php | 2 +- lang/en/profile.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Filament/Pages/Auth/EditProfile.php b/app/Filament/Pages/Auth/EditProfile.php index 8056dc2e2..8d86e1f73 100644 --- a/app/Filament/Pages/Auth/EditProfile.php +++ b/app/Filament/Pages/Auth/EditProfile.php @@ -174,7 +174,7 @@ class EditProfile extends BaseEditProfile $unlink = array_key_exists($id, $this->getUser()->oauth ?? []); $actions[] = Action::make("oauth_$id") - ->label(($unlink ? trans('profile.unlink') : trans('profile.link')) . $name) + ->label(trans('profile.' . ($unlink ? 'unlink' : 'link'), ['name' => $name])) ->icon($unlink ? 'tabler-unlink' : 'tabler-link') ->color(Color::hex($schema->getHexColor())) ->action(function (UserUpdateService $updateService) use ($id, $name, $unlink) { diff --git a/lang/en/profile.php b/lang/en/profile.php index e0d2085cd..662f84df1 100644 --- a/lang/en/profile.php +++ b/lang/en/profile.php @@ -21,8 +21,8 @@ return [ 'timezone' => 'Timezone', 'language' => 'Language', 'language_help' => 'Your language :state has not been translated yet!', - 'link' => 'Link ', - 'unlink' => 'Unlink ', + 'link' => 'Link :name', + 'unlink' => 'Unlink :name', 'unlinked' => ':name unlinked', 'scan_qr' => 'Scan QR Code', 'code' => 'Code',