Pārlūkot izejas kodu

Update language switch logic & simplify langs

BrettonYe 2 gadi atpakaļ
vecāks
revīzija
1a80d8f185
30 mainītis faili ar 77 papildinājumiem un 149 dzēšanām
  1. 3 1
      app/Http/Controllers/AuthController.php
  2. 20 9
      app/Http/Middleware/SetLocale.php
  3. 2 10
      resources/lang/en/model.php
  4. 0 9
      resources/lang/en/passwords.php
  5. 2 10
      resources/lang/ja/model.php
  6. 0 9
      resources/lang/ja/passwords.php
  7. 6 14
      resources/lang/ko/model.php
  8. 0 9
      resources/lang/ko/passwords.php
  9. 6 14
      resources/lang/vi/model.php
  10. 0 9
      resources/lang/vi/passwords.php
  11. 6 14
      resources/lang/zh_CN/model.php
  12. 0 9
      resources/lang/zh_CN/passwords.php
  13. 3 3
      resources/views/_layout.blade.php
  14. 2 2
      resources/views/admin/article/index.blade.php
  15. 1 1
      resources/views/admin/article/info.blade.php
  16. 6 6
      resources/views/admin/config/common.blade.php
  17. 1 1
      resources/views/admin/coupon/create.blade.php
  18. 2 2
      resources/views/admin/coupon/index.blade.php
  19. 1 1
      resources/views/admin/coupon/show.blade.php
  20. 2 2
      resources/views/admin/logs/notification.blade.php
  21. 1 1
      resources/views/admin/logs/userCreditHistory.blade.php
  22. 1 1
      resources/views/admin/logs/userTraffic.blade.php
  23. 1 1
      resources/views/admin/node/auth.blade.php
  24. 1 1
      resources/views/admin/node/index.blade.php
  25. 2 2
      resources/views/admin/node/info.blade.php
  26. 2 2
      resources/views/admin/shop/index.blade.php
  27. 2 2
      resources/views/admin/shop/info.blade.php
  28. 2 2
      resources/views/admin/ticket/reply.blade.php
  29. 1 1
      resources/views/admin/user/index.blade.php
  30. 1 1
      resources/views/admin/user/info.blade.php

+ 3 - 1
app/Http/Controllers/AuthController.php

@@ -504,7 +504,9 @@ class AuthController extends Controller
 
     public function switchLang(string $locale): RedirectResponse
     { // 切换语言
-        Session::put('locale', $locale);
+        if (array_key_exists($locale, config('common.language'))) {
+            Session::put('locale', $locale);
+        }
 
         return Redirect::back();
     }

+ 20 - 9
app/Http/Middleware/SetLocale.php

@@ -2,10 +2,11 @@
 
 namespace App\Http\Middleware;
 
+use Agent;
 use Closure;
 use Illuminate\Http\Request;
