Browse Source

feat: template lang

igb 4 months ago
parent
commit
de6798a39d

+ 1 - 1
app/Admin/Controllers/DistAdminDistributorController.php

@@ -115,7 +115,7 @@ class DistAdminDistributorController extends AdminController
             $form->select('country')
                 ->options(BaseIso3166::selectOptions())
                 ->width(9,3)->required();
-            $form->text('country_lang')->width(9,3)->required()->help('Please enter the language code, such as en ru es');
+            $form->text('country_lang')->width(9,3)->required()->help(admin_trans_label('country_lang_tips'));
             $form->text('address')->width(9,3);
             $form->switch('enabled')->width(9,3)->default(1);
             $form->hidden('country_alpha_2');

+ 2 - 2
app/Admin/Controllers/DistAdminUserController.php

@@ -121,11 +121,11 @@ class DistAdminUserController extends AdminController
     {
         return Form::make(DistAdminUser::with(['distributor']), function (Form $form) {
             //$form->display('id');
-            $form->text('username')->help('Login name')->required();
+            $form->text('username')->help(admin_trans_label('username_tips'))->required();
             $form->password('password')->customFormat(function ($v) {
                 return "";
             });
-            $form->text('name',)->help('Nickname')->required();
+            $form->text('name',)->help(admin_trans_label('name_tips'))->required();
             $form->select('language')->options(config('dictionary.languages'))->required();
             $form->selectTable('dist_id', admin_trans_label('distributor'))
                 ->title('distId')

+ 3 - 0
lang/en/global.php

@@ -181,6 +181,9 @@ return [
         'confirm_process_inquiry' => 'Are you sure to process inquiry?',
         'all_users' => 'All Users',
         'specified_users' => 'Specified Users',
+        'country_lang_tips' => 'Please enter the language code, such as en ru es',
+        'username_tips'=>'Login name',
+        'name_tips'=>'Nickname',
     ],
     'options' => [
         //

+ 3 - 0
lang/zh_CN/global.php

@@ -188,6 +188,9 @@ return [
         'unread'                => '未读',
         'all_users'             => '所有用户',
         'specified_users' => '指定用户',
+        'country_lang_tips' => '请输入语言代码,如 en ru es',
+        'username_tips'=>'登录名',
+        'name_tips'=>'昵称',
     ],
     'options' => [
         //