From b971faa8fc5d1e148ac6b66650c52eec509b2d89 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Mon, 09 Oct 2023 10:33:44 +0800
Subject: [PATCH] 英文修改为中文

---
 src/api/http/request.ts                            |    4 ++--
 src/components/g-map/use-drone-control-ws-event.ts |    4 ++--
 src/pages/page-pilot/pilot-home.vue                |    6 +++---
 src/pages/page-pilot/pilot-index.vue               |    4 ++--
 src/components/livestream-agora.vue                |    8 ++++----
 src/pages/page-web/projects/wayline.vue            |    2 +-
 src/components/livestream-others.vue               |    4 ++--
 src/pages/page-pilot/pilot-bind.vue                |    2 +-
 src/pages/page-web/projects/Firmwares.vue          |   20 ++++++++++----------
 src/pages/page-web/projects/devices.vue            |    4 ++--
 10 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/src/api/http/request.ts b/src/api/http/request.ts
index 04a9e20..773175d 100644
--- a/src/api/http/request.ts
+++ b/src/api/http/request.ts
@@ -65,11 +65,11 @@
     }
     // @See: https://github.com/axios/axios/issues/383
     if (!err.response || !err.response.status) {
-      message.error('The network is abnormal, please check the backend service and try again')
+      message.error('网络异常,请检查后端服务后重试')
       return
     }
     if (err.response?.status !== 200) {
-      message.error(`ERROR_CODE: ${err.response?.status}`)
+      message.error(`错误码: ${err.response?.status}`)
     }
     // if (err.response?.status === 403) {
     //   // window.location.href = '/'
diff --git a/src/components/g-map/use-drone-control-ws-event.ts b/src/components/g-map/use-drone-control-ws-event.ts
index cfcb1d3..b6282ef 100644
--- a/src/components/g-map/use-drone-control-ws-event.ts
+++ b/src/components/g-map/use-drone-control-ws-event.ts
@@ -14,12 +14,12 @@
   function onControlSourceChange (data: ControlSourceChangeInfo) {
     if (data.type === ControlSourceChangeType.Flight && data.sn === sn) {
       droneControlSource.value = data.control_source
-      message.info(`Flight control is changed to ${droneControlSource.value}`)
+      message.info(`飞行控制改为 ${droneControlSource.value}`)
       return
     }
     if (data.type === ControlSourceChangeType.Payload && data.sn === payloadSn) {
       payloadControlSource.value = data.control_source
-      message.info(`Payload control is changed to ${payloadControlSource.value}.`)
+      message.info(`负载控制改为 ${payloadControlSource.value}.`)
     }
   }
 
