From b319184a10802da6ce6a66fb822e224ec6e82871 Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 25 May 2023 10:20:12 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-96424=20=E9=AB=98=E7=BA=A7js?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E8=B6=85=E9=93=BE=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascript/JSContentWithDescriptionPane.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java index 74b1596207..bebe106cdc 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java @@ -20,6 +20,7 @@ import com.fr.design.javascript.jsapi.JSAPITreeHelper; import com.fr.design.javascript.jsapi.JSAPIUserObject; import com.fr.design.layout.FRGUIPaneFactory; import com.fr.general.ComparatorUtils; +import com.fr.general.GeneralContext; import com.fr.general.http.HttpToolbox; import com.fr.json.JSONArray; import com.fr.json.JSONException; @@ -70,6 +71,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; +import java.util.Locale; import java.util.concurrent.ExecutionException; public class JSContentWithDescriptionPane extends JSContentPane implements KeyListener { @@ -393,9 +395,13 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi private void updateHelpDocuments(Object value, List helpDocuments) { String url = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT) + value.toString(); try { - String result = HttpToolbox.get(url); - JSONObject jsonObject = new JSONObject(result); - JSONArray jsonArray = jsonObject.optJSONArray("list"); + JSONArray jsonArray = null; + //目前简中繁中之外的语言高级编辑器功能及文档不完善,右侧展示的文档链接列表暂时为空白 + if(Locale.CHINA.getLanguage().equals(GeneralContext.getLocale().getLanguage())) { + String result = HttpToolbox.get(url); + JSONObject jsonObject = new JSONObject(result); + jsonArray = jsonObject.optJSONArray("list"); + } if (jsonArray != null) { for (int i = 0; i < jsonArray.length(); i++) { JSONObject resultJSONObject = jsonArray.optJSONObject(i); From f1f5b54b5a75f37036b7d192a1efda7f34cd30cf Mon Sep 17 00:00:00 2001 From: obo Date: Thu, 25 May 2023 16:34:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-96424=20=E9=AB=98=E7=BA=A7js?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=99=A8=E8=B6=85=E9=93=BE=E5=9B=BD=E9=99=85?= =?UTF-8?q?=E5=8C=96=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/javascript/JSContentWithDescriptionPane.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java index bebe106cdc..4116f4f1d0 100644 --- a/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java +++ b/designer-base/src/main/java/com/fr/design/javascript/JSContentWithDescriptionPane.java @@ -397,7 +397,7 @@ public class JSContentWithDescriptionPane extends JSContentPane implements KeyLi try { JSONArray jsonArray = null; //目前简中繁中之外的语言高级编辑器功能及文档不完善,右侧展示的文档链接列表暂时为空白 - if(Locale.CHINA.getLanguage().equals(GeneralContext.getLocale().getLanguage())) { + if(GeneralContext.isChineseEnv()) { String result = HttpToolbox.get(url); JSONObject jsonObject = new JSONObject(result); jsonArray = jsonObject.optJSONArray("list");