-use Illuminate\Support\Facades\App;
-use Session;
+
+use function app;
 
 class SetLocale
 {
@@ -18,14 +19,24 @@ class SetLocale
      */
     public function handle(Request $request, Closure $next)
     {
-        if (Session::has('locale')) {
-            app()->setLocale(Session::get('locale'));
+        if (session()->has('locale')) {
+            $lang = session()->get('locale');
         } elseif ($request->query('locale')) {
-            Session::put('locale', $request->query('locale'));
-            app()->setLocale($request->query('locale'));
-        } elseif ($request->header('content-language')) {
-            Session::put('locale', $request->header('content-language'));
-            App::setLocale($request->header('content-language'));
+            $lang = $request->query('locale');
+        } elseif (Agent::languages()) {
+            $langs = array_keys(config('common.language'));
+            $langs_low = array_map('strtolower', $langs);
+            $accept = array_map('strtolower', str_replace('-', '_', Agent::languages()));
+            $intersects = array_intersect($accept, $langs_low);
+
+            if ($intersects) {
+                $lang = array_values($langs)[array_search(array_values($intersects)[0], $langs_low, true)];
+            }
+        }
+
+        if (isset($lang) && $lang !== app()->getLocale()) {
+            app()->setLocale($lang);
+            session()->put('locale', $lang);
         }
 
         return $next($request);

+ 2 - 10
resources/lang/en/model.php

@@ -14,7 +14,6 @@ return [
         'traffic_used'   => 'Data Usage',
         'service'        => 'Proxy',
         'group'          => 'Group',
-        'level'          => 'Level',
         'account_status' => 'Account Status',
         'proxy_status'   => 'Proxy Status',
         'expired_date'   => 'Expiration Date',
@@ -36,6 +35,8 @@ return [
         'extend'      => 'Extension',
         'sort'        => 'Priority',
         'description' => 'Description',
+        'type'        => 'Type',
+        'level'       => 'Rank',
     ],
     'country'          => [
         'code' => 'ISO Territory Code',
@@ -63,7 +64,6 @@ return [
     'node'             => [
         'attribute'       => 'Node',
         'id'              => 'Node ID',
-        'type'            => 'Type',
         'name'            => 'Name',
         'domain'          => 'Domain Name',
         'static'          => 'Alive',
@@ -74,7 +74,6 @@ return [
         'ipv4'            => 'IPv4 Address',
         'ipv6'            => 'IPv6 Address',
         'push_port'       => 'Message Push Port',
-        'level'           => 'Rank',
         'rule_group'      => 'Audit Group',
         'traffic_limit'   => 'Speed Limit',
         'client_limit'    => 'Devices Limit',
@@ -126,11 +125,9 @@ return [
     ],
     'goods'            => [
         'attribute'      => 'Product',
-        'type'           => 'Type',
         'name'           => 'Name',
         'price'          => 'Price',
         'category'       => 'Category',
-        'level'          => 'Rank',
         'renew'          => 'Data Reset Price',
         'user_limit'     => 'Speed limit',
         'period'         => 'Reset period',
@@ -145,7 +142,6 @@ return [
     ],
     'rule'             => [
         'attribute' => 'Audit Rule',
-        'type'      => 'Type',
         'name'      => 'Description',
         'pattern'   => 'Value',
     ],
@@ -167,7 +163,6 @@ return [
     ],
     'article'          => [
         'attribute'  => 'Article',
-        'type'       => 'Type',
         'category'   => 'Category',
         'language'   => 'Language',
         'logo'       => 'Image',
@@ -179,7 +174,6 @@ return [
         'name'               => 'Coupon Name',
         'sn'                 => 'Coupon Code',
         'logo'               => 'Coupon Image',
-        'type'               => 'Type',
         'value'              => 'Amount of preference',
         'priority'           => 'Priority',
         'usable_times'       => 'Useable times',
@@ -208,7 +202,6 @@ return [
         'id'         => 'Referral ID',
     ],
     'notification'     => [
-        'type'       => 'Type',
         'address'    => 'Receive Address',
         'created_at' => 'Delivery Time',
         'status'     => 'Delivery Status',
@@ -226,7 +219,6 @@ return [
     'user_data_modify' => [
         'before'      => 'Pre-change Data',
         'after'       => 'Data after change',
-        'description' => 'Description',
         'created_at'  => 'Operation Date/Time',
     ],
     'user_credit'      => [

+ 0 - 9
resources/lang/en/passwords.php

@@ -1,9 +0,0 @@
-<?php
-
-return [
-    'reset'     => 'Your password has been reset!',
-    'sent'      => 'We have emailed your password reset link!',
-    'throttled' => 'Please wait before retrying.',
-    'token'     => 'This password reset token is invalid.',
-    'user'      => 'We can\'t find a user with that email address.',
-];

+ 2 - 10
resources/lang/ja/model.php

@@ -14,7 +14,6 @@ return [
         'traffic_used'   => 'データ使用量',
         'service'        => 'プロキシ',
         'group'          => 'グループ',
-        'level'          => 'レベル',
         'account_status' => 'アカウント状態',
         'proxy_status'   => 'プロキシ状態',
         'expired_date'   => '終了日',
@@ -36,6 +35,8 @@ return [
         'extend'      => '拡張',
         'sort'        => '並べ替え',
         'description' => '説明',
+        'type'        => 'タイプ',
+        'level'       => 'レベル',
     ],
     'country'          => [
         'code' => 'ISO国コード',
@@ -63,7 +64,6 @@ return [
     'node'             => [
         'attribute'       => 'ノード',
         'id'              => 'ノードID',
-        'type'            => 'タイプ',
         'name'            => '注文番号による検索',
         'domain'          => 'ドメイン',
         'static'          => '生存',
@@ -74,7 +74,6 @@ return [
         'ipv4'            => 'IPv4アドレス',
         'ipv6'            => 'IPv6アドレス',
         'push_port'       => 'メッセージポート:',
-        'level'           => 'レベル',
         'rule_group'      => '監査グループ',
         'traffic_limit'   => 'ノード制限速度',
         'client_limit'    => 'デバイスの制限',
@@ -126,11 +125,9 @@ return [
     ],
     'goods'            => [
         'attribute'      => '配送番号の設定',
-        'type'           => 'タイプ',
         'name'           => '注文番号による検索',
         'price'          => '販売価格',
         'category'       => 'カテゴリ',
-        'level'          => 'レベル',
         'renew'          => '使用量のリセット',
         'user_limit'     => 'ユーザー制限速度',
         'period'         => '期間をリセット',
@@ -145,7 +142,6 @@ return [
     ],
     'rule'             => [
         'attribute' => 'ルール',
-        'type'      => 'タイプ',
         'name'      => '説明',
         'pattern'   => '値',
     ],
@@ -167,7 +163,6 @@ return [
     ],
     'article'          => [
         'attribute'  => '記事',
-        'type'       => 'クラス',
         'category'   => 'クラス',
         'language'   => '話す',
         'logo'       => 'ヘッダ',
@@ -179,7 +174,6 @@ return [
         'name'               => 'カード券名',
         'sn'                 => 'クーポンコードを使用',
         'logo'               => 'カード券画像',
-        'type'               => 'タイプ',
         'value'              => '割引率',
         'priority'           => '重さ',
         'usable_times'       => '使用数',
@@ -208,7 +202,6 @@ return [
         'id'         => '単品ID',
     ],
     'notification'     => [
-        'type'       => 'タイプ',
         'address'    => '送信先アドレス',
         'created_at' => '配達日数',
         'status'     => '納品検収状態',
@@ -226,7 +219,6 @@ return [
     'user_data_modify' => [
         'before'      => '変更前のトラフィック',
         'after'       => '運用の後退率',
-        'description' => '説明',
         'created_at'  => 'タイムスタンプ',
     ],
     'user_credit'      => [

+ 0 - 9
resources/lang/ja/passwords.php

@@ -1,9 +0,0 @@
-<?php
-
-return [
-    'reset'     => 'パスワードをリセットしました。',
-    'sent'      => 'パスワードリマインダーを送信しました。',
-    'throttled' => '時間を置いて再度お試しください。',
-    'token'     => 'このパスワード再設定トークンは無効です。',
-    'user'      => 'このメールアドレスに一致するユーザーがいません。',
-];

+ 6 - 14
resources/lang/ko/model.php

@@ -14,7 +14,6 @@ return [
         'traffic_used'   => '流量使用',
         'service'        => '代理',
         'group'          => '分组',
-        'level'          => '等级',
         'account_status' => '계정 상태',
         'proxy_status'   => '代理状态',
         'expired_date'   => '过期日',
@@ -36,6 +35,8 @@ return [
         'extend'      => '扩展',
         'sort'        => '排序',
         'description' => '표시',
+        'type'        => '类型',
+        'level'       => '等级',
     ],
     'country'          => [
         'code' => 'ISO国家代码',
@@ -63,7 +64,6 @@ return [
     'node'             => [
         'attribute'       => '节点',
         'id'              => '节点ID',
-        'type'            => '类型',
         'name'            => '이름',
         'domain'          => '域名',
         'static'          => '存活',
@@ -74,7 +74,6 @@ return [
         'ipv4'            => 'IPv4地址',
         'ipv6'            => 'IPv6地址',
         'push_port'       => '消息推送端口',
-        'level'           => '等级',
         'rule_group'      => '审计分组',
         'traffic_limit'   => '节点限速',
         'client_limit'    => '设备数限制',
@@ -126,11 +125,9 @@ return [
     ],
     'goods'            => [
         'attribute'      => '商品',
-        'type'           => '类型',
         'name'           => '이름',
         'price'          => '售价',
         'category'       => '分类',
-        'level'          => '等级',
         'renew'          => '流量重置价格',
         'user_limit'     => '用户限速',
         'period'         => '重置周期',
@@ -145,7 +142,6 @@ return [
     ],
     'rule'             => [
         'attribute' => '规则',
-        'type'      => '类型',
         'name'      => '표시',
         'pattern'   => '值',
     ],
@@ -167,10 +163,9 @@ return [
     ],
     'article'          => [
         'attribute'  => '文章',
-        'type'       => '类 型',
-        'category'   => '类 别',
-        'language'   => '语 言',
-        'logo'       => '头 图',
+        'category'   => '类别',
+        'language'   => '语言',
+        'logo'       => '头图',
         'created_at' => '发布日期',
         'updated_at' => '最后更新',
     ],
@@ -179,9 +174,8 @@ return [
         'name'               => '卡券名称',
         'sn'                 => '使用券码',
         'logo'               => '卡券图片',
-        'type'               => '类型',
         'value'              => '优惠额度',
-        'priority'           => '权 重',
+        'priority'           => '权重',
         'usable_times'       => '使用次数',
         'minimum'            => '满减条件',
         'used'               => '个人限用',
@@ -208,7 +202,6 @@ return [
         'id'         => '申请单ID',
     ],
     'notification'     => [
-        'type'       => '类型',
         'address'    => '收信地址',
         'created_at' => '投递时间',
         'status'     => '投递状态',
@@ -226,7 +219,6 @@ return [
     'user_data_modify' => [
         'before'      => '变动前流量',
         'after'       => '变动后流量',
-        'description' => '표시',
         'created_at'  => '发生时间',
     ],
     'user_credit'      => [

+ 0 - 9
resources/lang/ko/passwords.php

@@ -1,9 +0,0 @@
-<?php
-
-return [
-    'reset'     => '비밀번호가 변경되었습니다!',
-    'sent'      => '비밀번호 재설정 링크를 이메일로 전송했습니다!',
-    'throttled' => '잠시 후 다시 시도해주세요.',
-    'token'     => '해당 비밀번호 재설정 토큰이 유효하지 않습니다.',
-    'user'      => '해당 이메일을 사용하는 사용자를 찾을 수 없습니다.',
-];

+ 6 - 14
resources/lang/vi/model.php

@@ -14,7 +14,6 @@ return [
         'traffic_used'   => 'Đã sử dụng',
         'service'        => 'Proxy',
         'group'          => 'Nhóm',
-        'level'          => 'Cấp',
         'account_status' => 'Trạng Thái Tài Khoản',
         'proxy_status'   => 'Trạng thái Proxy',
         'expired_date'   => 'Ngày hết hạn',
@@ -36,6 +35,8 @@ return [
         'extend'      => 'Mở rộng',
         'sort'        => 'Sắp xếp',
         'description' => 'Mô tả',
+        'type'        => 'Loại',
+        'level'       => 'Cấp độ',
     ],
     'country'          => [
         'code' => 'Mã quốc gia ISO',
@@ -63,7 +64,6 @@ return [
     'node'             => [
         'attribute'       => 'Node',
         'id'              => 'NodeID',
-        'type'            => 'Loại',
         'name'            => 'Tên',
         'domain'          => '域名',
         'static'          => '存活',
@@ -74,7 +74,6 @@ return [
         'ipv4'            => 'IPv4地址',
         'ipv6'            => 'IPv6地址',
         'push_port'       => '消息推送端口',
-        'level'           => 'Cấp độ',
         'rule_group'      => '审计分组',
         'traffic_limit'   => '节点限速',
         'client_limit'    => '设备数限制',
@@ -126,11 +125,9 @@ return [
     ],
     'goods'            => [
         'attribute'      => 'Sản phẩm',
-        'type'           => 'Loại',
         'name'           => 'Tên',
         'price'          => 'Giá',
         'category'       => 'Danh mục',
-        'level'          => 'Cấp độ',
         'renew'          => 'Giá reset data',
         'user_limit'     => 'Giới hạn người dùng',
         'period'         => 'Chu kì',
@@ -145,7 +142,6 @@ return [
     ],
     'rule'             => [
         'attribute' => 'Quy tắc',
-        'type'      => 'Loại',
         'name'      => 'Mô tả',
         'pattern'   => 'Giá trí',
     ],
@@ -167,10 +163,9 @@ return [
     ],
     'article'          => [
         'attribute'  => '文章',
-        'type'       => '类 型',
-        'category'   => '类 别',
-        'language'   => '语 言',
-        'logo'       => '头 图',
+        'category'   => '类别',
+        'language'   => '语言',
+        'logo'       => '头图',
         'created_at' => '发布日期',
         'updated_at' => '最后更新',
     ],
@@ -179,9 +174,8 @@ return [
         'name'               => '卡券名称',
         'sn'                 => '使用券码',
         'logo'               => '卡券图片',
-        'type'               => 'Loại',
         'value'              => '优惠额度',
-        'priority'           => '权 重',
+        'priority'           => '权重',
         'usable_times'       => '使用次数',
         'minimum'            => '满减条件',
         'used'               => '个人限用',
@@ -208,7 +202,6 @@ return [
         'id'         => '申请单ID',
     ],
     'notification'     => [
-        'type'       => 'Loại',
         'address'    => '收信地址',
         'created_at' => '投递时间',
         'status'     => '投递状态',
@@ -226,7 +219,6 @@ return [
     'user_data_modify' => [
         'before'      => '变动前流量',
         'after'       => '变动后流量',
-        'description' => 'Mô tả',
         'created_at'  => '发生时间',
     ],
     'user_credit'      => [

+ 0 - 9
resources/lang/vi/passwords.php

@@ -1,9 +0,0 @@
-<?php
-
-return [
-    'reset'     => 'Mật khẩu mới đã được cập nhật!',
-    'sent'      => 'Hướng dẫn cấp lại mật khẩu đã được gửi!',
-    'throttled' => 'Vui lòng đợi trước khi thử lại.',
-    'token'     => 'Mã khôi phục mật khẩu không hợp lệ.',
-    'user'      => 'Không tìm thấy người dùng với địa chỉ email này.',
-];

+ 6 - 14
resources/lang/zh_CN/model.php

@@ -14,7 +14,6 @@ return [
         'traffic_used'   => '流量使用',
         'service'        => '代理',
         'group'          => '分组',
-        'level'          => '等级',
         'account_status' => '账号状态',
         'proxy_status'   => '代理状态',
         'expired_date'   => '过期日',
@@ -36,6 +35,8 @@ return [
         'extend'      => '扩展',
         'sort'        => '排序',
         'description' => '描述',
+        'type'        => '类型',
+        'level'       => '等级',
     ],
     'country'          => [
         'code' => 'ISO国家代码',
@@ -63,7 +64,6 @@ return [
     'node'             => [
         'attribute'       => '节点',
         'id'              => '节点ID',
-        'type'            => '类型',
         'name'            => '名称',
         'domain'          => '域名',
         'static'          => '存活',
@@ -74,7 +74,6 @@ return [
         'ipv4'            => 'IPv4地址',
         'ipv6'            => 'IPv6地址',
         'push_port'       => '消息推送端口',
-        'level'           => '等级',
         'rule_group'      => '审计分组',
         'traffic_limit'   => '节点限速',
         'client_limit'    => '设备数限制',
@@ -126,11 +125,9 @@ return [
     ],
     'goods'            => [
         'attribute'      => '商品',
-        'type'           => '类型',
         'name'           => '名称',
         'price'          => '售价',
         'category'       => '分类',
-        'level'          => '等级',
         'renew'          => '流量重置价格',
         'user_limit'     => '用户限速',
         'period'         => '重置周期',
@@ -145,7 +142,6 @@ return [
     ],
     'rule'             => [
         'attribute' => '规则',
-        'type'      => '类型',
         'name'      => '描述',
         'pattern'   => '值',
     ],
@@ -167,10 +163,9 @@ return [
     ],
     'article'          => [
         'attribute'  => '文章',
-        'type'       => '类 型',
-        'category'   => '类 别',
-        'language'   => '语 言',
-        'logo'       => '头 图',
+        'category'   => '类别',
+        'language'   => '语言',
+        'logo'       => '头图',
         'created_at' => '发布日期',
         'updated_at' => '最后更新',
     ],
@@ -179,9 +174,8 @@ return [
         'name'               => '卡券名称',
         'sn'                 => '使用券码',
         'logo'               => '卡券图片',
-        'type'               => '类型',
         'value'              => '优惠额度',
-        'priority'           => '权 重',
+        'priority'           => '权重',
         'usable_times'       => '使用次数',
         'minimum'            => '满减条件',
         'used'               => '个人限用',
@@ -208,7 +202,6 @@ return [
         'id'         => '申请单ID',
     ],
     'notification'     => [
-        'type'       => '类型',
         'address'    => '收信地址',
         'created_at' => '投递时间',
         'status'     => '投递状态',
@@ -226,7 +219,6 @@ return [
     'user_data_modify' => [
         'before'      => '变动前流量',
         'after'       => '变动后流量',
-        'description' => '描述',
         'created_at'  => '发生时间',
     ],
     'user_credit'      => [

+ 0 - 9
resources/lang/zh_CN/passwords.php

@@ -1,9 +0,0 @@
-<?php
-
-return [
-    'reset'     => '密码重置成功!',
-    'sent'      => '密码重置邮件已发送!',
-    'throttled' => '请稍候再试。',
-    'token'     => '密码重置令牌无效。',
-    'user'      => '找不到该邮箱对应的用户。',
-];

+ 3 - 3
resources/views/_layout.blade.php

@@ -1,10 +1,10 @@
 <!DOCTYPE html>
 <!--[if IE 8]>
-<html lang="{{app()->getLocale()}}" class="ie8 no-js css-menubar"> <![endif]-->
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="ie8 no-js css-menubar"> <![endif]-->
 <!--[if IE 9]>
-<html lang="{{app()->getLocale()}}" class="ie9 no-js css-menubar"> <![endif]-->
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="ie9 no-js css-menubar"> <![endif]-->
 <!--[if !IE]><!-->
-<html lang="{{app()->getLocale()}}">
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
 <!--<![endif]-->
 <head>
     <meta charset="utf-8">

+ 2 - 2
resources/views/admin/article/index.blade.php

@@ -20,7 +20,7 @@
                     </div>
                     <div class="form-group col-xxl-1 col-lg-3 col-md-3 col-4">
                         <select class="form-control" id="type" name="type">
-                            <option value="" hidden>{{ trans('model.article.type') }}</option>
+                            <option value="" hidden>{{ trans('model.common.type') }}</option>
                             <option value="1">{{ trans('admin.article.type.knowledge') }}</option>
                             <option value="2">{{ trans('admin.article.type.announcement') }}</option>
                         </select>
@@ -52,7 +52,7 @@
                     <thead class="thead-default">
                     <tr>
                         <th> #</th>
-                        <th> {{ trans('model.article.type') }}</th>
+                        <th> {{ trans('model.common.type') }}</th>
                         <th> {{ trans('model.article.category') }}</th>
                         <th> {{ trans('validation.attributes.title') }}</th>
                         <th> {{ trans('model.article.language') }}</th>

+ 1 - 1
resources/views/admin/article/info.blade.php

@@ -24,7 +24,7 @@
                         @method('PUT')
                     @endisset
                     <div class="form-group row">
-                        <label class="col-form-label col-md-2" for="type"> {{ trans('model.article.type') }} </label>
+                        <label class="col-form-label col-md-2" for="type"> {{ trans('model.common.type') }} </label>
                         <div class="col-md-10 d-flex align-items-center">
                             <div class="radio-custom radio-primary radio-inline">
                                 <input type="radio" name="type" value="1" checked/>

+ 6 - 6
resources/views/admin/config/common.blade.php

@@ -21,7 +21,7 @@
                             <a class="nav-link" data-toggle="tab" href="#obfs" aria-controls="obfs" role="tab">{{ trans('model.node.obfs') }}</a>
                         </li>
                         <li class="nav-item" role="presentation">
-                            <a class="nav-link" data-toggle="tab" href="#level" aria-controls="level" role="tab">{{ trans('model.node.level') }}</a>
+                            <a class="nav-link" data-toggle="tab" href="#level" aria-controls="level" role="tab">{{ trans('model.common.level') }}</a>
                         </li>
                         <li class="nav-item" role="presentation">
                             <a class="nav-link" data-toggle="tab" href="#country" aria-controls="country" role="tab">{{ trans('model.node.country') }}</a>
@@ -143,7 +143,7 @@
                             <table class="text-md-center" data-toggle="table" data-height="700" data-virtual-scroll="true" data-mobile-responsive="true">
                                 <thead class="thead-default">
                                 <tr>
-                                    <th> {{ trans('model.node.level') }}</th>
+                                    <th> {{ trans('model.common.level') }}</th>
                                     <th> {{ trans('validation.attributes.name') }}</th>
                                     <th> {{ trans('common.action') }}</th>
                                 </tr>
@@ -323,13 +323,13 @@
                     <button type="button" class="close" data-dismiss="modal" aria-label="{{ trans('common.close') }}">
                         <span aria-hidden="true">×</span>
                     </button>
-                    <h4 class="modal-title">{{ trans('admin.action.add_item', ['attribute' => trans('model.node.level')]) }}</h4>
+                    <h4 class="modal-title">{{ trans('admin.action.add_item', ['attribute' => trans('model.common.level')]) }}</h4>
                 </div>
                 <form action="#" method="post" class="modal-body">
                     <div class="alert alert-danger" style="display: none;" id="level_msg"></div>
                     <div class="row">
                         <div class="col-md-6 form-group">
-                            <input type="text" class="form-control" name="level" id="add_level" placeholder="{{ trans('model.node.level') }}">
+                            <input type="text" class="form-control" name="level" id="add_level" placeholder="{{ trans('model.common.level') }}">
                         </div>
                         <div class="col-md-6 form-group">
                             <input type="text" class="form-control" name="level_name" id="add_level_name" placeholder="{{ trans('validation.attributes.name') }}">
@@ -439,7 +439,7 @@
         const level_name = $('#add_level_name').val();
 
         if (level.trim() === '') {
-          $('#level_msg').show().html('{{ trans('validation.required', ['attribute' => trans('model.node.level')]) }}');
+          $('#level_msg').show().html('{{ trans('validation.required', ['attribute' => trans('model.common.level')]) }}');
           $('#level').focus();
           return false;
         }
@@ -506,7 +506,7 @@
       function delLevel(id, name) { // 删除等级
           @can('admin.config.level.destroy')
           swal.fire({
-            title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.node.level')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
+            title: '{{ trans('admin.confirm.delete.0', ['attribute' => trans('model.common.level')]) }}' + name + '{{ trans('admin.confirm.delete.1') }}',
             icon: 'question',
             allowEnterKey: false,
             showCancelButton: true,

+ 1 - 1
resources/views/admin/coupon/create.blade.php

@@ -43,7 +43,7 @@
                         </div>
                     </div>
                     <div class="form-group row">
-                        <label class="col-md-2 col-form-label">{{ trans('model.coupon.type') }}</label>
+                        <label class="col-md-2 col-form-label">{{ trans('model.common.type') }}</label>
                         <div class="col-md-10 align-items-center">
                             <div class="radio-custom radio-primary radio-inline">
                                 <input type="radio" name="type" id="voucher" value="1" checked/>

+ 2 - 2
resources/views/admin/coupon/index.blade.php

@@ -25,7 +25,7 @@
                     </div>
                     <div class="form-group col-lg-3 col-sm-4">
                         <select class="form-control" name="type" id="type">
-                            <option value="" hidden>{{ trans('model.coupon.type') }}</option>
+                            <option value="" hidden>{{ trans('model.common.type') }}</option>
                             <option value="1">{{ trans('admin.coupon.type.voucher') }}</option>
                             <option value="2">{{ trans('admin.coupon.type.discount') }}</option>
                             <option value="3">{{ trans('admin.coupon.type.charge') }}</option>
@@ -51,7 +51,7 @@
                         <th> {{ trans('model.coupon.name') }}</th>
                         <th> {{ trans('model.coupon.sn') }}</th>
                         <th> {{ trans('model.coupon.logo') }}</th>
-                        <th> {{ trans('model.coupon.type') }}</th>
+                        <th> {{ trans('model.common.type') }}</th>
                         <th> {{ trans('model.coupon.priority') }}</th>
                         <th> {{ trans('model.coupon.usable_times') }}</th>
                         <th> {{ trans('admin.coupon.discount') }}</th>

+ 1 - 1
resources/views/admin/coupon/show.blade.php

@@ -40,7 +40,7 @@
                     </div>
                 @endif
                 <div class="form-group row">
-                    <span class="col-md-2 col-form-label">{{ trans('model.coupon.type') }}</span>
+                    <span class="col-md-2 col-form-label">{{ trans('model.common.type') }}</span>
                     <div class="col-md-10 align-items-center">
                         <div class="radio-custom radio-primary radio-inline">
                             <input type="radio" id="voucher" checked/>

+ 2 - 2
resources/views/admin/logs/notification.blade.php

@@ -15,7 +15,7 @@
                     </div>
                     <div class="form-group col-lg-2 col-sm-4">
                         <select class="form-control" name="type" id="type" onchange="this.form.submit()">
-                            <option value="" hidden>{{ trans('model.notification.type') }}</option>
+                            <option value="" hidden>{{ trans('model.common.type') }}</option>
                             @foreach(config('common.notification.labels') as $key => $value)
                                 <option value="{{$key}}">{{$value}}</option>
                             @endforeach
@@ -30,7 +30,7 @@
                     <thead class="thead-default">
                     <tr>
                         <th> #</th>
-                        <th> {{ trans('model.notification.type') }}</th>
+                        <th> {{ trans('model.common.type') }}</th>
                         <th> {{ trans('model.notification.address') }}</th>
                         <th> {{ trans('validation.attributes.title') }}</th>
                         <th> {{ trans('validation.attributes.content') }}</th>

+ 1 - 1
resources/views/admin/logs/userCreditHistory.blade.php

@@ -27,7 +27,7 @@
                         <th> {{ trans('model.user_credit.before') }}</th>
                         <th> {{ trans('model.user_credit.amount') }}</th>
                         <th> {{ trans('model.user_credit.after') }}</th>
-                        <th> {{ trans('validation.attributes.description') }}</th>
+                        <th> {{ trans('model.common.description') }}</th>
                         <th> {{ trans('model.user_credit.created_at') }}</th>
                     </tr>
                     </thead>

+ 1 - 1
resources/views/admin/logs/userTraffic.blade.php

@@ -26,7 +26,7 @@
                         <th> {{ trans('model.order.attribute') }}</th>
                         <th> {{ trans('model.user_data_modify.before') }}</th>
                         <th> {{ trans('model.user_data_modify.after') }}</th>
-                        <th> {{ trans('validation.attributes.description') }}</th>
+                        <th> {{ trans('model.common.description') }}</th>
                         <th> {{ trans('model.user_data_modify.created_at') }}</th>
                     </tr>
                     </thead>

+ 1 - 1
resources/views/admin/node/auth.blade.php

@@ -20,7 +20,7 @@
                     <thead class="thead-default">
                     <tr>
                         <th> {{ trans('model.node.id') }}</th>
-                        <th> {{ trans('model.node.type') }}</th>
+                        <th> {{ trans('model.common.type') }}</th>
                         <th> {{ trans('model.node.name') }}</th>
                         <th> {{ trans('model.node.domain') }}</th>
                         <th> {{ trans('model.node.ipv4') }}</th>

+ 1 - 1
resources/views/admin/node/index.blade.php

@@ -41,7 +41,7 @@
                     <thead class="thead-default">
                     <tr>
                         <th> ID</th>
-                        <th> {{ trans('model.node.type') }}</th>
+                        <th> {{ trans('model.common.type') }}</th>
                         <th> {{ trans('model.node.name') }}</th>
                         <th> {{ trans('model.node.domain') }}</th>
                         <th> IP</th>

+ 2 - 2
resources/views/admin/node/info.blade.php

@@ -69,7 +69,7 @@
                                         <div class="text-help offset-md-3">{{ trans('admin.node.info.data_rate_hint') }}</div>
                                     </div>
                                     <div class="form-group row">
-                                        <label for="level" class="col-md-3 col-form-label">{{ trans('model.node.level') }}</label>
+                                        <label for="level" class="col-md-3 col-form-label">{{ trans('model.common.level') }}</label>
                                         <select data-plugin="selectpicker" data-style="btn-outline btn-primary" class="col-md-5 form-control show-tick" id="level" name="level">
                                             @foreach($levels as $level)
                                                 <option value="{{$level->level}}">{{$level->name}}</option>
@@ -219,7 +219,7 @@
                                     <!-- 代理 设置部分 -->
                                     <div class="proxy-config">
                                         <div class="form-group row">
-                                            <label for="type" class="col-md-3 col-form-label">{{ trans('model.node.type') }}</label>
+                                            <label for="type" class="col-md-3 col-form-label">{{ trans('model.common.type') }}</label>
                                             <ul class="col-md-9 list-unstyled list-inline">
                                                 <li class="list-inline-item">
                                                     <div class="radio-custom radio-primary">

+ 2 - 2
resources/views/admin/shop/index.blade.php

@@ -17,7 +17,7 @@
                 <form class="form-row">
                     <div class="form-group col-lg-2 col-sm-4">
                         <select class="form-control" id="type" name="type">
-                            <option value="" hidden>{{ trans('model.goods.type') }}</option>
+                            <option value="" hidden>{{ trans('model.common.type') }}</option>
                             <option value="1">{{ trans('admin.goods.type.package') }}</option>
                             <option value="2">{{ trans('admin.goods.type.plan') }}</option>
                         </select>
@@ -39,7 +39,7 @@
                     <tr>
                         <th> #</th>
                         <th> {{ trans('model.goods.name') }}</th>
-                        <th> {{ trans('model.goods.type') }}</th>
+                        <th> {{ trans('model.common.type') }}</th>
                         <th> {{ trans('model.goods.logo') }}</th>
                         <th> {{ trans('model.goods.traffic') }}</th>
                         <th> {{ trans('model.goods.price') }}</th>

+ 2 - 2
resources/views/admin/shop/info.blade.php

@@ -33,7 +33,7 @@
                     <div class="form-row">
                         <div class="col-lg-6 col-md-12">
                             <div class="form-group row">
-                                <label class="col-md-2 col-form-label">{{ trans('model.goods.type') }}</label>
+                                <label class="col-md-2 col-form-label">{{ trans('model.common.type') }}</label>
                                 <div class="col-md-10 align-items-center">
                                     <div class="radio-custom radio-primary radio-inline">
                                         <input type="radio" name="type" id="data_package" value="1"/>
@@ -72,7 +72,7 @@
                                 </div>
                             </div>
                             <div class="form-group row">
-                                <label for="level" class="col-md-2 col-form-label">{{ trans('model.goods.level') }}</label>
+                                <label for="level" class="col-md-2 col-form-label">{{ trans('model.common.level') }}</label>
                                 <div class="col-md-4">
                                     <select data-plugin="selectpicker" data-style="btn-outline btn-primary" class="form-control" name="level" id="level">
                                         @foreach ($levels as $level)

+ 2 - 2
resources/views/admin/ticket/reply.blade.php

@@ -76,7 +76,7 @@
                                     </span>
                                 @endif
                             </dd>
-                            <dt class="col-sm-3">{{ trans('model.user.level') }}</dt>
+                            <dt class="col-sm-3">{{ trans('model.common.level') }}</dt>
                             <dd class="col-sm-9">{{$user->level}}</dd>
                             <dt class="col-sm-3">{{ trans('model.user.group') }}</dt>
                             <dd class="col-sm-9">{{$user->userGroup->name ?? trans('common.none')}}</dd>
@@ -121,7 +121,7 @@
                             @isset ($user->inviter)
                                 <dt class="col-sm-3 offset-md-1">{{ trans('model.user.username') }}</dt>
                                 <dd class="col-sm-8">{{$user->inviter->username}}</dd>
-                                <dt class="col-sm-3 offset-md-1">{{ trans('model.user.level') }}</dt>
+                                <dt class="col-sm-3 offset-md-1">{{ trans('model.common.level') }}</dt>
                                 <dd class="col-sm-8">{{$user->inviter->level}}</dd>
                                 <dt class="col-sm-3 offset-md-1">{{ trans('common.latest_at') }}</dt>
                                 <dd class="col-sm-8">

+ 1 - 1
resources/views/admin/user/index.blade.php

@@ -60,7 +60,7 @@
                     </div>
                     <div class="form-group col-xxl-1 col-lg-3 col-md-3 col-4">
                         <select class="form-control" id="level" name="level">
-                            <option value="" hidden>{{ trans('model.user.level') }}</option>
+                            <option value="" hidden>{{ trans('model.common.level') }}</option>
                             @foreach($levels as $key => $level)
                                 <option value="{{$key}}">{{$level}}</option>
                             @endforeach

+ 1 - 1
resources/views/admin/user/info.blade.php

@@ -41,7 +41,7 @@
                                 </div>
                             </div>
                             <div class="form-group row">
-                                <label class="col-md-2 col-sm-3 col-form-label" for="level">{{ trans('model.user.level') }}</label>
+                                <label class="col-md-2 col-sm-3 col-form-label" for="level">{{ trans('model.common.level') }}</label>
                                 <div class="col-xl-4 col-sm-8">
                                     <select class="form-control" name="level" id="level" data-plugin="selectpicker" data-style="btn-outline btn-primary">
                                         @foreach($levels as $level)