From 25ee74760fa3ad4100858e68b49feab7faaefecf Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 2 Jun 2020 16:46:43 +0800 Subject: [PATCH] i18n --- .../java/io/metersphere/performance/engine/EngineFactory.java | 4 ++-- 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 | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java b/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java index 01b3eeff48..c2a3ec7798 100644 --- a/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java +++ b/backend/src/main/java/io/metersphere/performance/engine/EngineFactory.java @@ -37,12 +37,12 @@ public class EngineFactory { public static Engine createEngine(LoadTestWithBLOBs loadTest) { String resourcePoolId = loadTest.getTestResourcePoolId(); if (StringUtils.isBlank(resourcePoolId)) { - MSException.throwException("Resource Pool ID is empty."); + MSException.throwException(Translator.get("test_resource_pool_id_is_null")); } TestResourcePool resourcePool = testResourcePoolService.getResourcePool(resourcePoolId); if (resourcePool == null) { - MSException.throwException("Resource Pool is empty."); + MSException.throwException(Translator.get("test_resource_pool_id_is_null")); } final ResourcePoolTypeEnum type = ResourcePoolTypeEnum.valueOf(resourcePool.getType()); diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties index bfbe5b406e..9681fc1698 100644 --- a/backend/src/main/resources/i18n/messages_en_US.properties +++ b/backend/src/main/resources/i18n/messages_en_US.properties @@ -36,6 +36,7 @@ workspace_name_already_exists=The workspace name already exists workspace_does_not_belong_to_user=The current workspace does not belong to the current user workspace_not_exists=Workspace is not exists #test resource pool +test_resource_pool_id_is_null=Test Resource Pool ID cannot be null test_resource_pool_name_is_null=Test Resource Pool name cannot be null test_resource_pool_name_already_exists=The test resource pool name already exists #project diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties index 262e40d587..c2904033da 100644 --- a/backend/src/main/resources/i18n/messages_zh_CN.properties +++ b/backend/src/main/resources/i18n/messages_zh_CN.properties @@ -36,6 +36,7 @@ workspace_name_already_exists=工作空间名已存在 workspace_does_not_belong_to_user=当前工作空间不属于当前用户 workspace_not_exists=工作空间不存在 #test resource pool +test_resource_pool_id_is_null=资源池ID不能为空 test_resource_pool_name_is_null=资源池名称不能为空 test_resource_pool_name_already_exists=资源池名称已存在 #project diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties index 9472ec45e5..1a9aa1ddef 100644 --- a/backend/src/main/resources/i18n/messages_zh_TW.properties +++ b/backend/src/main/resources/i18n/messages_zh_TW.properties @@ -36,6 +36,7 @@ workspace_name_already_exists=工作空間名已存在 workspace_does_not_belong_to_user=當前工作空間不屬於當前用戶 workspace_not_exists=工作空間不存在 #test resource pool +test_resource_pool_id_is_null=資源池ID不能為空 test_resource_pool_name_is_null=資源池名稱不能為空 test_resource_pool_name_already_exists=資源池名稱已存在 #project