Browse Source

update: remind mail i18n

tokumeikoi 3 years ago
parent
commit
982c47d0b4

+ 1 - 1
app/Http/Controllers/User/TicketController.php

@@ -168,7 +168,7 @@ class TicketController extends Controller
         $user = User::find($request->session()->get('id'));
         $limit = config('v2board.commission_withdraw_limit', 100);
         if ($limit > ($user->commission_balance / 100)) {
-            abort(500, __('The current required minimum withdrawal commission is', ['limit' => $limit]));
+            abort(500, __('The current required minimum withdrawal commission is :limit', ['limit' => $limit]));
         }
         DB::beginTransaction();
         $subject = __('[Commission Withdrawal Request] This ticket is opened by the system');

+ 3 - 2
app/Services/MailService.php

@@ -12,14 +12,15 @@ class MailService
     public function remindTraffic (User $user)
     {
         if (!$user->remind_traffic) return;
-        $trafficTotal = $user->u + $user->d;
         if (!$this->remindTrafficIsWarnValue($user->u, $user->d, $user->transfer_enable)) return;
         $flag = CacheKey::get('LAST_SEND_EMAIL_REMIND_TRAFFIC', $user->id);
         if (Cache::get($flag)) return;
         if (!Cache::put($flag, 1, 24 * 3600)) return;
         SendEmailJob::dispatch([
             'email' => $user->email,
-            'subject' => '在' . config('v2board.app_name', 'V2board') . '的流量使用已达到80%',
+            'subject' => __('The traffic usage in :app_name has reached 80%', [
+                'app_name' => config('v2board.app_name', 'V2board')
+            ]),
             'template_name' => 'remindTraffic',
             'template_value' => [
                 'name' => config('v2board.app_name', 'V2Board'),

+ 3 - 2
resources/lang/en-US.json

@@ -37,7 +37,7 @@
     "Subscription has expired or no active subscription, unable to purchase Data Reset Package": "Subscription has expired or no active subscription, unable to purchase Data Reset Package",
     "Subscription plan does not exist": "Subscription plan does not exist",
     "The coupon code cannot be used for this subscription": "The coupon code cannot be used for this subscription",
-    "The current required minimum withdrawal commission is": "The current required minimum withdrawal commission is",
+    "The current required minimum withdrawal commission is :limit": "The current required minimum withdrawal commission is :limit",
     "The maximum number of creations has been reached": "The maximum number of creations has been reached",
     "The old password is wrong": "The old password is wrong",
     "The ticket is closed and cannot be replied": "The ticket is closed and cannot be replied",
@@ -82,5 +82,6 @@
     "Incorrect traffic alert format": "Incorrect traffic alert format",
     "Email can not be empty": "Email can not be empty",
     "Email format is incorrect": "Email format is incorrect",
-    "Password can not be empty": "Password can not be empty"
+    "Password can not be empty": "Password can not be empty",
+    "The traffic usage in :app_name has reached 80%": "The traffic usage in :app has reached 80%"
 }

+ 3 - 2
resources/lang/zh-CN.json

@@ -16,7 +16,7 @@
     "Ticket reply failed": "工单回复失败",
     "Close failed": "关闭失败",
     "Unsupported withdrawal method": "不支持的提现方式",
-    "The current required minimum withdrawal commission is": "当前系统要求的最少提现佣金为:¥:limitCNY",
+    "The current required minimum withdrawal commission is :limit": "当前系统要求的最少提现佣金为:¥:limitCNY",
     "[Commission Withdrawal Request] This ticket is opened by the system": "[提现申请] 本工单由系统发出",
     "Withdrawal method": "提现方式",
     "Withdrawal account": "提现账号",
@@ -82,5 +82,6 @@
     "Incorrect traffic alert format": "流量提醒参数有误",
     "Email can not be empty": "邮箱不能为空",
     "Email format is incorrect": "邮箱格式不正确",
-    "Password can not be empty": "密码不能为空"
+    "Password can not be empty": "密码不能为空",
+    "The traffic usage in :app_name has reached 80%": "在:app的流量使用已达到80%"
 }