Ken 2 týždňov pred
rodič
commit
89654653f7

+ 14 - 14
app/Services/SecretService.php

@@ -79,7 +79,7 @@ class SecretService
 
 
         if ($user->secret_pass !== $password) {
-            $text = "密码错误";
+            $text = lang("密码错误");
             return [
                 'chat_id' => $chatId,
                 'text' => $text,
@@ -87,8 +87,8 @@ class SecretService
             ];
         }
 
-        $text = "秘钥:{$user->secret_key}\n\n";
-        $text .= "请保管好你的秘钥";
+        $text = lang("秘钥").":{$user->secret_key}\n\n";
+        $text .= lang("请保管好你的秘钥");
         return [
             'chat_id' => $chatId,
             'text' => $text,
@@ -99,7 +99,7 @@ class SecretService
 
     private static function view($chatId, $messageId): array
     {
-        $text = "请输入查看密码";
+        $text = lang("请输入查看密码");
         $user = User::where('member_id', $chatId)->first();
         if ($user->secret_pass == '') {
             $secretKey = SecretService::generateRandomString(22);
@@ -175,13 +175,13 @@ class SecretService
         if ($res) {
             return [
                 'chat_id' => $chatId,
-                'text' => '已完成迁移',
+                'text' => lang('已完成迁移'),
                 'message_id' => $messageId,
             ];
         } else {
             return [
                 'chat_id' => $chatId,
-                'text' => '迁移失败',
+                'text' => lang('迁移失败'),
                 'message_id' => $messageId,
             ];
         }
@@ -196,7 +196,7 @@ class SecretService
         if (!$user) {
             return [
                 'chat_id' => $chatId,
-                'text' => "输入错误,请重新输入",
+                'text' => lang("输入错误,请重新输入"),
                 'reply_to_message_id' => $messageId
             ];
         }
@@ -204,17 +204,17 @@ class SecretService
 
         $keyboard = [
             [
-                ['text' => '取消', 'callback_data' => 'topUp@@home'],
-                ['text' => '确认', 'callback_data' => 'secret@@confirm'],
+                ['text' => lang('取消'), 'callback_data' => 'topUp@@home'],
+                ['text' => lang('确认'), 'callback_data' => 'secret@@confirm'],
             ]
         ];
         $wallet->available_balance = bcadd($wallet->available_balance, 0, 2);
         $available_balance = $wallet->available_balance;
-        $text = "原账号信息:\n";
-        $text .= "用户ID:{$user->getMemberId()}\n";
-        $text .= "用户名:{$user->getUsername()}\n";
-        $text .= "昵称:{$user->getFirstName()}\n";
-        $text .= "余额:{$wallet->available_balance} RMB\n";
+        $text = lang("原账号信息").":\n";
+        $text .= lang("用户ID").":{$user->getMemberId()}\n";
+        $text .= lang("用户名").":{$user->getUsername()}\n";
+        $text .= lang("昵称").":{$user->getFirstName()}\n";
+        $text .= lang("余额").":{$wallet->available_balance} RMB\n";
         $text .= "-------------------------------\n";
         $user = User::where('member_id', $chatId)->first();
         $wallet = Wallet::where('member_id', $user->getMemberId())->first();

+ 15 - 0
lang/en/messages.php

@@ -46,5 +46,20 @@ return [
     "可用余额不足,请重试" => "⚠️ Insufficient available balance, please try again.",
     '提现不能少于100 RMB,请重试' => "⚠️ Withdrawal cannot be less than 100 RMB, please try again.",
     "最多提现 49999 RMB,请重试" => "⚠️ Maximum withdrawal is 49999 RMB, please try again.",
+    "密码错误" => "Incorrect password",
+    "秘钥" => "Secret Key",
+    "请保管好你的秘钥" => "Please keep your secret key safe",
+    "请输入查看密码" => "Please enter the viewing password",
+    "已完成迁移" => "Migration completed",
+    "输入错误,请重新输入" => "Incorrect input, please try again",
+    "取消" => "Cancel",
+    "确认" => "Confirm",
+    "原账号信息" => "Original account information",
+    "用户ID" => "User ID",
+    "用户名" => "Username",
+    "昵称" => "Nickname",
+    "余额" => "Balance"
+
+
 
 ];

+ 16 - 1
lang/vi/messages.php

@@ -45,7 +45,22 @@ return [
     "迁移失败" => "Di cư thất bại",
     "可用余额不足,请重试" => "⚠️Số dư khả dụng không đủ, vui lòng thử lại",
     '提现不能少于100 RMB,请重试' => "⚠️Số tiền rút tối thiểu là 100 RMB, vui lòng thử lại",
-    "最多提现 49999 RMB,请重试" => "⚠️Số tiền rút tối đa là 49999 RMB, vui lòng thử lại"
+    "最多提现 49999 RMB,请重试" => "⚠️Số tiền rút tối đa là 49999 RMB, vui lòng thử lại",
+    "密码错误" => "Mật khẩu sai",
+    "秘钥" => "Khóa bí mật",
+    "请保管好你的秘钥" => "Vui lòng bảo quản khóa bí mật của bạn",
+    "请输入查看密码" => "Vui lòng nhập mật khẩu để xem",
+    "已完成迁移" => "Đã hoàn thành chuyển đổi",
+    "输入错误,请重新输入" => "Nhập sai, vui lòng nhập lại",
+    "取消" => "Hủy",
+    "确认" => "Xác nhận",
+    "原账号信息" => "Thông tin tài khoản gốc",
+    "用户ID" => "ID người dùng",
+    "用户名" => "Tên người dùng",
+    "昵称" => "Biệt danh",
+    "余额" => "Số dư"
+
+
 
 
 ];

+ 13 - 0
lang/zh-CN/messages.php

@@ -46,6 +46,19 @@ return [
     "可用余额不足,请重试" => "⚠️可用余额不足,请重试",
     '提现不能少于100 RMB,请重试' => "⚠️提现不能少于100 RMB,请重试",
     "最多提现 49999 RMB,请重试" => "⚠️最多提现 49999 RMB,请重试",
+    "密码错误" => "密码错误",
+    "秘钥" => "秘钥",
+    "请保管好你的秘钥" => "请保管好你的秘钥",
+    "请输入查看密码" => "请输入查看密码",
+    "已完成迁移" => "已完成迁移",
+    "输入错误,请重新输入" => "输入错误,请重新输入",
+    "取消" => "取消",
+    "确认" => "确认",
+    "原账号信息" => "原账号信息",
+    "用户ID" => "用户ID",
+    "用户名" => "用户名",
+    "昵称" => "昵称",
+    "余额" => "余额",
 
 
 ];