This is an automated email from the ASF dual-hosted git repository.

xxyu pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 037ff0db5218135033feaa59342a6846355a2944
Author: XiaoxiangYu <x...@apache.org>
AuthorDate: Mon Aug 21 15:41:57 2023 +0800

    Unify with english error msg
---
 .../org/apache/kylin/common/exception/code/ErrorMsg.java  | 11 +++--------
 .../kylin/common/exception/code/ErrorSuggestion.java      | 15 +++++++--------
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git 
a/src/core-common/src/main/java/org/apache/kylin/common/exception/code/ErrorMsg.java
 
b/src/core-common/src/main/java/org/apache/kylin/common/exception/code/ErrorMsg.java
index 1e43c498ca..e31504d385 100644
--- 
a/src/core-common/src/main/java/org/apache/kylin/common/exception/code/ErrorMsg.java
+++ 
b/src/core-common/src/main/java/org/apache/kylin/common/exception/code/ErrorMsg.java
@@ -21,7 +21,6 @@ package org.apache.kylin.common.exception.code;
 import java.io.IOException;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.kylin.common.exception.ErrorCodeException;
 
 import lombok.extern.slf4j.Slf4j;
@@ -30,13 +29,13 @@ import lombok.extern.slf4j.Slf4j;
 public class ErrorMsg extends AbstractErrorContent {
 
     private static final Map<String, String> EN_MAP;
-    private static final Map<String, String> CN_MAP;
+//    private static final Map<String, String> CN_MAP;
     private static final ThreadLocal<Map<String, String>> FRONT_MAP = new 
ThreadLocal<>();
 
     static {
         try {
             EN_MAP = loadProperties("kylin_error_msg_conf_en.properties");
-            CN_MAP = loadProperties("kylin_error_msg_conf_cn.properties");
+            // CN_MAP = loadProperties("kylin_error_msg_conf_cn.properties");
             FRONT_MAP.set(EN_MAP);
         } catch (IOException e) {
             throw new ErrorCodeException("loading msg map failed.", e);
@@ -48,11 +47,7 @@ public class ErrorMsg extends AbstractErrorContent {
     }
 
     public static void setMsg(String lang) {
-        if (StringUtils.equalsIgnoreCase(CN_LANG, lang)) {
-            FRONT_MAP.set(CN_MAP);
-        } else {
-            FRONT_MAP.set(EN_MAP);
-        }
+        FRONT_MAP.set(EN_MAP);
     }
 
     @Override
diff --git 
a/src/core-common/src/main/java/org/apache/kylin/common/exception/code/ErrorSuggestion.java
 
b/src/core-common/src/main/java/org/apache/kylin/common/exception/code/ErrorSuggestion.java
index 8a1c0487ed..0ef239637b 100644
--- 
a/src/core-common/src/main/java/org/apache/kylin/common/exception/code/ErrorSuggestion.java
+++ 
b/src/core-common/src/main/java/org/apache/kylin/common/exception/code/ErrorSuggestion.java
@@ -21,7 +21,6 @@ package org.apache.kylin.common.exception.code;
 import java.io.IOException;
 import java.util.Map;
 
-import org.apache.commons.lang3.StringUtils;
 import org.apache.kylin.common.exception.ErrorCodeException;
 
 import lombok.extern.slf4j.Slf4j;
@@ -30,13 +29,13 @@ import lombok.extern.slf4j.Slf4j;
 public class ErrorSuggestion extends AbstractErrorContent {
 
     private static final Map<String, String> EN_MAP;
-    private static final Map<String, String> CN_MAP;
+    // private static final Map<String, String> CN_MAP;
     private static final ThreadLocal<Map<String, String>> FRONT_MAP = new 
ThreadLocal<>();
 
     static {
         try {
             EN_MAP = 
loadProperties("kylin_error_suggestion_conf_en.properties");
-            CN_MAP = 
loadProperties("kylin_error_suggestion_conf_cn.properties");
+            // CN_MAP = 
loadProperties("kylin_error_suggestion_conf_cn.properties");
             FRONT_MAP.set(EN_MAP);
         } catch (IOException e) {
             throw new ErrorCodeException("loading suggestion map failed.", e);
@@ -48,11 +47,11 @@ public class ErrorSuggestion extends AbstractErrorContent {
     }
 
     public static void setMsg(String lang) {
-        if (StringUtils.equalsIgnoreCase(CN_LANG, lang)) {
-            FRONT_MAP.set(CN_MAP);
-        } else {
-            FRONT_MAP.set(EN_MAP);
-        }
+//        if (StringUtils.equalsIgnoreCase(CN_LANG, lang)) {
+//            FRONT_MAP.set(CN_MAP);
+//        } else {
+        FRONT_MAP.set(EN_MAP);
+//        }
     }
 
     @Override

Reply via email to