From 780fe87ef1d787baf3785732e464c140ffbb65d3 Mon Sep 17 00:00:00 2001 From: taojinlong Date: Thu, 29 Sep 2022 14:24:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=9B=BD=E9=99=85=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/dataease/service/datasource/DriverService.java | 2 +- backend/src/main/resources/i18n/messages_en_US.properties | 1 + backend/src/main/resources/i18n/messages_zh_CN.properties | 1 + backend/src/main/resources/i18n/messages_zh_TW.properties | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/dataease/service/datasource/DriverService.java b/backend/src/main/java/io/dataease/service/datasource/DriverService.java index e83e9a07be..f33d4de94b 100644 --- a/backend/src/main/java/io/dataease/service/datasource/DriverService.java +++ b/backend/src/main/java/io/dataease/service/datasource/DriverService.java @@ -128,7 +128,7 @@ public class DriverService { } String filename = file.getOriginalFilename(); if(!filename.endsWith(".jar")){ - throw new Exception("File is not jar!"); + throw new Exception(Translator.get("I18N_NOT_JAR")); } String dirPath = DRIVER_PATH + driverId + "/"; String filePath = dirPath + Md5Utils.md5(filename) + ".jar"; diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index 4577f24e93..94133cce0d 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -237,4 +237,5 @@ I18N_ACCOUNT_LOCKED=Account\u3010%s\u3011is locked(Please contact the administra I18N_PANEL_EXIST=The current panel name already exists under this directory I18N_DATASET_GROUP_EXIST=The current dataset grouping name already exists under this directory +I18N_NOT_JAR=File is not jar! diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index c427e12348..192d0b90f7 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -237,4 +237,5 @@ I18N_ACCOUNT_LOCKED=\u8D26\u53F7\u3010%s\u3011\u5DF2\u9501\u5B9A(\u8BF7\u8054\u7 I18N_PANEL_EXIST=\u5F53\u524D\u4EEA\u8868\u677F\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 I18N_DATASET_GROUP_EXIST=\u5F53\u524D\u6570\u636E\u96C6\u5206\u7EC4\u540D\u79F0\u5728\u8BE5\u76EE\u5F55\u4E0B\u9762\u5DF2\u7ECF\u5B58\u5728 +I18N_NOT_JAR=文件不是 jar 包! diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index ba91a4e5f4..a80471659d 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -233,4 +233,4 @@ I18N_ACCOUNT_LOCKED=\u8CEC\u865F\u3010%s\u3011\u5DF2\u9396\u5B9A(\u8ACB\u806F\u7 I18N_PANEL_EXIST=\u7576\u524D\u5100\u9336\u95C6\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 I18N_DATASET_GROUP_EXIST=\u7576\u524D\u6578\u64DA\u96C6\u5206\u7D44\u540D\u7A31\u5728\u8A72\u76EE\u9304\u4E0B\u9762\u5DF2\u7D93\u5B58\u5728 - +I18N_NOT_JAR=文件不是 jar 包!