Преглед изворни кода

修改足球赛事事件翻译

lip пре 6 часа
родитељ
комит
9858e1c7dd
4 измењених фајлова са 68 додато и 1 уклоњено
  1. 8 1
      app/Http/Controllers/admin/Sport.php
  2. 20 0
      lang/en/messages.php
  3. 20 0
      lang/vi/messages.php
  4. 20 0
      lang/zh/messages.php

+ 8 - 1
app/Http/Controllers/admin/Sport.php

@@ -219,7 +219,14 @@ class Sport extends Controller
             $info['odds'] = $info['odds'] ? json_decode($info['odds'], true) : null;
             $info['odds'] = $info['odds'] ? SportModel::doOdds($info['odds'], $info['odd_values_locked']) : null;
             $info['event'] = SportEvent::where('data_id', $info['data_id'])->get();
-
+            foreach($info['event'] as &$event) {
+                if (stripos($event['detail'], 'Substitution') !== false) {
+                    $event['detail'] = str_replace('Substitution', lang('Substitution'), $event['detail']); 
+                } else {
+                    $event['detail'] = lang($event['detail']);
+                }
+                $event['type'] = lang($event['type']);
+            }
             $info['home_team'] = $info['home_team'] ?? SportTeam::getTeamName($info['home_team_id']);
             $info['guest_team'] = $info['guest_team'] ?? SportTeam::getTeamName($info['guest_team_id']);
             $info['league'] = $info['league'] ?? SportLeague::getLeagueName($info['league_id']);

+ 20 - 0
lang/en/messages.php

@@ -393,6 +393,26 @@ return [
     'Technical Loss' => 'Technical Loss',
     'WalkOver' => 'WalkOver',
     'In Progress' => 'In Progress',
+    'Substitution' => 'Substitution',
+    'Var' => 'Var',
+    'Goal' => 'Goal',
+    'Card' => 'Card',
+    'Subst' => 'Substitution',
+    'Yellow Card' => 'Yellow Card',
+    'Red Card' => 'Red Card',
+    'Normal Goal' => 'Normal Goal',
+    'Penalty' => 'Penalty',
+    'Missed Penalty' => 'Missed Penalty',
+    'Own Goal' => 'Own Goal',
+    'Card reviewed' => 'Card Reviewed',
+    'Goal cancelled' => 'Goal Cancelled',
+    'Penalty confirmed' => 'Penalty Confirmed',
+    'Goal confirmed' => 'Goal Confirmed',
+    'Goal Disallowed - offside' => 'Goal Disallowed - Offside',
+    'Goal Disallowed - video review' => 'Goal Disallowed - Video Review',
+    'Goal Disallowed - Foul' => 'Goal Disallowed - Foul',
+    'Goal Disallowed - handball' => 'Goal Disallowed - Handball',
+    'Penalty cancelled' => 'Penalty Cancelled',
 
     "操" => " Operation ",
     "尾" => " Tail ",

+ 20 - 0
lang/vi/messages.php

@@ -393,6 +393,26 @@ return [
     'Technical Loss' => 'Thua do kỹ thuật',
     'WalkOver' => 'Đối phương từ thua',
     'In Progress' => 'Đang diễn ra',
+    'Substitution' => 'Thay người',
+    'Var' => 'Hủy bàn thắng',
+    'Goal' => 'Bàn thắng',
+    'Card' => 'Thẻ phạt',
+    'Subst' => 'Thay người',
+    'Yellow Card' => 'Thẻ vàng',
+    'Red Card' => 'Thẻ đỏ',
+    'Normal Goal' => 'Bàn thắng thông thường',
+    'Penalty' => 'Đá phạt đền',
+    'Missed Penalty' => 'Bỏ lỡ phạt đền',
+    'Own Goal' => 'Bàn thắng tự đổ',
+    'Card reviewed' => 'Xem xét thẻ phạt',
+    'Goal cancelled' => 'Hủy bàn thắng',
+    'Penalty confirmed' => 'Phạt đền hợp lệ',
+    'Goal confirmed' => 'Bàn thắng hợp lệ',
+    'Goal Disallowed - offside' => 'Bàn thắng vô hiệu - việt vị',
+    'Goal Disallowed - video review' => 'Bàn thắng vô hiệu - xem lại video',
+    'Goal Disallowed - Foul' => 'Bàn thắng vô hiệu - vi phạm luật',
+    'Goal Disallowed - handball' => 'Bàn thắng vô hiệu - dùng tay',
+    'Penalty cancelled' => 'Hủy phạt đền',
     
     "操" => " Thao tác ",
     "尾" => " Đuôi ",

+ 20 - 0
lang/zh/messages.php

@@ -393,6 +393,26 @@ return [
     'Technical Loss' => '技术性判负',
     'WalkOver' => '弃权/退赛(对手直接晋级)',
     'In Progress' => '进行中',
+    'Substitution' => '换人',
+    'Var' => '进球取消',
+    'Goal' => '进球',
+    'Card' => '黄牌',
+    'Subst' => '换人',
+    'Yellow Card' => '黄牌',
+    'Red Card' => '红牌',
+    'Normal Goal' => '普通进球',
+    'Penalty' => '点球',
+    'Missed Penalty' => '未射正点球',
+    'Own Goal' => '自进球',
+    'Card reviewed' => '黄牌复核',
+    'Goal cancelled' => '进球取消',
+    'Penalty confirmed' => '点球有效',
+    'Goal confirmed' => '进球有效',
+    'Goal Disallowed - offside' => '进球无效-越位',
+    'Goal Disallowed - video review' => '进球无效-视频回放',
+    'Goal Disallowed - Foul' => '进球无效-犯规在先',
+    'Goal Disallowed - handball' => '进球无效-手球',
+    'Penalty cancelled' => '点球取消',
     
     "操" => "操",
     "尾" => "尾",