lizhen_gitee 1 éve
szülő
commit
e138368393

+ 4 - 4
application/api/controller/Lesson.php

@@ -78,9 +78,9 @@ class Lesson extends Api
 
             //右上角备注
             if(time() >= $slot['starttime']){
-                $slot['num_remark'] = '报名已截止';
+                $slot['num_remark'] = __('报名已截止');
             }else{
-                $slot['num_remark'] = '剩'.$slot['num_remain'].'空位';
+                $slot['num_remark'] = __('剩N个名额',['number'=>$slot['num_remain']]);
             }
         }
 
@@ -140,7 +140,7 @@ class Lesson extends Api
         $paytype = input('paytype',1,'intval');//支付类型:1=课程套餐,2=线上付款,3=购买套餐中
         $packageorder_id = input('packageorder_id',0,'intval');
         if($number <= 0){
-            $this->error('报名人数错误');
+            $this->error('预约人数错误');
         }
         if(!in_array($paytype,[1,2,3])){
             $this->error();
@@ -163,7 +163,7 @@ class Lesson extends Api
             $pay_number = Db::name('lesson_order')->where('slot_id',$slot_id)->where('order_status',10)->sum('usernumber');
             $num_remain = $info['num_max'] - $pay_number;
             if($num_remain < $number){
-                $this->error('报名名额只剩'.$num_remain.'名');
+                $this->error(__('预约名额只剩N名',['number'=>$num_remain]));
             }
         }
 

+ 11 - 0
application/api/lang/en/Ems.php

@@ -0,0 +1,11 @@
+<?php
+
+return [
+    '操作成功' => 'Operation successful',
+    '发送频繁' => 'Frequent sending',
+    '已被注册' => 'Registered',
+    '已被占用' => 'Occupied',
+    '未注册' => 'unregistered',
+    '发送成功' => 'Successfully sent',
+    '发送失败' => 'fail in send',
+];

+ 21 - 0
application/api/lang/en/Lesson.php

@@ -0,0 +1,21 @@
+<?php
+
+return [
+
+    '操作成功' => 'Operation successful',
+    '预约成功' => 'Booking successful',
+
+    '报名已截止' => 'booking has ended',
+    '剩N个名额' => '{:number} places left',
+
+    '课程可能已取消,请刷新重试' => 'The course may have been cancelled, please refresh and try again',
+    '预约人数错误' => 'Wrong number of people booked',
+    '课程已经结束了,不能再进行预约' => 'The course has ended and no more reservations can be made',
+
+    '预约名额只剩N名' => 'There are only {:number} reservation places left',
+    '套餐信息不正确,请刷新重试' => 'The package information is incorrect, please refresh and try again',
+    '该套餐余额不足,可以使用其他支付方式' => 'The balance of this package is insufficient, you can use other payment methods',
+    '扣除套餐余额失败' => 'Failed to deduct package balance',
+    '预约失败' => 'Reservation failed',
+    '下单失败' => 'Order failed',
+];

+ 7 - 0
application/api/lang/zh-cn/Lesson.php

@@ -0,0 +1,7 @@
+<?php
+
+return [
+    '剩N个名额' => '剩{:number}个名额',
+    '预约名额只剩N名' => '预约名额只剩{:number}名',
+
+];