Ken 2 주 전
부모
커밋
936a99f862
4개의 변경된 파일67개의 추가작업 그리고 37개의 파일을 삭제
  1. 23 31
      app/Services/WithdrawService.php
  2. 13 0
      lang/en/messages.php
  3. 13 0
      lang/vi/messages.php
  4. 18 6
      lang/zh/messages.php

+ 23 - 31
app/Services/WithdrawService.php

@@ -101,40 +101,40 @@ class WithdrawService
             ->whereIn('status', [0, 1])
             ->count();
 
-        $status = ['等待放行', '已到账', "失败"];
-        $text = "👤 {$firstName}({$chatId})    钱包提现记录\n\n";
+        $status = [lang('等待放行'), lang('已到账'), lang("失败")];
+        $text = "👤 {$firstName}({$chatId})    " . lalng("钱包提现记录") . "\n\n";
 
         foreach ($list as $item) {
             $amount = floatval($item->amount);
             $balance = floatval($item->after_balance);
             $text .= "-------------------------------------\n";
-            $text .= "➖ {$amount} USDT\n余额:{$balance} \n";
-            $text .= "类别:提现\n";
-            $text .= "状态:{$status[$item->status]}\n";
+            $text .= "➖ {$amount} USDT\n" . lang("余额") . ":{$balance} \n";
+            $text .= lang("类别") . "类别:" . lang("提现") . "\n";
+            $text .= lang("状态") . ":{$status[$item->status]}\n";
             if ($item->remark) {
-                $text .= "说明:{$item->remark}\n";
+                $text .= lang("说明") . ":{$item->remark}\n";
             }
-            $text .= "日期:{$item->created_at}\n";
+            $text .= lang("日期") . ":{$item->created_at}\n";
         }
 
         if ($page > 1) {
             $keyboard[] = [
-                ['text' => "👆上一页", 'callback_data' => "withdrawBillNextPage@@" . ($page - 1)]
+                ['text' => lang("👆上一页"), 'callback_data' => "withdrawBillNextPage@@" . ($page - 1)]
             ];
         }
         $allPage = ceil($count / $limit);
         if ($allPage > $page) {
             if ($page > 1) {
-                $keyboard[count($keyboard) - 1][] = ['text' => "👇下一页", 'callback_data' => "withdrawBillNextPage@@" . ($page + 1)];
+                $keyboard[count($keyboard) - 1][] = ['text' => lang("👇下一页"), 'callback_data' => "withdrawBillNextPage@@" . ($page + 1)];
             } else {
                 $keyboard[] = [
-                    ['text' => "👇下一页", 'callback_data' => "withdrawBillNextPage@@" . ($page + 1)]
+                    ['text' => lang("👇下一页"), 'callback_data' => "withdrawBillNextPage@@" . ($page + 1)]
                 ];
             }
         }
 
         $keyboard[] = [
-            ['text' => "🔙返回", 'callback_data' => "withdraw@@home"]
+            ['text' => lang("↩️返回"), 'callback_data' => "withdraw@@home"]
         ];
         return [
             'chat_id' => $chatId,
@@ -156,15 +156,15 @@ class WithdrawService
     //地址详情
     public static function addressDetails($chatId, $messageId, $id)
     {
-        $text = "*TRC20 地址管理*\n\n";
+        $text = lang("*TRC20 地址管理*") . "\n\n";
         $address = Address::where('id', $id)
             ->where('member_id', $chatId)->first();
-        $text .= "地址:{$address->address}\n";
-        $text .= "别名:{$address->alias}";
+        $text .= lang("地址") . ":{$address->address}\n";
+        $text .= lang("别名") . ":{$address->alias}";
 
         $keyboard = [
-            [['text' => '❌删除该地址', 'callback_data' => "withdrawAddress@@del{$id}"]],
-            [['text' => '↩️返回列表', 'callback_data' => 'withdraw@@address']]
+            [['text' => lang('❌删除该地址'), 'callback_data' => "withdrawAddress@@del{$id}"]],
+            [['text' => lang('↩️返回列表'), 'callback_data' => 'withdraw@@address']]
         ];
         return [
             'chat_id' => $chatId,
@@ -182,7 +182,7 @@ class WithdrawService
         if (mb_strlen($alias) > 20) {
             return [
                 'chat_id' => $chatId,
-                'text' => "别名不能超过20个字,请重新输入",
+                'text' => lang("别名不能超过20个字,请重新输入"),
                 'reply_to_message_id' => $messageId,
             ];
         }
@@ -203,7 +203,7 @@ class WithdrawService
         if (!preg_match('/^T[a-zA-Z1-9]{33}$/', $address)) {
             return [
                 'chat_id' => $chatId,
-                'text' => "地址输入不正确,请重新输入TRC20地址",
+                'text' => lang("地址输入不正确,请重新输入TRC20地址"),
                 'reply_to_message_id' => $messageId,
             ];
         }
@@ -211,16 +211,16 @@ class WithdrawService
         Cache::put(get_step_key($chatId), StepStatus::INPUT_ADDRESS_ALIAS);
         return [
             'chat_id' => $chatId,
-            'text' => "请输入地址别名,便于区分多个地址",
+            'text' => lang("请输入地址别名,便于区分多个地址"),
         ];
     }
 
     //添加地址
     public static function addAddress($chatId, $messageId)
     {
-        $text = "请输入新的TRC20地址\n";
+        $text = lang('请输入新的TRC20地址') . "\n";
         $keyboard = [[
-            ['text' => '❌取消', 'callback_data' => "message@@close"],
+            ['text' => lang('❌取消'), 'callback_data' => "message@@close"],
         ]];
         Cache::put(get_step_key($chatId), StepStatus::INPUT_ADDRESS_TRC20);
         return [
@@ -235,8 +235,8 @@ class WithdrawService
     //地址管理
     public static function getAddress($chatId, $messageId)
     {
-        $text = "🏠 地址管理\n";
-        $text .= "--------------------------\n";
+        $text = lang("🏠 地址管理");
+        $text .= "\n--------------------------\n";
 
         $list = Address::where('member_id', $chatId)
             ->get();
@@ -476,14 +476,6 @@ class WithdrawService
     }
 
 
-
-
-
-
-
-
-
-
     //申请提现
     public function apply($chatId, $messageId)
     {

+ 13 - 0
lang/en/messages.php

@@ -152,6 +152,19 @@ return [
     "提现" => "Withdraw",
     "订单金额" => "Order Amount",
     "充值类型" => "Recharge Type",
+    "等待放行" => "Awaiting Release",
+    "已到账" => "Funds Received",
+    "钱包提现记录" => "Wallet Withdrawal History",
+    "类别" => "Category",
+    "*TRC20 地址管理*" => "*TRC20 Address Management*",
+    "地址" => "Address",
+    "别名" => "Alias",
+    '❌删除该地址' => '❌ Delete this address',
+    "别名不能超过20个字,请重新输入" => "Alias cannot exceed 20 characters, please re-enter",
+    "地址输入不正确,请重新输入TRC20地址" => "Incorrect address entered, please re-enter the TRC20 address",
+    "请输入地址别名,便于区分多个地址" => "Please enter an alias for the address to distinguish multiple addresses",
+    '请输入新的TRC20地址' => 'Please enter a new TRC20 address',
+    "🏠 地址管理" => '🏠 Address Management',
 
 
 

+ 13 - 0
lang/vi/messages.php

@@ -152,6 +152,19 @@ return [
     "提现" => "Rút tiền",
     "订单金额" => "Số tiền đơn hàng",
     "充值类型" => "Loại nạp tiền",
+    "等待放行" => "Chờ phê duyệt",
+    "已到账" => "Đã chuyển tiền",
+    "钱包提现记录" => "Lịch sử rút tiền ví",
+    "类别" => "Loại",
+    "*TRC20 地址管理*" => "*Quản lý địa chỉ TRC20*",
+    "地址" => "Địa chỉ",
+    "别名" => "Biệt danh",
+    '❌删除该地址' => '❌ Xóa địa chỉ này',
+    "别名不能超过20个字,请重新输入" => "Biệt danh không được vượt quá 20 ký tự, vui lòng nhập lại",
+    "地址输入不正确,请重新输入TRC20地址" => "Địa chỉ nhập không đúng, vui lòng nhập lại địa chỉ TRC20",
+    "请输入地址别名,便于区分多个地址" => "Vui lòng nhập biệt danh địa chỉ để phân biệt các địa chỉ",
+    '请输入新的TRC20地址' => 'Vui lòng nhập địa chỉ TRC20 mới',
+    "🏠 地址管理" => '🏠 Quản lý địa chỉ',
 
 
 

+ 18 - 6
lang/zh/messages.php

@@ -147,11 +147,23 @@ return [
     "🔔 提示:请选择下方充值的金额" => "🔔 提示:请选择下方充值的金额",
     "🔔 提示:请务必核对(充值最大金额和最小金额,账号信息一致),若不一致无法到账。" => "🔔 提示:请务必核对(充值最大金额和最小金额,账号信息一致),若不一致无法到账。",
     "第三方订单记录" => "第三方订单记录",
-    "订单类型"=>"订单类型",
-    "充值"=>"充值",
-    "提现"=>"提现",
-    "订单金额"=>"订单金额",
-    "充值类型"=>"充值类型"
-
+    "订单类型" => "订单类型",
+    "充值" => "充值",
+    "提现" => "提现",
+    "订单金额" => "订单金额",
+    "充值类型" => "充值类型",
+    "等待放行" => "等待放行",
+    "已到账" => "已到账",
+    "钱包提现记录" => "钱包提现记录",
+    "类别" => "类别",
+    "*TRC20 地址管理*" => "*TRC20 地址管理*",
+    "地址" => "地址",
+    "别名" => "别名",
+    '❌删除该地址' => '❌删除该地址',
+    "别名不能超过20个字,请重新输入" => "别名不能超过20个字,请重新输入",
+    "地址输入不正确,请重新输入TRC20地址" => "地址输入不正确,请重新输入TRC20地址",
+    "请输入地址别名,便于区分多个地址" => "请输入地址别名,便于区分多个地址",
+    '请输入新的TRC20地址' => '请输入新的TRC20地址',
+    "🏠 地址管理"=>'🏠 地址管理',
 
 ];