moshaorui 4 months ago
parent
commit
56f70f29ee

+ 3 - 1
app/Distributor/Actions/Extensions/DistProductImportForm.php

@@ -8,9 +8,11 @@ use Dcat\Admin\Grid\BatchAction;
 
 class DistProductImportForm extends BatchAction
 {
+
     protected $title = 'import';
 
 
+
     public function render()
     {
         // 实例化表单类
@@ -18,7 +20,7 @@ class DistProductImportForm extends BatchAction
 
         return Modal::make()
             ->lg()
-            ->title($this->title)
+            ->title(admin_trans_label($this->title))
             ->body($form)
             // 因为此处使用了表单异步加载功能,所以一定要用 onLoad 方法
             // 如果是非异步方式加载表单,则需要改成 onShow 方法

+ 1 - 1
app/Distributor/Controllers/CacheController.php

@@ -43,7 +43,7 @@ class CacheController extends Controller
         //清除缓存
         DistAdminDistributor::clearCache();
         $form = new Form();
-        return $form->response()->success('Success');
+        return $form->response()->success(admin_trans_label('update_success'));
     }
 
 }

+ 2 - 2
app/Distributor/Controllers/SettingsController.php

@@ -130,7 +130,7 @@ class SettingsController extends Controller
             //站点配置
             DistAdminDistributor::updateInfo($request->all());
         }
-        return $form->response()->success('Success');
+        return $form->response()->success(admin_trans_label('update_success'));
     }
 
     public function upload()
@@ -153,7 +153,7 @@ class SettingsController extends Controller
         $path = "{$dir}/$newName";
         return $result
             ? $this->responseUploaded($path, $disk->url($path))
-            : $this->responseErrorMessage('文件上传失败');
+            : $this->responseErrorMessage(admin_trans_label('upload_failed'));
     }
 
     private function removeHttpAndPort($url) {

+ 2 - 0
config/admin.php

@@ -1,5 +1,7 @@
 <?php
 
+
+
 return [
 
     /*

+ 3 - 0
lang/en/global.php

@@ -171,6 +171,9 @@ return [
         'distributor_code' => 'Distributor Code',
         'videos' => 'Videos',
         'video_category' => 'Video Category',
+        'import' => 'Import',
+        'update_success' => 'Update Success',
+        'upload_failed' => 'Upload Failed',
     ],
     'options' => [
         //

+ 3 - 0
lang/zh_CN/global.php

@@ -174,6 +174,9 @@ return [
         'input_format' => '输入格式',
         'videos'         => '视频',
         'video_category' => '视频分类',
+        'import'         => '导入',
+        'update_success'         => '更新成功',
+        'upload_failed'    => '上传失败',
     ],
     'options' => [
         //