From 063ad574f444e5c91d9372e6377456b01dce120d Mon Sep 17 00:00:00 2001 From: JR Date: Fri, 26 Jun 2020 14:19:41 +0200 Subject: [PATCH] add translation function for dropdown labels --- src/GenerateAdminProfile.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/GenerateAdminProfile.php b/src/GenerateAdminProfile.php index 2f073ef..4bdac82 100644 --- a/src/GenerateAdminProfile.php +++ b/src/GenerateAdminProfile.php @@ -1,4 +1,6 @@ - Profile - {{-- Do not delete me :) I\'m used for auto-generation menu items --}}'); + ' {{ trans(\'brackets/admin-auth::admin.profile_dropdown.profile\') }} + {{-- Do not delete me :) I\'m used for auto-generation menu items --}}' + ); $this->strReplaceInFile( resource_path('views/admin/layout/profile-dropdown.blade.php'), '|url\(\'admin\/password\'\)|', '{{-- Do not delete me :) I\'m used for auto-generation menu items --}}', - ' Password - {{-- Do not delete me :) I\'m used for auto-generation menu items --}}'); + ' {{ trans(\'brackets/admin-auth::admin.profile_dropdown.password\') }} + {{-- Do not delete me :) I\'m used for auto-generation menu items --}}' + ); $this->info('Generating whole admin "My Profile" finished'); - } protected function getArguments() @@ -121,5 +124,4 @@ protected function getOptions() ['force', 'f', InputOption::VALUE_NONE, 'Force will delete files before regenerating admin profile'], ]; } - -} \ No newline at end of file +}