diff --git a/src/components/livestream-agora.vue b/src/components/livestream-agora.vue
index b6ea030..63b40bc 100644
--- a/src/components/livestream-agora.vue
+++ b/src/components/livestream-agora.vue
@@ -209,7 +209,7 @@
   }
   // Subscribe when a remote user publishes a stream
   agoraClient.on('user-joined', async (user: IAgoraRTCRemoteUser) => {
-    message.info('user[' + user.uid + '] join')
+    message.info('用户[' + user.uid + '] 加入')
   })
   agoraClient.on('user-published', async (user: IAgoraRTCRemoteUser, mediaType: 'audio' | 'video') => {
     await agoraClient.subscribe(user, mediaType)
@@ -223,7 +223,7 @@
   })
   agoraClient.on('user-unpublished', async (user: any) => {
     console.log('unpublish live:', user)
-    message.info('unpublish live')
+    message.info('取消发布')
   })
   agoraClient.on('exception', async (e: any) => {
     console.log(e)
@@ -364,7 +364,7 @@
 }
 const onUpdateQuality = () => {
   if (!livePara.liveState) {
-    message.info('Please turn on the livestream first.')
+    message.info('请先打开直播')
     return
   }
   setLivestreamQuality({
@@ -379,7 +379,7 @@
 
 const onSwitch = () => {
   if (dronePara.lensSelected === undefined || dronePara.lensSelected === nonSwitchable) {
-    message.info('The ' + nonSwitchable + ' lens cannot be switched, please select the lens to be switched.', 8)
+    message.info('当前 ' + nonSwitchable + ' 镜头无法切换,请选择要切换的镜头', 8)
     return
   }
   changeLivestreamLens({
diff --git a/src/components/livestream-others.vue b/src/components/livestream-others.vue
index d8b240e..771fb42 100644
--- a/src/components/livestream-others.vue
+++ b/src/components/livestream-others.vue
@@ -335,7 +335,7 @@
 
 const onUpdateQuality = () => {
   if (!liveState.value) {
-    message.info('Please turn on the livestream first.')
+    message.info('请先打开直播')
     return
   }
   setLivestreamQuality({
@@ -400,7 +400,7 @@
 }
 const onSwitch = () => {
   if (lensSelected.value === undefined || lensSelected.value === nonSwitchable) {
-    message.info('The ' + nonSwitchable + ' lens cannot be switched, please select the lens to be switched.', 8)
+    message.info('当前 ' + nonSwitchable + ' 镜头无法切换,请选择要切换的镜头', 8)
     return
   }
   changeLivestreamLens({
diff --git a/src/pages/page-pilot/pilot-bind.vue b/src/pages/page-pilot/pilot-bind.vue
index 0f3e9e8..4c848c2 100644
--- a/src/pages/page-pilot/pilot-bind.vue
+++ b/src/pages/page-pilot/pilot-bind.vue
@@ -43,7 +43,7 @@
   }
   bindDevice(bindParam).then(bindRes => {
     if (bindRes.code !== 0) {
-      message.error('bind failed:' + bindRes.message)
+      message.error('绑定失败:' + bindRes.message)
       console.error(bindRes.message)
       return
     }
diff --git a/src/pages/page-pilot/pilot-home.vue b/src/pages/page-pilot/pilot-home.vue
index 0b86139..1a6c79a 100644
--- a/src/pages/page-pilot/pilot-home.vue
+++ b/src/pages/page-pilot/pilot-home.vue
@@ -264,7 +264,7 @@
   }
   device.data.gateway_sn = apiPilot.getRemoteControllerSN()
   if (device.data.gateway_sn === EStatusValue.DISCONNECT.toString()) {
-    message.warn('Data is not available, please restart the remote control.')
+    message.warn('数据不可用,请重新启动遥控器')
     return
   }
 
@@ -389,7 +389,7 @@
   if (isInstalled) {
     window.open('https://www.dji.com')
   } else {
-    message.error(packageName + ' is not installed.')
+    message.error(packageName + ' 未安装.')
   }
 }
 
@@ -481,7 +481,7 @@
 }
 
 function moduleUninstall (m: any) {
-  message.info('uninstall ' + m.module)
+  message.info('卸载 ' + m.module)
   apiPilot.unloadComponent(m.module)
   refreshStatus()
 }
diff --git a/src/pages/page-pilot/pilot-index.vue b/src/pages/page-pilot/pilot-index.vue
index d6930a0..bb1dbc9 100644
--- a/src/pages/page-pilot/pilot-index.vue
+++ b/src/pages/page-pilot/pilot-index.vue
@@ -81,7 +81,7 @@
         })
         const jsres = apiPilot.loadComponent(EComponentName.Api, apiPilot.getComponentParam(EComponentName.Api))
         if (!jsres) {
-          message.error('Failed to load api module.')
+          message.error('加载api模块失败')
           return
         }
         apiPilot.setToken(res.data.access_token)
@@ -97,7 +97,7 @@
   await login(formState)
     .then(res => {
       if (!isVerified.value) {
-        message.error('Please verify the license firstly.')
+        message.error('请先核实许可证.')
         return
       }
       console.log('login res:', res)
diff --git a/src/pages/page-web/projects/Firmwares.vue b/src/pages/page-web/projects/Firmwares.vue
index 54fd590..9389975 100644
--- a/src/pages/page-web/projects/Firmwares.vue
+++ b/src/pages/page-web/projects/Firmwares.vue
@@ -202,8 +202,8 @@
 
 const rules = {
   status: [{ required: true }],
-  release_note: [{ required: true, message: 'Please input release note.' }],
-  device_name: [{ required: true, message: 'Please select which models this firmware belongs to.' }]
+  release_note: [{ required: true, message: '请输入发行说明' }],
+  device_name: [{ required: true, message: '请选择该固件属于哪个型号' }]
 }
 interface FileItem {
   uid: string;
@@ -221,7 +221,7 @@
 
 function beforeUpload (file: FileItem) {
   if (!file.name || !file.name?.endsWith('.zip')) {
-    message.error('Format error. Please select zip file.')
+    message.error('格式错误。请选择zip文件')
     return false
   }
   fileList.value = [file]
@@ -240,7 +240,7 @@
 
 const uploadFile = async () => {
   if (fileList.value.length === 0) {
-    message.error('Please select at least one file.')
+    message.error('请选择至少一个文件')
   }
   let uploading: string
   formRef.value.validate().then(async () => {
@@ -261,22 +261,22 @@
     uploading = (file.name ?? 'uploding') + timestamp
     notification.open({
       key: uploading,
-      message: `Uploading  ${moment().format()}`,
-      description: `[${file.name}] is uploading... `,
+      message: `上传中  ${moment().format()}`,
+      description: `[${file.name}] 正在上传... `,
       duration: null
     })
     importFirmareFile(workspaceId, fileData).then((res) => {
       if (res.code === 0) {
         notification.success({
-          message: `Uploaded  ${moment().format()}`,
-          description: `[${file.name}] file uploaded successfully. Duration: ${moment.duration(new Date().getTime() - timestamp).asSeconds()}`,
+          message: `上传完毕  ${moment().format()}`,
+          description: `[${file.name}] 文件上传完毕. 用时: ${moment.duration(new Date().getTime() - timestamp).asSeconds()}`,
           duration: null
         })
         getAllFirmwares(pageParam)
       } else {
         notification.error({
-          message: `Failed to upload [${file.name}]. Check and try again.`,
-          description: `Error message: ${res.message} ${moment().format()}`,
+          message: `上传失败 [${file.name}]. 检查并重新上传`,
+          description: `错误信息: ${res.message} ${moment().format()}`,
           style: { color: commonColor.FAIL },
           duration: null,
         })
diff --git a/src/pages/page-web/projects/devices.vue b/src/pages/page-web/projects/devices.vue
index cde515a..758ed5f 100644
--- a/src/pages/page-web/projects/devices.vue
+++ b/src/pages/page-web/projects/devices.vue
@@ -314,8 +314,8 @@
       } else { // 终态:成功,失败,超时
         if (status === DeviceCmdExecuteStatus.Failed || status === DeviceCmdExecuteStatus.Timeout) {
           notification.error({
-            message: `(${payload.sn}) Upgrade failed`,
-            description: `Error Code: ${payload.result}`,
+            message: `(${payload.sn}) 升级失败`,
+            description: `错误码: ${payload.result}`,
             duration: null
           })
         }
diff --git a/src/pages/page-web/projects/wayline.vue b/src/pages/page-web/projects/wayline.vue
index 4c773d5..77d0775 100644
--- a/src/pages/page-web/projects/wayline.vue
+++ b/src/pages/page-web/projects/wayline.vue
@@ -166,7 +166,7 @@
 function deleteWayline () {
   deleteWaylineFile(workspaceId.value, deleteWaylineId.value).then(res => {
     if (res.code === 0) {
-      message.success('Wayline file deleted')
+      message.success('文件删除成功')
     }
     deleteWaylineId.value = ''
     deleteTip.value = false

--
Gitblit v1.9.3